1.安装git
yum -y install git
2.安装elasticsearch-head
git clone git://github.com/mobz/elasticsearch-head.git
3.安装npm与node
参考:https://blog.csdn.net/qq_20143059/article/details/106334313
4.开放端口
/sbin/iptables -I INPUT -p tcp --dport 9100 -j ACCEPT
5.启动
1. cd /usr/local/elasticsearch/elasticsearch-7.6.0/plugins/elasticsearch-head 2. npm install --registry=https://registry.npm.taobao.org #使用淘宝镜像 3. npm run start 4. nohup npm run start & #后台运行
6.注意
1. 1.org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: Property [elasticsearch.version] is missing for plugin [head] 2. 不能把head文件放入plugin 3. 4. 2.如果连接不上 5. 在 /usr/local/elasticsearch/elasticsearch-7.6.0/config/elasticsearch.yml 加入 6. http.cors.enabled: true 7. http.cors.allow-origin: "*"
7.成功