Waiting~G

一起走过的日子

Archive for 三月, 2013

修改Linux文件句柄总结

without comments

linux下修改文件句柄数,比较杂,少一句或者两句,就会出现一些这样或那样的问题;

本次总结了一下,如下

root下执行: 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   10240\n* hard nofile   10240” >> /etc/security/limits.conf ;

echo “ulimit -HSn 10240” >> /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

Read the rest of this entry »

Written by Skyma

三月 1st, 2013 at 6:18 上午

Posted in 学.Linux