编辑 /etc/security/limits.conf文件
追加以下内容,root用户需单独配置,*代表其他所有用户。
root soft nofile 65535
root hard nofile 65535
root soft nproc 65535
root hard nproc 65535
* soft nofile 65535
* hard nofile 65535
* soft nproc 65535
* hard nproc 65535
logout退出后重新登录生效,若没有生效应该是编码问题,全部手写进去:wq保存,重新登录生效.