0


linux 卸载elasticsearch及安装elasticsearch8.5(rpm)

卸载elasticsearch

检查elasticsearch服务状态

systemctl status elasticsearch.service;

停止elasticsearch服务状态

systemctl stop elasticsearch.service;

剔除elasticsearch服务

systemctl disable elasticsearch;

重载系统服务

systemctl daemon-reload;

查询rpm安装的elasticsearch

rpm -qa | grep elasticsearch;

rpm卸载elasticsearch,elasticsearch-6.7.2-1.noarch名称 需要根据查询上一步查询结果来

rpm -e --nodeps elasticsearch-6.7.2-1.noarch;

删除残留文件

rm -rf /etc/elasticsearch;

删除elasticsearch自定义文件

rm -rf /opt/software/elasticsearch;

rpm安装elasticsearch8.5

#下载elasticsearch8.5安装包

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.5.0-x86_64.rpm

#解压

rpm -ivh elasticsearch-8.5.0-x86_64.rpm

解压之后的文件位置为:

主程序 /usr/share/elasticsearch/

配置文件 /etc/elasticsearch

初始化脚本 /etc/init.d/elasticsearch

修改配置

vi /etc/elasticsearch/elasticsearch.yml

cluster.name: elstic
node.name: elastic-1
path.data: /opt/elasticsearch/data
path.logs: /opt/elasticsearch/log
network.host: 0.0.0.0
network.bind_host: 0.0.0.0
http.port: 9200
discovery.seed_hosts: ["elastic-1"]
cluster.initial_master_nodes: ["elastic-1"]
xpack.security.enabled: false
xpack.security.enrollment.enabled: false
xpack.security.http.ssl:
  enabled: false

#创建配置中设置的文件夹并授权

#准备启动

cd /etc/elasticsearch/
systemctl enable elasticsearch.service
systemctl start elasticsearch.service
systemctl status elasticsearch.service


本文转载自: https://blog.csdn.net/qq_48302234/article/details/128578824
版权归原作者 miraitowa.cn 所有, 如有侵权,请联系我们删除。

“linux 卸载elasticsearch及安装elasticsearch8.5(rpm)”的评论:

还没有评论