进行校验
代码语言:javascript复制[root@h102 ELK]# sha1sum *
c2b6831386d926ad29f0e1abfcb8ae11f5505084 elasticsearch-2.1.1.rpm
84462fee86fc70185a9e83da42e78c2d57ef0985 GPG-KEY-elasticsearch
115ba22882df75eb5f07330b7ad8781a57569b00 kibana-4.3.1-linux-x64.tar.gz
a72ccab73566e52e61d6dcedf14c14e10257b243 logstash-2.1.1-1.noarch.rpm
[root@h102 ELK]#
Tip: 之所以选择下载,而不是直接安装是为了避免重复安装的重复下载问题,这几个包都比较大,相对比较耗费带宽,网络如出问题,也容易前功尽弃
安装
安装elasticsearch
代码语言:javascript复制[root@h102 ELK]# rpm -ivh elasticsearch-2.1.1.rpm
Preparing... ########################################### [100%]
Creating elasticsearch group... OK
Creating elasticsearch user... OK
1:elasticsearch ########################################### [100%]
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using chkconfig
sudo chkconfig --add elasticsearch
### You can start elasticsearch service by executing
sudo service elasticsearch start
[root@h102 ELK]# chkconfig --add elasticsearch
[root@h102 ELK]# chkconfig --list | grep elasticsearch
elasticsearch 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@h102 ELK]# /etc/init.d/elasticsearch start
Starting elasticsearch: [ OK ]
[root@h102 ELK]# ps faux | grep java
root 8794 0.0 0.0 103256 828 pts/1 S 19:31 0:00 _ grep java
488 8738 91.3 12.4 2526348 238520 ? Sl 19:31 0:21 /usr/bin/java -Xms256m -Xmx1g -Djava.awt.headless=true -XX: UseParNewGC -XX: UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX: UseCMSInitiatingOccupancyOnly -XX: HeapDumpOnOutOfMemoryError -XX: DisableExplicitGC -Dfile.encoding=UTF-8 -Djna.nosys=true -Des.path.home=/usr/share/elasticsearch -cp /usr/share/elasticsearch/lib/elasticsearch-2.1.1.jar:/usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch start -p /var/run/elasticsearch/elasticsearch.pid -d -Des.default.path.home=/usr/share/elasticsearch -Des.default.path.logs=/var/log/elasticsearch -Des.default.path.data=/var/lib/elasticsearch -Des.default.path.conf=/etc/elasticsearch
[root@h102 ELK]# netstat -ant | grep 9200
tcp 0 0 ::1:9200 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:9200 :::* LISTEN
[root@h102 ELK]# netstat -ant | grep 9300
tcp 0 0 ::1:9300 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:9300 :::* LISTEN
[root@h102 ELK]# curl localhost:9200/_cat/health?v
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1450783966 19:32:46 elasticsearch green 1 1 0 0 0 0 0 0 - 100.0%
[root@h102 ELK]# curl localhost:9200/_cat/nodes?v
host ip heap.percent ram.percent load node.role master name
127.0.0.1 127.0.0.1 12 70 0.09 d * Pyre
[root@h102 ELK]# curl 'localhost:9200/_cat/allocation?v'
shards disk.indices disk.used disk.avail disk.total disk.percent host ip node
0 0b 24.9gb 24.1gb 49gb 50 127.0.0.1 127.0.0.1 Pyre
[root@h102 ELK]#