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
設定開機自啟
systemctl enable elasticsearch
個人微信公衆号:
作者:jiankunking 出處:http://blog.csdn.net/jiankunking