因为es2.x以后的版本安装head不能像以前那么方便,最近下载了es5.2.2的版本进行部署发现不少问题,记录下node
head插件安装 第一步,安装git yum -y install git 以后去head插件官方能够看到head支持5.x的部署 不过须要先下载node,以独立服务的方式运行。linux
第二部,安装node 去官网下载nodejs,下载64位的,https://nodejs.org/en/download/ 下载下来的jar包是xz格式的,通常的linux可能不识别,还须要安装xz yum -y install xz 而后解压nodejs的安装包: xz -d node*.tar.xz tar -xvf node*.tar 解压完node的安装文件后,须要配置下环境变量,编辑/etc/profile,添加 # set node environment export NODE_HOME=/usr/elk/node-v6.9.1-linux-x64 export PATH=$PATH:$NODE_HOME/bin source /etc/profile 验证环境变量是否正常: node -v nmp -v 第三步,安装head插件 git clone git://github.com/mobz/elasticsearch-head.git cd elasticsearch-head npm install npm run start open http://localhost:9100/ 若是启动head以后,发现链接不上es 在elasticsearch.yml配置文件新增: http.cors.enabled: true http.cors.allow-origin: "*" 而后从新启动es和head就行了