Elasticsearch-head linux安装与配置

1.安装node.js


1.1 下载

cd /usr/local/elasticsearch/
wget https://nodejs.org/dist/v10.16.3/node-v10.16.3-linux-x64.tar.xz


1.2 解压缩


 

tar -xJf node-v10.16.3-linux-x64.tar.xz 


 

1.3、配置环境变量

vi /etc/profile
export NODE_HOME=/usr/local/elasticsearch/node-v10.16.3-linux-x64
export PATH=$NODE_HOME/bin:$PATH


1.4、加载配置文件并验证是否安装成功

source /etc/profile
node -v
npm -v

2.head插件的安装与配置


2.1、安装git插件

yum install -y git


2.2、验证git插件是否安装成功

git --version


2.3、安装bzip2


 

git --version


否则一会运行时会出现一下问题:
Phantom installation failed { Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2:无法 exec: 没有那个文件或目录
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

2.4、下载并安装head插件

git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head/
npm install


2.5、配置elasticsearch,允许head插件远程访问


 

cd elasticsearch-7.10.2/config/
vi elasticearch.yml

http.cors.enabled: true
http.cors.allow-origin: "*"


2.6、启动elasticsearch-head服务

cd elasticsearch-head/
npm run start

 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值