1 修改ulimit最大句柄为10240
cp /etc/security/limits.conf /etc/security/limits.conf_bak;
cp /etc/profile /etc/profile_bak;
touch /etc/security/limits.conf;
echo -e "* soft nofile 65535\n* hard nofile 65535" >> /etc/security/limits.conf ;
echo "ulimit -HSn 65535" >> /etc/profile;. /etc/profile ;
touch /etc/pam.d/sshd2;echo "auth required /lib/security/pam_pwcheck.so shadow" > /etc/pam.d/sshd2 ;
touch /etc/pam.d/system-auth;echo "session required /lib curity/pam_limits.so" > /etc/pam.d/system-auth;
rcssh2 restart
阅读(1520) | 评论(0) | 转发(0) |