ELK安装
下载地址:
Elastic相关组件下载总地址:
https://www.elastic.co/downloads
ES下载地址:
https://www.elastic.co/downloads/elasticsearch
Elastic Search1.4.1下载地址:
Logstash下载地址:
https://www.elastic.co/downloads/logstash
Kibana下载地址:
https://www.elastic.co/downloads/kibana
直接下载,或用U盘将下载好的压缩包拷贝到CentOS系统下,拷贝的地点是/home/hadoop
ES安装:
解压安装:
[hadoop@Master ~]$ su
Password:
[root@Master hadoop]# tar -zxvf elasticsearch-1.7.3.tar.gz -C /usr/local/
[root@Master hadoop]# cd /usr/local/
[root@Master local]# mv elasticsearch-1.7.3 elasticsearch
备注:
Elasticsearch1.7.3版本要求JDK1.8以上的版本,因为在前面安装JDK时,安装的版本是
1.7.51(1.7.55以上版本可以使用),所以安装过程中会出现一些问题。
有两种解决方法,一种是更新JDK,一种是选择低版本的ES。
最终,为了节省时间,在虚拟机上进行操作时,选择的是用低版本ES。
具体操作如下:
[root@Master hadoop]# cd /usr/local/
[root@Master local]# cd elasticsearch-1.4.1/
[root@Master elasticsearch-1.4.1]# bin/elasticsearch
[2015-10-22 20:30:50,826][INFO ][node ] [Cottonmouth] version[1.4.1], pid[101153], build[89d3241/2014-11-26T15:49:29Z]
[2015-10-22 20:30:50,826][INFO ][node ] [Cottonmouth] initializing ...
[2015-10-22 20:30:50,830][INFO ][plugins ] [Cottonmouth] loaded [], sites []
[2015-10-22 20:30:57,257][INFO ][node ] [Cottonmouth] initialized
[2015-10-22 20:30:57,257][INFO ][node ] [Cottonmouth] starting ...
[2015-10-22 20:30:57,851][INFO ][transport ] [Cottonmouth] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.154.156:9300]}
[2015-10-22 20:30:57,985][INFO ][discovery ] [Cottonmouth] elasticsearch/zS02Jbi4S6yIUGHXomLOGg
[2015-10-22 20:31:01,803][INFO ][cluster.service ] [Cottonmouth] new_master [Cottonmouth][zS02Jbi4S6yIUGHXomLOGg][Master][inet[/192.168.154.156:9300]], reason: zen-disco-join (elected_as_master)
[2015-10-22 20:31:01,838][INFO ][http ] [Cottonmouth] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.154.156:9200]}
[2015-10-22 20:31:01,838][INFO ][node ] [Cottonmouth] started
[2015-10-22 20:31:01,847][INFO ][gateway ] [Cottonmouth] recovered [0] indices into cluster_state
另外打开一个终端,进行检测:
[hadoop@Master ~]$ curl -X GET http://localhost:9200/
{
"status" : 200,
"name" : "Catiana",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.4.1",
"build_hash" : "89d3241d670db65f994242c8e8383b169779e2d4",
"build_timestamp" : "2014-11-26T15:49:29Z",
"build_snapshot" : false,
"lucene_version" : "4.10.2"
},
"tagline" : "You Know, for Search"
}
[hadoop@Master ~]$
Logstash安装:
解压安装:
[hadoop@Master ~]$ su
Password:
[root@Master hadoop]# tar -zxvf logstash-1.5.4.tar.gz -C /usr/local/
[root@Master hadoop]# cd /usr/local/
[root@Master local]# mv logstash-1.5.4 logstash
logstash下载即可使用,命令行参数可以参考logstash flags,主要有:
agent #运行Agent模式
-f CONFIGFILE #指定配置文件
web #自动Web服务
-p PORT #指定端口,默认9292
Kibana安装:
解压安装:
[hadoop@Master ~]$ su
Password:
[root@Master hadoop]# tar -zxvf kibana-4.1.2-linux-x64.tar.gz -C /usr/local
[root@Master hadoop]# cd /usr/local/
[root@Master local]# mv kibana-4.1.2-linux-x64 kibana
[root@Master local]#