... | ... | @@ -4,7 +4,7 @@ |
|
|
|
|
|
To install Elasticsearch, run the following commands:
|
|
|
|
|
|
```plaintext
|
|
|
```sh
|
|
|
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
|
|
|
sudo apt-get install apt-transport-https
|
|
|
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
|
... | ... | @@ -24,7 +24,7 @@ For development purposes, it is sufficient to limit Elasticsearch to 1GB RAM. Yo |
|
|
|
|
|
Or as a one-time use command:
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
sudo echo -e "-Xms1g\n-Xmx1g" > /etc/elasticsearch/jvm.options.d/lowram.jvm.options"
|
|
|
```
|
|
|
|
... | ... | @@ -32,14 +32,14 @@ sudo echo -e "-Xms1g\n-Xmx1g" > /etc/elasticsearch/jvm.options.d/lowram.jvm.opti |
|
|
|
|
|
Open the configuration file at `/etc/elasticsearch/elasticsearch.yml` with your favourite editor (requires `sudo`) and add the options:
|
|
|
|
|
|
```
|
|
|
```yaml
|
|
|
discovery.type: single-node
|
|
|
xpack.security.enabled: false
|
|
|
```
|
|
|
|
|
|
Or as a one-time use command:
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
sudo echo -e "discovery.type: single-node\nxpack.security.enabled: false" > /etc/elasticsearch/elasticsearch.yml"
|
|
|
```
|
|
|
|
... | ... | @@ -51,7 +51,7 @@ For production, you will probably want to set `xpack.security.enabled: true` . S |
|
|
|
|
|
Configure passwords by running the following command:
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
/usr/share/elasticsearch/elasticsearch-setup-passwords auto
|
|
|
```
|
|
|
|
... | ... | @@ -65,7 +65,7 @@ You can start elasticsearch with `sudo service elasticsearch start` and stop it |
|
|
|
|
|
Whenever the database is reset or changed without Elasticsearch being informed (i.e. due to an error), the Elasticsearch database must also be brought back into sync. Use
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
bundle exec rake elasticsearch:sync
|
|
|
```
|
|
|
|
... | ... | |