单机模式
# 安装elasticsearch
cd /home/software
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.2-linux-x86_64.tar.gz
tar -zxvf elasticsearch-7.6.2-linux-x86_64.tar.gz
# 将压缩包放到/home/software/data下
# es不能用root账户启动,需要新创建一个新用户,并且赋予权限
adduser esadmin
passwd 123456
chown -R esadmin:esadmin /home/software/data/elasticsearch-7.6.2
chmod +x bin/elasticsearch
## 启动es -d代表在后台启动 需要进入到bin目录下
./elastcsearch -d
## 设置账号密码登录 进入config目录下修改
vi elasticsearch.yml
# 在最后添加
xpack.security.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true
# 进入bin目录下重启服务,执行
elasticsearch-setup-passwords interactive
# 然后根据提示输入账号密码
标签:bin,tar,全家,centOS7,elasticsearch,esadmin,home,7.6,Elasticseatch
From: https://www.cnblogs.com/lbnotes/p/16813846.html