cd /root
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.2.tar.gz
tar -zxvf elasticsearch-5.6.2.tar.gz
mv /root/elasticsearch-5.6.2 /usr/local/elasticsearch
su root
vim /etc/rc.local
su elasticsearch -c "/usr/local/elasticsearch/bin/elasticsearch -d -p /usr/local/elasticsearch/logs/elasticsearch.pid"
ESC
:wq
网友评论