linux,修改限制文件句柄数目的方法

1559阅读 0评论2012-07-30 allenquan
分类:LINUX

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
上一篇:c语言查看文件是否存在--access()函数
下一篇:如何把很多结果一样的表放在一起统计---- merge表帮你解决烦恼