centos6.5 elasticsearch5集群的安装部署

 

1、安装jdk8

2、下载es5

curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.2.1.zip
3、解压 赋权限  chmod -R 777 /usr/local/elk5/

4、vim config/jvm.options

-Xms256m
-Xmx256m

5、vim config/elasticsearch.yml

主节点

cluster.name: es-cluster
node.name: es-node-a1
node.master: true
node.data: true
path.logs: /usr/local/elk/elasticsearch/logs
bootstrap.memory_lock: false
network.host: 192.168.95.150
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["192.168.95.150", "192.168.95.151", "192.168.95.152"]
discovery.zen.minimum_master_nodes: 1
gateway.recover_after_nodes: 2
gateway.recover_after_time: 5m
gateway.expected_nodes: 1
bootstrap.system_call_filter: false
script.engine.groovy.inline.search: on
script.engine.groovy.inline.aggs: on
indices.recovery.max_bytes_per_sec: 20mb
http.cors.enabled: true
http.cors.allow-origin: "*"

从节点

cluster.name: es-cluster
node.name: es-node-a2
node.master: false
node.data: true
path.logs: /usr/local/elk/elasticsearch/logs
bootstrap.memory_lock: false
network.host: 192.168.95.152
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["192.168.95.150", "192.168.95.151", "192.168.95.152"]
discovery.zen.minimum_master_nodes: 1
gateway.recover_after_nodes: 2
gateway.recover_after_time: 5m
gateway.expected_nodes: 1
bootstrap.system_call_filter: false
script.engine.groovy.inline.search: on
script.engine.groovy.inline.aggs: on
indices.recovery.max_bytes_per_sec: 20mb

6、vim /etc/sysctl.conf

#添加下面2行
vm.max_map_count=655360
fs.file-max=655360

执行sysctl -p 使其生效

7、vim /etc/security/limits.conf

* soft nofile 65536
* hard nofile 65536
wanbf soft memlock unlimited
wanbf hard memlock unlimited
* soft nproc 5000
* hard nproc 5000
wanbf soft nproc 5000
wanbf hard nproc 5000

8、修改limit文件需要重启机器执行 shutdown -r now

9、运行 bin/elasticsearch

10、es会改变防火墙状态  需要root去执行 service iptables stop

二、es header部署

11、git安裝

yum remove git
# cd /usr/src
# wget https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz
# tar xzf git-2.0.5.tar.gz

# cd git-2.0.5
yum install perl-ExtUtils-MakeMaker package
yum install libssl-dev build-essential zlibc zlib-bin libidn11-dev libidn11
yum install libssl-dev openssl-devel
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc

git --version

12、安裝node js

wget https://npm.taobao.org/mirrors/node/v6.11.3/node-v6.11.3-linux-x64.tar.gz

tar -zvxf node-v6.11.0-linux-x64.tar.gz
vi /etc/profile
export NODE_HOME=/opt/node
export PATH=$NODE_HOME/bin:$PATH

source /etc/profile
node -v

13、启动es-head

cd elaticsearch-head
npm install
npm run start
open http://localhost:9100/

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值