1.下载
通过网盘分享的文件:es
链接: https://pan.baidu.com/s/1JO07VJ8nVsfyC0TzHaLGKw?pwd=1dgu 提取码: 1dgu
2.创建 es 用户, es 无法使用root用户启动
# 创建用户组+用户 groupadd es useradd-m-g es es # 设置密码(可选) passwd es #Es@123456
3.解压文件
cd/usr/local mkdir softes tar-xzf/home/soft/elasticsearch-7.13.2-linux-x86_64.tar.gz
4.修改配置文件 /usr/local/softes/elasticsearch-7.13.2/config/elasticsearch.yml
http.port:9200# 端口 http.host:0.0.0.0# (也可以这样) 主机地址,这里写本机 http.cors.enabled:ture # 设置跨域 http.cors.allow-origin:"*"#设置访问![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/3dac0483f9ba46b883bc37b1c2b16c05.png![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/9dbc177c13834df58afd2416aa09696a.png
5.赋予权限
chown-Res/usr/local/softes
6.切换用户
su es # 可以新开一个窗口方便操作
7.启动项目 /usr/local/softes/elasticsearch-7.13.2/bin
cd/usr/local/softes/elasticsearch-7.13.2/bin # d 表示后台启动./elasticsearch-d # 查找端口 ps-ef|grep elastic # 停止服务直接杀掉进程号就行 kill-9...8.访问地址
http://192.168.138.128:9200/# 我是虚拟机
9.设置开机自启
vim/etc/systemd/system/es.service[Unit]Description=ElasticsearchAfter=network.target[Service]Type=forkingUser=esGroup=esExecStart=/usr/local/softes/elasticsearch-7.13.2/bin/elasticsearch-d-p pidRestart=alwaysLimitNOFILE=65535LimitNPROC=4096[Install]WantedBy=multi-user.target# 刷新系统配置 systemctl daemon-reload # 启动 systemctl start es # 状态 systemctl status es
10.安装部署 Kibana
tar-zxvf/home/soft/kibana-7.13.2-linux-x86_64.tar.gz mv kibana-7.17.23-linux-x86_64/kibana-7.13.2![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/74fd62fa8f5143f2a7f366855b5e501b.png
11.修改 Kibana 配置文件
cd/usr/local/softes/kibana-7.13.2/config vi kibanba.yml# 服务端口 server.port:5601# 服务器 ip 所以 ip 可以访问 server.host:"0.0.0.0"#Elasticsearch服务地址 elasticsearch.hosts:["http://localhost:9200"]# 设置语言为中文 i18n.locale:"zh-CN"12.授权并切换用户给 es 用户授予 kibana 目录的权限
chown-Res/usr/local/softes/kibana-7.13.2/![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/820e6fb349794684a9473fc47b08691c.png
13.启动 Kibana
cd/usr/local/softes/kibana-7.13.2/bin # 前台启动./bin/kibana #后台启动 nohup./bin/kibana访问
http://192.168.138.128:5601/app/home#/tutorial_directory
14.配置开机自启
vim/etc/systemd/system/ki.service[Unit]Description=KibanaAfter=network.target[Service]User=esGroup=esWorkingDirectory=/usr/local/softes/kibana-7.13.2ExecStart=/usr/local/softes/kibana-7.13.2/bin/kibanaRestart=alwaysLimitNOFILE=65535[Install]WantedBy=multi-user.targetsystemctl daemon-reload systemctl enable kibana systemctl start kibana
15.安装 分词器