添加一个用户,ES不能以root运行
1.useradd hoewon
2.passwd hoewon
3.visudo -f /etc/sudoers
hoewon ALL=(root) NOPASSWD: ALL
Installing JDK
1.sudo tar zxf jdk-8u141-linux-x64.tar.gz -C /usr/local/
2.sudo ln -s /usr/local/jdk1.8.0_141/ /usr/local/jdk8
3.sudo vim /etc/profile.d/jdk.sh
export JAVA_HOME=/usr/local/jdk8
export PATH=$JAVA_HOME/bin:$PATH
4.sudo . /etc/profile
Installing ES
1.sudo tar zxf elasticsearch-5.5.2.tar.gz -C /usr/local/
2.sudo vim /etc/profile.d/es.sh
export ES_HOME=/usr/local/elasticsearch-5.5.2
export PATH=$ES_HOME/bin:$PATH
Configurate the system kernel args
modify the file process num
1.sudo vim /etc/security/limits.conf
#<domain> <type> <item> <value>
hoewon soft nofile 65536
hoewon hard nofile 65536
hoewon soft nproc 2048
hoewon hard nproc 2048
#modify the vm.max_map_count
2.sudo vim /etc/sysctl.conf
vm.max_map_count=262144
3.sudo reboot or sysctl -p
Configurate the ES config
1.vim $ES_HOME/conf/elasticsearch.yml
network.host: 192.168.247.142
Running ES
1.cd $ES_HOME/bin
2. ./elasticsearch
测试 192.168.247.142:9200/