本文共 1546 字,大约阅读时间需要 5 分钟。
wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.0/elasticsearch-2.4.0.tar.gz
wget https://download.elastic.co/logstash/logstash/logstash-2.4.0.tar.gz
wget https://download.elastic.co/kibana/kibana/kibana-4.6.0-linux-x86_64.tar.gz
tar zxvf elasticsearch-2.4.0.tar.gz
tar zxvf kibana-4.6.0-linux-x86_64.tar.gz
tar zxvf logstash-2.4.0.tar.gz
mv elasticsearch-2.4.0 elasticsearch
mv kibana-4.6.0-linux-x86_64 kibana
mv logstash-2.4.0 logstash
groupadd elasticsearch
useradd -g elasticsearch -d /usr/local/elasticsearch elasticsearch
mv elasticsearch/* /usr/local/elasticsearch
chown -R elasticsearch.elasticsearch /usr/local/elasticsearch
chown -R elasticsearch.elasticsearch /data/elasticsearch
./bin/plugin install mobz/elasticsearch-head
vi config/elasticsearch.yml
cluster.name: niudingfeng
node.name: node-1
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/logs
network.host: 10.10.16.193
http.port: 9200
启动:./bin/elasticsearch &
查看地址:http://10.10.16.194:9200/_plugin/head/ http://10.10.16.194:9200/
vim config/kibana.yml
server.port: 5601
server.host: "10.10.16.194"
elasticsearch.url: "http://10.10.16.194:9200"
kibana.index: ".kibana"
启动:./bin/kibana &
查看:
nohup /root/logstash/bin/logstash agent -f /root/logstash_agent.conf &
input {
file {
type => "logtest"
path => ["/root/access_log"]
}
}
output {
elasticsearch {
action => "index"
hosts => "10.10.16.194:9200"
index => "applog"
}
}
本文转自aaron428 51CTO博客,原文链接:http://blog.51cto.com/aaronsa/1846947,如需转载请自行联系原作者