CnetOS 7 elasticsearch service 开机自启

版权声明:作者:jiankunking 出处:http://blog.csdn.net/jiankunking 本文版权归作者和CSDN共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。 https://blog.csdn.net/xunzaosiyecao/article/details/82770832
vi /etc/security/limits.conf

添加如下内容:

soft nofile 65536
hard nofile 131072
soft nproc 2048
hard nproc 4096

在/etc/systemd/system目录下创建elasticsearch.service文件

[Unit]
Description=elasticsearch
[Service]
User=elasticsearch
LimitNOFILE=100000
LimitNPROC=100000
ExecStart=/usr/local/elasticsearch/bin/elasticsearch
[Install]
WantedBy=multi-user.target

个人微信公众号:
这里写图片描述

作者:jiankunking 出处:http://blog.csdn.net/jiankunking

猜你喜欢

转载自blog.csdn.net/xunzaosiyecao/article/details/82770832