其他分享
首页 > 其他分享> > Spring Boot 入门(十二)部署Elasticsearch

Spring Boot 入门(十二)部署Elasticsearch

作者:互联网

# 下载
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.2-linux-x86_64.tar.gz

# 解压
tar -zxvf /usr/local/elasticsearch-7.15.2-linux-x86_64.tar.gz

# 创建ES用户和用户组
groupadd elasticsearch
useradd elasticsearch -g elasticsearch -p elasticsearch

# 更改ES文件的所属用户组及用户
chown -R elasticsearch:elasticsearch /usr/local/elasticsearch-7.15.2

# 切换用户
su elasticsearch

# 前台启动ES
cd elasticsearch-7.15.2/bin
./elasticsearch

# 或者后台启动ES
cd elasticsearch-7.15.2/bin
./elasticsearch -d

# 测试连接ES,当结果输出JSON数据则说明ES启动成功
curl -XGET "127.0.0.1:9200"

# 关闭后台运行的ES
ps -aux|grep elasticsearch
kill -9 pid

 

标签:7.15,tar,Spring,用户组,Boot,cd,elasticsearch,Elasticsearch,ES
来源: https://www.cnblogs.com/xiaoxiaoyu0707/p/15716518.html