Install
1 | curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.2.2.tar.gz |
If not change directory’s owner, user command sudo -E ./bin/elasticsearch
execute the script, or the java path can’t be find.
Config
./bin/elasticsearch
dispatch memory1
ES_JAVA_OPTS="-Xms70m -Xmx70m"
./config/elasticsearch.yml
set bootstrap to single machine mode1
2
3
4
5
6
7
8
9
10cluster.name: elastic-pi
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 0.0.0.0
http.port: 9200
#http.cors.enabled: true
#http.cors.allow-origin: "*"
If exception happen like thismax virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
In single machine mode looks like no this problem1
2sudo echo "vm.max_map_count=262144" >> /etc/sysctl.conf
sudo sysctl -p
Plugin
Pharse process plugin
release to plugin directory1
2
3curl -O https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v5.2.2/elasticsearch-analysis-ik-5.2.2.zip
unzip elasticsearch-analysis-ik-5.2.2.zip
head
install npm/ nodejs/ elasticsearch-head
Exception
org.elasticsearch.indices.IndexClosedException: closed
delete the origin index and rebuild index, it works.
Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME
make sure java be right configed, and current user has privilege to use elasticsearch/ environment variable
Operate
start
nohup ./bin/elasticsearch&
./bin/elasticsearch -dstop
ps -ef|grep elastic
kill -9 51271