forked from ahmia/ahmia-crawler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Ahmia index | ||
Ahmia search engine use elasticsearch to index content. | ||
|
||
## Installation | ||
Please install elastic search from the official repository thanks to the [official guide](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html) | ||
|
||
## Configuration | ||
Default configuration is enough to run index in dev mode. Here is suggestion for a more secure configuration | ||
|
||
### /etc/security/limits.conf | ||
|
||
``` | ||
elasticsearch - nofile unlimited | ||
elasticsearch - memlock unlimited | ||
``` | ||
|
||
### /etc/default/elasticsearch | ||
on CentOS/RH: /etc/sysconfig/elasticsearch | ||
|
||
``` | ||
ES_HEAP_SIZE=2g # Half of your memory, other half is for Lucene | ||
MAX_OPEN_FILES=1065535 | ||
MAX_LOCKED_MEMORY=unlimited | ||
``` | ||
|
||
### /etc/elasticsearch/elasticsearch.yml | ||
|
||
``` | ||
bootstrap.mlockall: true | ||
``` | ||
|
||
## Start the service | ||
|
||
```sh | ||
# systemctl start elasticsearch | ||
``` | ||
|
||
## Init mappings | ||
Please do this when running for the first time | ||
|
||
```sh | ||
$ curl -XPUT -i "localhost:9200/crawl/" -d "@./mappings.json" | ||
``` |