Linux安装Elasticsearch8.x 记录

安装一下吧!

下载地址

Elasticsearch下载地址
kibana下载地址
Ik分词器下载地址(下不了,让别人帮忙下)

如果是阿里云服务器,记得开端口,不是的话,防火墙没关也要开端口

mkdir /usr/local/soft  #文件移进来

解压

cd /usr/local/soft
tar -zxvf elasticsearch-8.11.1-linux-x86_64.tar.gz -C /usr/local/
tar -zxvf kibana-8.11.1-linux-x86_64.tar.gz -C /usr/local
unzip -d /usr/local/elasticsearch-8.11.1/plugins/ik elasticsearch-analysis-ik-8.11.1.zip
mkdir /usr/local/elasticsearch-8.11.1/data

修改配置文件

elasticsearch.yml 配置

vim /usr/local/elasticsearch-8.11.1/config/elasticsearch.yml
cluster.name: es-01
node.name: es-node01
path.data: /usr/local/elasticsearch-8.11.1/data
path.logs: /usr/local/elasticsearch-8.11.1/logs
network.host: 0.0.0.0
http.port: 9200
#重要 8.x需要(启动后停止再去打开会出现,不用提前写)
xpack.security.enabled: false
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12
vim /usr/local/elasticsearch-8.11.1/config/jvm.options
# 512m 1g 2g 4g(默认) 根据机器大小决定
-Xms1g
-Xmx1g
vim /etc/sysctl.conf
vm.max_map_count=262145

kibana配置

vim /usr/local/kibana-8.11.1/config/kibana.yml
server.port: 5601
server.host: "0.0.0.0"
elasticsearch.hosts: ["http://你的ESIp:9200"]
i18n.locale: "zh-CN"

创建es用户并赋予权限

groupadd es
useradd es -g es -p es # -g 密码
chown -R es:es  /usr/local/elasticsearch-8.11.1/
chown -R es:es  /usr/local/elasticsearch-8.11.1/data
chown -R es:es  /usr/local/elasticsearch-8.11.1/logs

#kibana
chown -R es:es /usr/local/kibana-8.11.1/

启动

./usr/local/elasticsearch-8.11.1/bin/elasticsearch -d
nohup /usr/local/kibana-8.11.1/bin/kibana &

停止

kill -9 pid
  • 8
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值