elasticsearch2.4.2安装(1)
1.解压elasticsearch.2.4.2;3个节点2. 修改config/elasticsearch.yml
(注意要顶格写,冒号后面要加一个空格)
NIE-00: 192.168.1.100
a)cluster.name: ns-cluster (同一集群要一样)
b)node.name: node-0
c)network.Host: 192.168.1.100
d)防止脑裂的配置
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping_timeout: 120s
client.transport.ping_timeout: 60s
discovery.zen.ping.unicast.hosts:["192.168.1.100","192.168.1.101","192.168.1.102"]
NIE-01: 192.168.1.101
a)cluster.name: ns-cluster(同一集群要一样)
b)node.name: node-1
c)network.Host: 192.168.1.101
d)防止脑裂的配置
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping_timeout: 120s
client.transport.ping_timeout: 60s
discovery.zen.ping.unicast.hosts: ["192.168.1.100","192.168.1.101", "192.168.1.102"]
NIE-01: 192.168.1.102
a)cluster.name: ns-cluster(同一集群要一样)
b)node.name: node-2
c)network.Host: 192.168.1.102
d)防止脑裂的配置
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping_timeout: 120s
client.transport.ping_timeout: 60s
discovery.zen.ping.unicast.hosts: ["192.168.1.100","192.168.1.101", "192.168.1.102"]
3. 启动:nohup ./bin/elasticsearch >es.log 2>&1 &
控制台输出如下:
$ bin/elasticsearch
unable to install syscall filter: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER compiled in
version, pid, build
initializing ...
modules , plugins [], sites []
using data paths, mounts [[/ (/dev/mapper/VolGroup-lv_root)]], net usable_space , net total_space , spins? , types
heap size , compressed ordinary object pointers
max file descriptors for elasticsearch process likely too low, consider increasing to at least
initialized
starting ...
publish_address {192.168.1.100:9300}, bound_addresses {192.168.1.100:9300}
ns/UOPlLQJRTVay--um3NeBSA
waited for 30s and no initial state was set by the discovery
publish_address {192.168.1.100:9200}, bound_addresses {192.168.1.100:9200}
started
detected_master {node-1}{8sluGD79Rga0GuGPhoQkCA}{192.168.1.101}{192.168.1.101:9300}, added {{node-1}{8sluGD79Rga0GuGPhoQkCA}{192.168.1.101}{192.168.1.101:9300},}, reason: zen-disco-receive(from master [{node-1}{8sluGD79Rga0GuGPhoQkCA}{192.168.1.101}{192.168.1.101:9300}])
added {{node-2}{nMa8oo-6RW6zJLE3MQROYQ}{192.168.1.102}{192.168.1.102:9300},}, reason: zen-disco-receive(from master [{node-1}{8sluGD79Rga0GuGPhoQkCA}{192.168.1.101}{192.168.1.101:9300}])
其他两个节点,同上,启动;
4. 浏览器访问:
http://nie-02:9200/
http://nie-02:9200/?pretty
0. 前提是:hosts
192.168.1.100NIE-00
192.168.1.101 NIE-01
192.168.1.102 NIE-02
{
"name" : "node-2",
"cluster_name" : "ns-cluster",
"cluster_uuid" : "na",
"version" : {
"number" : "2.4.2",
"build_hash" : "161c65a337d4b422ac0c805f284565cf2014bb84",
"build_timestamp" : "2016-11-17T11:51:03Z",
"build_snapshot" : false,
"lucene_version" : "5.5.2"
},
"tagline" : "You Know, for Search"
}
最简安装还是蛮easy的。
今天先到这里。
页:
[1]