1、Elasticsearch 安装
cd /usr/local
wget \
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.7-linux-x86_64.tar.gz \
https://artifacts.elastic.co/downloads/kibana/kibana-7.17.7-linux-x86_64.tar.gz \
https://artifacts.elastic.co/downloads/logstash/logstash-7.17.7-linux-x86_64.tar.gz
https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.17.7/elasticsearch-analysis-ik-7.17.7.zip
vim /etc/profile
export ES_JAVA_HOME=$JAVA_HOME
export LS_JAVA_HOME=$JAVA_HOME
source /etc/profile
tar -zxvf elasticsearch-7.17.7-linux-x86_64.tar.gz
useradd elk
chown elk:elk -R elasticsearch-7.17.7
echo "elk hard nofile 65536" >> /etc/security/limits.conf
echo "elk soft nofile 65536" >> /etc/security/limits.conf
echo "vm.max_map_count=655360" >> /etc/sysctl.conf
sysctl -p
1、1 Elasticsearch 配置
vim /usr/local/elasticsearch-7.17.7/config/elasticsearch.yml
cluster.name: test-log
node.name: node-1
network.host: 0.0.0.0
http.port: 9200
discovery.seed_hosts: ["0.0.0.0"]
cluster.initial_master_nodes: ["node-1"]
su elk
cd elasticsearch-7.17.7/
bin/elasticsearch
需在云服务器安全组开放相应端口
输入服务器公网ip:9200
nohup bin/elasticsearch >> /dev/null &
2、Kibana 安装
cd /usr/local
tar -zxvf kibana-7.17.7-linux-x86_64.tar.gz
chown elk:elk -R kibana-7.17.7-linux-x86_64/
2、1 Kibana 配置
vim /usr/local/kibana-7.17.7-linux-x86_64/config/kibana.yml
server.host: "0.0.0.0"
elasticsearch.hosts: ["http://服务器公网ip:9200"]
i18n.locale: "zh-CN"
cd kibana-7.17.7-linux-x86_64/
su elk
bin/kibana
需在云服务器安全组开放5601
文章来源:https://www.toymoban.com/news/detail-570142.html
nohup bin/kibana >> /dev/null &
3、Logstash 安装
cd /usr/local
tar -zxvf logstash-7.17.7-linux-x86_64.tar.gz
chown elk:elk -R logstash-7.17.7/
3、1 Logstash 配置
vim /usr/local/logstash-7.17.7/config/logstash.yml
node.name: test-log
path.config: /usr/local/logstash-7.17.7/config/conf/*.conf
vim /usr/local/logstash-7.17.7/config/conf/test-log.conf
input {
tcp {
mode => "server"
port => 4560
}
}
filter {}
output {
elasticsearch {
action => "index"
hosts => ["服务器公网ip:9200"]
index => "test-log"
}
}
cd logstash-7.17.7/
su elk
bin/logstash
nohup bin/logstash >> /dev/null &
需在云服务器安全组开放相应端口4560文章来源地址https://www.toymoban.com/news/detail-570142.html
到了这里,关于Linux 安装elasticsearch,kibana,Logstash的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!