# 1.elasticsearch安装(Linux)
1.下载elasticsearch
7.X版本自带java
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.7.0-linux-x86_64.tar.gz
1
2
2
2.安装elasticsearch
解压
tar -zxvf elasticsearch-7.7.0-linux-x86_64.tar.gz -C /opt
root不能运行elasticsearch
groupadd ymj
useradd ymj -g ymj
修改文件所有者
chown -R elk:elk /opt/elasticsearch-7.7.0-linux-x86_64/
切换用户
su ymj
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
3.配置
修改配置
vim config/elasticsearch.yml
添加
http.cors.enabled:true
http.cors.allow-origin:"*"
//电脑配置差可修改哦,修改文件配置,减少运行内存config/jvm.options
vim ./config/jvm.options
-Xms256m
-Xmx256m
进入文件夹并运行
cd elasticsearch-7.7.0-linux-x86_64
bin/elasticsearch
查看端口
curl http://localhost:9200
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
ElasticSearch关闭重启命令
1.查找ES进程
ps -ef | grep elastic
2.杀掉ES进程
kill -9 2382(进程号)
1
2
3
4
2
3
4
# 2.logstash安装(Linux)
1.下载logstash
wget https://artifacts.elastic.co/downloads/logstash/logstash-7.7.0.tar.gz
1
2.安装logstash
解压
tar -zxvf logstash-7.7.0.tar.gz -C /opt
1
2
2
3.基本使用
logstash -f logstash.conf //执行
logstash -f logstash.conf -t //测试
1
2
2
# 3.kibana安装(Linux)
1.下载kibana
wget https://artifacts.elastic.co/downloads/kibana/kibana-7.7.0-linux-x86_64.tar.gz
1
2.安装kibana
解压
tar -zxvf kibana-7.7.0-linux-x86_64.tar.gz -C /opt
修改文件所有者
chown -R elk:elk /opt/kibana-7.7.0-linux-x86_64/
修改配置
vim config/kibana.yml
进入文件夹并运行
cd kibana-7.7.0-linux-x86_64
bin/kibana
查看端口
curl http://localhost:5601
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
官方更新太快,我想哭