不死孤狼
IT 从来都是一个有新技术驱动的行业

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -

apt-get install apt-transport-https

echo "deb https://mirrors.bfsu.edu.cn/elasticstack/7.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-7.x.list

apt-get update && apt-get install kibana
systemctl enable kibana

# 修改配置文件

vim /etc/kibana/kibana.yml

server.host: "192.168.29.152"  # 改为本机ip

i18n.locale: "zh-CN"                  # 改为中文(不是必须的)


systemctl start kibana
systemctl status kibana


# install logstash
apt-get install logstash

# 修改java 路径
vim /usr/share/logstash/bin/logstash.lib.sh

setup_java() {
# set the path to java into JAVACMD which will be picked up by JRuby to launch itself
#add java home
JAVA_HOME=/opt/jdk
#

############################################
systemctl start logstash.service
systemctl status logstash.service
systemctl enable logstash

# install elasticsearch
apt-get install elasticsearch

# 单机部署需要修改配置文件
vim /etc/elasticsearch/elasticsearch.yml
# 监听任意主机的连接
network.host: 0.0.0.0
# 设置主机初始节点
cluster.initial_master_nodes: ["node-1"]
# 启动
systemctl start elasticsearch
systemctl status elasticsearch
systemctl enable elasticsearch

posted on 2020-06-22 16:26  不死孤狼  阅读(275)  评论(0编辑  收藏  举报