Elasticsearch Install on Linux

教程传送门

下载安装包
<下载地址>

Install on Linux

# 解压缩
tar -xvf elasticsearch-7.11.2-linux-x86_64.tar.gz
# 创建 用户 此处必须创建 elasticsearch 用户才能启动 elasticsearch
adduser elasticsearch
passwd elasticsearch
# 授权
chown -R elasticsearch elasticsearch-7.11.2
su - elasticsearch
# 启动
sh bin/elasticsearch  -d
# 测试 是否运行成功
curl http://localhost:9200/


elasticsearch 配置:

# 修改/etc/security/limits.conf配置文件
vim /etc/security/limits.conf
#在最后新增配置
*               soft    nofile            65536 # 修改最大文件句柄数
*               hard    nofile            65536
*               soft    nproc            4896 # 修改最大线程数
*               hard    nproc            4896
# 修改/etc/sysctl.conf 配置文件
vim /etc/sysctl.conf
# 在最后新增配置
vm.max_map_count=262144

# 修改  elasticsearch-7.11.2/config/elasticsearch.yml 配置文件
vim elasticsearch-7.11.2/config/elasticsearch.yml
cluster.name: my-application
node.name: node-1
path.data: /usr/local/application/elasticsearch-7.11.2/data
path.logs: /usr/local/application/elasticsearch-7.11.2/logs
network.host: 192.168.79.128
http.port: 9200
cluster.initial_master_nodes: ["node-1", "node-2"]
 
重启 es;

传送门:

Dome of Elasticsearch in Github

启动失败的情况:


[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max number of threads [3818] for user [elasticsearch] is too low, increase to at least [4096]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[4]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值