elasticsearch集群安装
#首先安装JDK(安装JDK1.8)
wget dachun.red/setup/jdk.sh
sh jdk.sh
每台服务器更改hosts
vim /etc/hosts
10.2.1.125 node1
10.2.1.126 node2
10.2.1.127 node3
cd /opt
wget
tar -zxvf elasticsearch-5.6.2.tar.gz
rm -rf elasticsearch-5.6.2.tar.gz
每台如此安装
修改每台配置文件
10.2.1.125 node1
vim /opt/elasticsearch-5.6.2/config/elasticsearch.yml
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
cluster.name: dgg
node.name: node1
network.host: 10.2.1.125
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
node.data: true
#network.publish_host: 10.2.1.125
#transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["10.2.1.125"]
10.2.1.126 node2
vim /opt/elasticsearch-5.6.2/config/elasticsearch.yml
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
cluster.name: dgg
node.name: node2
network.host: 10.2.1.126
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
node.data: true
discovery.zen.ping.unicast.hosts: ["10.2.1.126"]
10.2.1.127 node3
vim /opt/elasticsearch-5.6.2/config/elasticsearch.yml
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
cluster.name: dgg
node.name: node3
network.host: 10.2.1.127
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
node.data: true
discovery.zen.ping.unicast.hosts: ["10.2.1.127"]
#启动每台(新建一个普通用户启动)
bin/elasticsearch -d
阅读(1184) | 评论(0) | 转发(0) |