Centos7安装elasticsearch5 二

Centos7安装elasticsearch5(二)

安装head插件及x-pack、kibana

一、安装nodejs和rpm

  1. su - root
  2. yum install epel-release
  3. yum install nodejs npm

二、下载并安装elasticsearch-head

  1. git clone https://github.com/mobz/elasticsearch-head.git
  2. cd elasticsearch-head
  3. npm install
  4. npm run start
  5. http://you IP Address:9100

三、修改elasticsearch.yml

  1. 在elasticsearch下的elasticsearch.yml下新增一下两行:
    http.cors.enabled: true
    http.cors.allow-origin: “*”

四、修改es-head的localhost地址

  1. 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

猜你喜欢

转载自blog.csdn.net/xzhx6021/article/details/84753449