上QQ阅读APP看书,第一时间看更新
How to do it…
The steps required for setting up a simple node are as follows:
- Open the config/elasticsearch.yml file with an editor of your choice.
- Set up the directories that store your server data, as follows:
- For Linux or macOS X, add the following path entries (using /opt/data as the base path):
path.conf: /opt/data/es/conf
path.data: /opt/data/es/data1,/opt2/data/data2
path.work: /opt/data/work
path.logs: /opt/data/logs
path.plugins: /opt/data/plugins
- For Windows, add the following path entries (using c:\Elasticsearch as the base path):
path.conf: c:\Elasticsearch\conf
path.data: c:\Elasticsearch\data
path.work: c:\Elasticsearch\work
path.logs: c:\Elasticsearch\logs
path.plugins: c:\Elasticsearch\plugins
- Set up the parameters to control the standard index shard and replication at creation. These parameters are as follows:
index.number_of_shards: 1
index.number_of_replicas: 1