max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

安装elasticsearch报错如下:

max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

编辑 /etc/security/limits.conf,追加以下内容;
* soft nofile 65536
* hard nofile 65536
此文件修改后需要重新登录用户,才会生效

登录后使用ulimit -S -n/ulimit -H -n查看