Ubuntu下安装ES
新建非ROOT管理员用户
安装和配置JDK
打开下面的地址
https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
按照提示进行以下操作:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt-get update && sudo apt-get install elasticsearch
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
启动服务
sudo systemctl start elasticsearch.service
停止服务
sudo systemctl stop elasticsearch.service
输入以下命令查看服务是否启动成功
sudo systemctl status elasticsearch.service
如果找不到JAVA,编辑
/usr/share/elasticsearch/bin/elasticsearch-env加JAVA_HOME安装IK分词器
sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.1.2/elasticsearch-analysis-ik-6.1.2.zip安装完成之后重启ES