安装elasticsearch-head

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.启动

cd /usr/local/elasticsearch/elasticsearch-7.6.0/plugins/elasticsearch-head
npm install --registry=https://registry.npm.taobao.org #使用淘宝镜像 
npm run start
nohup npm run start &   #后台运行

6.注意

1.org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: Property [elasticsearch.version] is missing for plugin [head]
不能把head文件放入plugin 

2.如果连接不上
在 /usr/local/elasticsearch/elasticsearch-7.6.0/config/elasticsearch.yml 加入
http.cors.enabled: true
http.cors.allow-origin: "*"

7.成功

猜你喜欢

转载自blog.csdn.net/qq_20143059/article/details/106333051