centos下安装elasticsearch-head

1、安装npm
sudo yum install npm

centos下安装elasticsearch-head_第1张图片

2、下载elasticsearch-head

cd /home/packages
sudo git clone https://github.com/mobz/elasticsearch-head.git

3、将npm镜像换为国内镜像
npm config set registry http://registry.npm.taobao.org/
4、安装phantomjs
sudo npm install [email protected] --ignore
5、安装依赖环境
cd elasticsearch-head
sudo npm install
6、配置防火墙允许端口
sudo firewall-cmd --zone=public --add-port=9100/tcp --permanent
sudo firewall-cmd --reload

7、创建后台运行的日志文件es_head.log并设置所属用户
cd ../packages
sudo touch es_head.log
sudo chown -R lidamt:lidamt es_head.log

centos下安装elasticsearch-head_第2张图片

8、后台运行elasticsearch-head
nohup npm run start > /home/packages/es_head.log 2>&1 &

centos下安装elasticsearch-head_第3张图片

9、测试连接,内网连接需要挂

centos下安装elasticsearch-head_第4张图片

你可能感兴趣的:(centos,elasticsearch,linux)