修改 /etc/secrity/limit.conf 中的最大文件打开数不生效 解决办法
1. 确保 pam 生效
在 /etc/pam.d/login 中,存在:
session required pam_limits.so
2. 确保 ssh 使用 pam
在 /etc/pam.d/sshd 中,存在:
session required pam_limits.so
在 /etc/ssh/ssd_config 中, 存在:
UsePAM yes
vim /etc/pam.d/sshd
#%PAM-1.0 auth required pam_sepermit.so auth substack password-auth auth include postlogin # Used with polkit to reauthorize users in remote sessions -auth optional pam_reauthorize.so prepare account required pam_nologin.so account include password-auth password include password-auth # pam_selinux.so close should be the first session rule session required pam_selinux.so close session required pam_loginuid.so # pam_selinux.so open should only be followed by sessions to be executed in the user context session required pam_selinux.so open env_params session required pam_namespace.so session optional pam_keyinit.so force revoke session include password-auth session include postlogin # Used with polkit to reauthorize users in remote sessions -session optional pam_reauthorize.so prepare
努力让自己变得不那么low