目录
卸载elasticsearch
rpm安装elasticsearch8.5
卸载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://www.toymoban.com/news/detail-780130.html
文章来源地址https://www.toymoban.com/news/detail-780130.html
到了这里,关于linux 卸载elasticsearch及安装elasticsearch8.5(rpm)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!