Centos7安装elasticsearch5(二)
安装head插件及x-pack、kibana
一、安装nodejs和rpm
- su - root
- yum install epel-release
- yum install nodejs npm
二、下载并安装elasticsearch-head
- git clone https://github.com/mobz/elasticsearch-head.git
- cd elasticsearch-head
- npm install
- npm run start
- http://you IP Address:9100
三、修改elasticsearch.yml
- 在elasticsearch下的elasticsearch.yml下新增一下两行:
http.cors.enabled: true
http.cors.allow-origin: “*”
四、修改es-head的localhost地址
- vim Gruntfile.js
connect: {
server: {
options: {
== hostname: ‘0.0.0.0’,==
port: 9100,
base: ‘.’,
keepalive: true
}
}
}
五、修改head的连接地址
vim ./_site/app.js
this.base_uri = this.config.base_uri || this.prefs.get(“app-base_uri”) || “http://you ip address:9200”;
六、启动elasticsearch-head
grunt server 或 npm run start
七、安装x-pack
切换目录 :== cd /usr/local/elasticsearch/bin==
安装pack :./elasticsearch-plugin install x-pack
修改elasticsearch.yml,新增
action.auto_create_index: .security,.security-6,.monitoring*,.watches,.triggered_watches,.watcher-history*,app-a-,app-b-,.ml*
八、安装kibana
wget https://artifacts.elastic.co/downloads/kibana/kibana-5.6.2-linux-x86_64.tar.gz
tar -xzf kibana-5.6.2-linux-x86_64.tar.gz
vim ./config/kibana.yml
cd /usr/local/elasticsearch/kibana/bin/
./kibana-plugin install x-pack
./kibana
九、关闭x-pack
vim elasticsearch.yml
G
xpack.security.enabled: false