首页 > 代码库 > ELK安装
ELK安装
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 &
查看:
http://10.10.16.194:5601/
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"
}
}
本文出自 “我的运维时光” 博客,请务必保留此出处http://aaronsa.blog.51cto.com/5157083/1846947
ELK安装