参考博客:linux下ElasticSearch.6.2.2集群安装与head、Kibana、X-Pack..插件的配置安装
参考博客:ELK5.5.1 插件安装实践纪要(head/bigdesk/kopf/cerebo/中文分词插件)
1 [yun@mini01 ~] $ elasticsearch-plugin install x-pack
2 ERROR: this distribution of Elasticsearch contains X-Pack by default
3台机器只需要安装一台就可以了
1 [yun@mini01 software]$ pwd
2 /app/software
3 [yun@mini01 software]$ tar xf node-v8.11.4-linux-x64.tar.xz # 从官网下载
4 [yun@mini01 software]$ mv node-v8.11.4-linux-x64 /app/
5 [yun@mini01 software]$ cd /app/
6 [yun@mini01 ~]$ ln -s node-v8.11.4-linux-x64/ node
7 ######## 添加环境变量 使用root用户
8 [root@mini01 ~]# vim /etc/profile # 追加如下信息
9 ………………
10 ### 环境变量添加
11 export NODEJS_HOME=/app/node
12 export PATH=$PATH:$NODEJS_HOME/bin
13
14 [root@mini01 ~]# logout
15 [yun@mini01 ~]$ source /etc/profile # 重新加载环境变量
16 [yun@mini01 node]$ node -v # 验证是否安装成功
17 v8.11.4
1 [yun@mini01 software]$ pwd
2 /app/software
3 [yun@mini01 software]$ tar xf elasticsearch-head-5.0.0.tar.gz # 从git上下载的
4 [yun@mini01 software]$ mv elasticsearch-head-5.0.0 /app/
5 [yun@mini01 software]$ cd /app/
6 [yun@mini01 ~]$ ln -s elasticsearch-head-5.0.0/ elasticsearch-head
7 [yun@mini01 ~]$ cd elasticsearch-head # 进入目录
8 [yun@mini01 elasticsearch-head]$ npm install -g grunt-cli
9 /app/node-v8.11.4-linux-x64/bin/grunt -> /app/node-v8.11.4-linux-x64/lib/node_modules/grunt-cli/bin/grunt
10 + grunt-cli@1.3.1
11 added 152 packages in 39.838s
12 [yun@mini01 elasticsearch-head]$ npm install
13 npm WARN elasticsearch-head@0.0.0 license should be a valid SPDX license expression
14 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
15 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
16
17 up to date in 2.88s
18 [yun@mini01 elasticsearch-head]$ grunt server & # 启动服务并后台运行【注意所在目录】
19 # 或者 grunt server >>/app/elasticsearch-head/logs/head_$(date +%F).log 2>>/app/elasticsearch-head/logs/head-err_$(date +%F).log &
20 # ##日志存放
21 (node:2886) ExperimentalWarning: The http2 module is an experimental API.
22 Running "connect:server" (connect) task
23 Waiting forever...
24 Started connect web server on http://localhost:9100
浏览器访问
1 http://mini01:9100/
1 其中红框内的URL可以为:
2 http://mini01:9200/
3 http://mini02:9200/
4 http://mini03:9200/
只需要安装一台就可以了
1 [yun@mini01 software]$ pwd
2 /app/software
3 [yun@mini01 software]$ tar xf bigdesk-2.2.a.tar.gz # 从git上下载
4 [yun@mini01 software]$ mv bigdesk-2.2.a /app/
5 [yun@mini01 software]$ cd /app/
6 [yun@mini01 ~]$ ln -s bigdesk-2.2.a/ bigdesk
7 ###### 启动bigdesk
8 [yun@mini01 _site]$ pwd
9 /app/bigdesk/_site
10 [yun@mini01 _site]$ python -m SimpleHTTPServer & # 启动程序【注意所在目录】
11 # python -m SimpleHTTPServer >>/app/bigdesk/logs/bigdesk_$(date +%F).log 2>>/app/bigdesk/logs/bigdesk-err_$(date +%F).log &
12 # 记录日志
浏览器访问
1 http://mini01:8000
1 其中红框内的URL可以为:
2 http://mini01:9200/
3 http://mini02:9200/
4 http://mini03:9200/
所以不是kopf而是cerebro
1 [yun@mini01 software]$ pwd
2 /app/software
3 [yun@mini01 software]$ tar xf cerebro-0.8.1.tgz # 从git上下载
4 [yun@mini01 software]$ mv cerebro-0.8.1 /app/
5 [yun@mini01 software]$ cd /app/
6 [yun@mini01 ~]$ ln -s cerebro-0.8.1/ cerebro
7 # 启动cerebro
8 [yun@mini01 cerebro]$ pwd
9 /app/cerebro
10 [yun@mini01 cerebro]$ ./bin/cerebro & # 有日志记录
11 [1] 4683
浏览器访问
1 http://mini01:9000
1 其中红框内的URL可以为:
2 http://mini01:9200/
3 http://mini02:9200/
4 http://mini03:9200/
通过head添加数据
备注:为绿色时表示es都正常数据无丢失;黄色表示有es异常,但数据无丢失;红色表示es有异常,并且数据有丢失。