Download and install the public signing key:
纯文本
1
2
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
You may need to install the apt-transport-https package on Debian before proceeding:
纯文本
1
2
sudo apt-get install apt-transport-https
Save the repository definition to
/etc/apt/sources.list.d/elastic-8.x.list:纯文本
1
2
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
You can install the Elasticsearch Debian package with:
纯文本
1
sudo apt-get update && sudo apt-get install elasticsearchYou can install the Kibana Debian package with:
纯文本
1
sudo apt-get update && sudo apt-get install kibana配置 ElasticSearch
Bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# /etc/elasticsearch/elasticsearch.yml
# 主机 ip + 端口
network.host: 192.168.88.68
http.port: 9200
# 开启 xpack
# Enable security features
xpack.security.enabled: true
# 禁用 https
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: false
生成随机密码
/usr/share/elasticsearch/bin/elasticsearch-reset-password --url http://192.168.88.68:9200 -u elastic纯文本
1
2
3
4
5
6
7
8
root@elasticsearch:/var/lib/elasticsearch# /usr/share/elasticsearch/bin/elasticsearch-reset-password --url http://192.168.88.68:9200 -u elastic
This tool will reset the password of the [elastic] user to an autogenerated value.
The password will be printed in the console.
Please confirm that you would like to continue [y/N]y
Password for the [elastic] user successfully reset.
New value: HkI1KAdJwi9HxcUMDb生成 kibana 访问 ES 的密码
/usr/share/elasticsearch/bin/elasticsearch-reset-password --url http://192.168.88.68:9200 -u kibana纯文本
1
2
3
4
5
6
7
8
root@elasticsearch:/var/lib/elasticsearch# /usr/share/elasticsearch/bin/elasticsearch-reset-password --url http://192.168.88.68:9200 -u kibana
This tool will reset the password of the [kibana] user to an autogenerated value.
The password will be printed in the console.
Please confirm that you would like to continue [y/N]y
Password for the [kibana] user successfully reset.
New value: lgigsc64CJ6+1w+KsW*q配置 kibana
YAML
1
2
3
4
5
6
elasticsearch.username: "kibana"
elasticsearch.password: "lgigsc64CJ6+1w+KsW*q"
# This section was automatically generated during setup.
elasticsearch.hosts: ['http://192.168.88.68:9200']安装分词器
注意版本一致
纯文本
1
2
/usr/share/elasticsearch/bin/elasticsearch-plugin install https://jansora.oss-cn-shanghai.aliyuncs.com/files/es/8.7.0/elasticsearch-analysis-ik-8.7.0.zip
/usr/share/elasticsearch/bin/elasticsearch-plugin install https://jansora.oss-cn-shanghai.aliyuncs.com/files/es/8.7.0/elasticsearch-analysis-pinyin-8.7.0.zip重启 ElasticSearch, Kibana

评论栏
分享你的想法,或参与下面的讨论。
参与讨论
支持 Markdown、代码和图片
友善交流,让讨论更有价值。
更多留言
加载中…