ElasticSearch2.4.6的安装部署以及集群部署、ElasticSearch-head等插件的安装

一、安装

在安装之前,请先设置jdk环境,到oracle官网下载相应的jdk版本,我这边使用的是jdk1.7的版本

vim /etc/profile

在文件的最后加入相应的环境变量
export JAVA_HOME=/usr/local/jdk/jdk1.7.0_80
export PATH=$JAVA_HOME/bin:$PATH

官网下载对应的ElasticSearch,目前最新版本为6.x,我这边下载的是ElasticSearch2.4.6(它运行在jdk1.7+),5.x及6.x都需要jdk1.8的支持

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-2.4.6.tar.gz

tar -zxvf elasticsearch-2.4.6
cd elasticsearch-2.4.6
./bin/elasticsearch

执行之前就得修改配置文件:vim config/elasticsearch.yml

vim config/elasticsearch.yml 

修改方法参考如下:

#集群名称
cluster.name: elk_test.cluster
#节点名称
node.name: node-01
#node.master: true
#node.data: true
#或设置成具体的值 192.168.0.153
network.host: 0.0.0.0 
http.port: 9200
discovery.zen.ping.unicast.hosts: ["192.168.0.153","192.168.0.154","192.168.0.155"]
#discovery.zen.ping.multicast.enabled: false
discovery.zen.minimum_master_nodes: 2

#针对5.x版本后,插件就必须独立运行,解决跨域问题的设置
#http.cors.enabled: true
#http.cors.allow-origin: "*"

集群的其他节点设置如上。

二,head插件的安装

针对5.x+版本,head插件必须独立运行,不能再用/bin/plugin -install mobz/elasticsearch-head安装了,针对2.x版本,我们还是以这种方式进行在线安装(/bin/plugin -install mobz/elasticsearch-head),针对5.x+版本,可以参考这篇文章

cd /usr/local/es/elasticsearch-2.4.6/bin

./plugin install mobz/elasticsearch-head -Dhttps.protocols=TLSv1.2

加入-Dhttps.protocols=TLSv1.2 是为了解决https.protocols版本报错的问题

安装成功之后,就可以访问http://192.168.0.153:9200/_plugin/head/

7371aa43a11c8eded863ee85a3416d64fa6.jpg

至此,已经完成了,待续……

转载于:https://my.oschina.net/u/2353992/blog/2252807

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值