1. 部署环境

      CentOS 5.4

      关闭selinux和iptables

2. 部署elasticsearch

 yum install java-1.6.0-openjdk wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.1.noarch.rpm  rpm -ivh elasticsearch-1.4.1.noarch.rpm   #编辑配置..node.name: "xd-174"node.master: truenode.data: trueindex.number_of_shards: 10index.number_of_replicas: 0path.data: /data1/elasticsearch,/data2/elasticsearchnetwork.host:  8.8.8.8                                       #配置本地要监听的地址transport.tcp.port: 9300transport.tcp.compress: truehttp.port: 9200http.max_content_length: 100mbhttp.enabled: true http.cors.enabled: true      mkdir /data{1,2}/elasticsearch -p  chown elasticsearch.elasticsearch data{1,2}/elasticsearch -p /chkconfig --add elasticsearch  service elasticsearch start

3. 状态查看和插件安装

集群状态: http://localhost:9200/_cluster/health 节点状态: http://localhost:9200/_nodes 日志查看: tail -f /var/log/elasticsearch/<
>.log

      插件安装

# 1. head/usr/share/elasticsearch/bin/plugin -install mobz/elasticsearch-head#通过访问: http://ip:9200/_plugin/head/ 查看集群状态信息#2. bigdesk/usr/share/elasticsearch/bin/plugin -install lukas-vlcek/bigdesk#通过访问: http://ip:9200/_plugin/bigdesk/#nodes  查看集群监控信息

   

4. Logstash部署

wget https://download.elasticsearch.org/logstash/logstash/packages/centos/logstash-1.4.2-1_2c0f5a1.noarch.rpm rpm -ivh logstash-1.4.2-1_2c0f5a1.noarch.rpm cat >>/etc/logstash/conf.d/syslog.conf << EOFinput{  syslog {    host => "172.16.20.174"    port => "514"  }}output {  elasticsearch {    host => "127.0.0.1"  }  stdout {    codec => rubydebug  }}EOF

5. Kibana部署

yum install http phpwget https://download.elasticsearch.org/kibana/kibana/kibana-3.1.2.tar.gz mv kibana-3.1.2 /var/www/html/kibanaservice httpd startchkconfig httpd on