How to start elasticsearch and how to access it with the elasticsearch-head plug-in
How to start elasticsearch and how to use the elasticsearch-head plug-in access, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
1. Download elasticsearch-6.1.3 and modify the configuration file vi config/elasticsearch.yml
Cluster.name=es_cluster
Node.name=node-1
Path.data=/usr/local/elasticsearch/elasticsearch-6.1.3/data
Path.logs=/usr/local/elasticsearch/elasticsearch-6.1.3/logs
Network.host=192.168.135.130
Network.port=9200
2. Start ES:
. / bin/elasticsearch-v
Prompt cannot run elasticsearch as root
3. Create elasticsearch user groups and elasticsearch users
Groupadd elasticsearch
Useradd elasticsearch-g elasticsearch-p elasticsearch
4. Change the user and group of the Elasticsearch folder and internal files to elasticsearch
Chown-R elasticsearch:elasticsearch / usr/local/elasticsearch
5. Switch elasticsearch
Su elasticsearch
6. Start elasticsearch
. / bin/elasticsearch-v
Error prompted: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
7. Switch to root user to modify the configuration sysctl.conf
Vi / etc/sysctl.conf
Add vm.max_map_count=262144 at the end
Then execute: sysctl-p
8. Restart elasticsearch and start it successfully
. / bin/elasticsearch-d
9. Install the head plug-in
Version 5. 0 can be installed by plugin name, and can be run independently after 5. 0.
Git clone git://github.com/mobz/elasticsearch-head.git
Cd elasticsearch-head
Npm install
Npm run start
Symbolic links should be made during installation: ln-s / usr/bin/nodejs / usr/bin/node
10. Access the head plug-in
Http://192.168.135.130:9100
After reading the above, have you learned how to start elasticsearch and how to access it with the elasticsearch-head plug-in? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!