修改 /etc/security/limit.conf 文件
写入下面内容
* soft nproc 65535
* hard nproc 65535
* soft nofile 65535
* hard nofile 65535
root soft nproc 65535
root hard nproc 65535
root soft nofile 65535
root hard nofile 65535
bro soft nproc 65535
bro hard nproc 65535
bro soft nofile 65535
bro hard nofile 65535
注意,这里是每一个用户都要配置,网上有人说只有 root 用户才需要单独写出来,不过我试的时候发现, bro (普通用户) 没有写在这里的时候也没生效。
su bro re login
添加 common-session
在 /etc/pam.d/common-session
,添加下面内容:
session required pam_limits.so