官網:
https://www.elastic.co/guide/en/elasticsearch/reference/5.5/zip-targz.html
Install
先配置java8
http://blog.csdn.net/fearless11/article/details/76360016
nohup wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.1.tar.gz &
du -sh elasticsearch-5.5.1.tar.gz
tar xfvz elasticsearch-5.5.1.tar.gz
useradd es
chown -R es:root elasticsearch-5.5.1
su - es
cd /usr/local/elasticsearch-5.5.1
用daemon的方式運行
./bin/elasticsearch -d -p pid
停止運行
kill `cat pid`
報錯
1、不能用root用戶運行
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
新建用戶es啓動elastic
2、沒有權限
Exception in thread "main" SettingsException[Failed to load settings from /usr/local/elasticsearch-5.5.1/config/elasticsearch.yml]; nested: AccessDeniedException[/usr/local/elasticsearch-5.5.1/config/elasticsearch.yml];
授權:chown -R es:root elasticsearch-5.5.1