Setting up a node
ElasticSearch allows you to customize several parameters in an installation. In this recipe, we'll see the most-used ones in order to define where to store data and improve performance in general.
Getting ready
You need a working ElasticSearch installation.
How to do it...
Perform the following steps to set up a simple node:
- Open the
config/elasticsearch.yml
file with an editor of your choice. - Set up the directories that store your server data:
- For Linux or Mac OS X:
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:
path.conf: c:\Elasticsearch\conf path.data: c:\Elasticsearch\data path.work: c:\Elasticsearch\work path.logs: ...
- For Linux or Mac OS X:
Get ElasticSearch Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.