Linux设置最大打开文件数量rlimit NOFILE

第一步:

vim /etc/security/limits.conf

添加如下内容:

liheyuan soft nofile 10240

liheyuan hard nofile 10240

liheyuan是用户名,根据你自己的更改

第二步:

vim /etc/pam.d/login

确认下列打开

session    required   pam_limits.so

Leave a Reply

Your email address will not be published. Required fields are marked *