首页 > 代码库 > ELK 5.5.0 安装

ELK 5.5.0 安装

 

Preparation

假设当前为root用户,并已有jdk1.8环境。

cd /opt/packageuseradd sealion

ElasticSearch

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.zip unzip elasticsearch-5.5.0.zip # mkdir pathschown -R sealion:sealion /opt/package/elasticsearch-5.5.0mkdir -p /data/data/esmkdir -p /data/logs/eschown sealion:sealion /data/data/eschown sealion:sealion /data/logs/es# clean bincd /opt/package/elasticsearch-5.5.0/binrm *.exe *.bat# system configsysctl -w vm.max_map_count=262144
vim /etc/security/limits.conf 修改如下内容:* soft nofile 65536* hard nofile 65536* soft nproc 2048* hard nproc 4096
# edit elasticsearch.yml# Use a descriptive name for your cluster:#cluster.name: bigdata-log## ------------------------------------ Node ------------------------------------## Use a descriptive name for the node:#node.name: bigdata6# need new Linux kernel to supportbootstrap.memory_lock: falsebootstrap.system_call_filter: false## Path to directory where to store the data (separate multiple locations by comma):#path.data: /data/data/es## Path to log files:#path.logs: /data/logs/es# Set the bind address to a specific IP (IPv4 or IPv6):#network.host: 192.168.10.120## Set a custom port for HTTP:#http.port: 9200## For more information, consult the network module documentation.## --------------------------------- Discovery ----------------------------------## Pass an initial list of hosts to perform discovery when new node is started:# The default list of hosts is ["127.0.0.1", "[::1]"]#discovery.zen.ping.unicast.hosts: ["bigdata6", "bigdata7"]
# 启动su - sealioncd /opt/package/elasticsearch-5.5.0/bin./elasticsearch -d

安装Cerebro插件 (前身为Kopf)

wget https://github.com/lmenezes/cerebro/releases/download/v0.6.5/cerebro-0.6.5.zipunzip cerebro-0.6.5.zipcd cerebro-0.6.5/binnohup ./cerebro > cerebro.log &

打开默认的9000端口,填上要连接的host即可看到。注意有些host或防火墙配置可能不能用localhost去连接,要填写对应的域名或集群ip。

Kibana

wget https://artifacts.elastic.co/downloads/kibana/kibana-5.5.0-linux-x86_64.tar.gztar xzvf kibana-5.5.0-linux-x86_64.tar.gzchown -R sealion:sealion /opt/package/kibana-5.5.0-linux-x86_64
# edit kibana.yml# Kibana is served by a back end server. This setting specifies the port to use.server.port: 5601# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.# The default is ‘localhost‘, which usually means remote machines will not be able to connect.# To allow connections from remote users, set this parameter to a non-loopback address.server.host: "bigdata6"# The Kibana server‘s name.  This is used for display purposes.server.name: "bigdata6"
su - sealioncd /opt/package/kibana-5.5.0-linux-x86_64/binnohup ./kibana serve -e http://bigdata6:9200 > kibana.log &

LogStash

wget https://artifacts.elastic.co/downloads/logstash/logstash-5.5.0.zipunzip logstash-5.5.0.zipchown -R sealion:sealion /opt/package/logstash-5.5.0mkdir -p /data/data/logstashmkdir -p /data/logs/logstashchown -R sealion:sealion /data/data/logstashchown -R sealion:sealion /data/logs/logstash
# edit logstash.ymlpath.data: /data/data/logstashpath.logs: /data/logs/logstash

ELK 5.5.0 安装