elasticsearch5.4安装

1、从官网下载ES 安装包:

elasticsearch-5.4.0.tar.gz

2、解压到要安装的目录

注意:一定要切换用户,不能用root用户解压,不能用root用户启动

tar -zxvf elasticsearch-5.4.0.tar.gz

3、配置:(注意:第二个节点修改node.name)

cluster.name: elasticsearch       #集群名称
node.name: es-node-01            #节点名称
path.data: /usr/local/elasticsearch-2.4.5/data   #数据文件存储路径
path.logs: /usr/local/elasticsearch-2.4.5/logs    #log文件存储路径
network.host: 192.168.1.102                           #默认网络连接地址
http.port: 9200                                                #连接端口
discovery.zen.minimum_master_nodes: 2     #这个参数来保证集群中的节点可以知道其它N个有master资格的节点。默认为1,对于大的集群来说,可以设置大一点的值(2-4)
# discovery.zen.ping.multicast.enabled: false   #禁用多播 
discovery.zen.ping.unicast.hosts: ["192.168.1.102", "192.168.1.103", "192.168.1.104"]   #集群中master节点的初始列表,可以通过这些节点来自动发现新加入集群的节点。
discovery.zen.ping_timeout: 120s     #存活超时时间
bootstrap.system_call_filter: false    # 因centos6不支持SecComp而默认bootstrap.system_call_filter为true进行检测,所以,要设置为 false。注:SecComp为secure computing mode简写
http.cors.enabled: true  #是否支持跨域,默认为false
http.cors.allow-origin: "*"   #当设置允许跨域,默认为*,表示支持所有域名

4、启动、关闭:

/usr/local/elasticsearch-5.4.0/bin/elasticsearch ---前台启动
/usr/local/elasticsearch-5.4.0/bin/elasticsearch -d ---后台启动
查看启动进程:jps | grep Elasticsearch
关闭:
kill -15 pid

5、安装插件:

1)elasticsearch-head插件安装:
安装nodejs和npm:
1、从官网上下载安装包:
node-v6.10.3-linux-x64.tar.xz
2、安装xz
yum -y install xz

3、解压
xz -d node*.tar.xz
tar -xvf node*.tar

4、解压完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
npm -v

5、下载插件安装

git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head 
npm install //一定要在elasticsearch-head目录下执行该命令

6、修改配置
修改elasticsearch-head下Gruntfile.js文件,默认监听在127.0.0.1下9200端口

7、启动服务

1.
cd elasticsearch-head/node_modules/grunt/bin/
./grunt server
2.
或者进入elasticsearch-head目录后,配置完Gruntfile.js 直接 npm run start 即可 浏览器访问 http://localhost:9100/ (localhost换成插件所在的机器的ip)

-------------------------------------------------------------------------------------------

补充kibana的安装

 从官网下载回来安装包之后kibana-5.4.0-linux-x86_64/config目录

修改配置

server.host: "0.0.0.0"
elasticsearch.url: "http://192.168.1.103:9200"

执行 bin/kibana 即可

注意:

1. 需要将server.host修改一下,否则远程无法访问,这个配置在Kibana4.6.1(对应ES2.4.0的时候还不需要配置,但是5.4.0就需要了

2. 之前ES和Kibana配合还需要使用plugin安装一些Marvel,sense等,现在都不需要了,DevTools就是之前的Sense

进入
http://192.168.1.103:5601/

可以看到

 

参考:
http://blog.csdn.net/iiiiher/article/details/53381051

https://github.com/mobz/elasticsearch-head

http://www.cnblogs.com/kamong/p/6099914.html

http://www.cnblogs.com/wjoyxt/p/6222859.html

 

posted @ 2017-05-12 12:27  Reynold.C  Views(6370)  Comments(7Edit  收藏  举报