ubuntu 16.04中limit 修改


第一,修改/etc/security/limits.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

ubuntu soft nproc 65535
ubuntu hard nproc 65535
ubuntu soft nofile 65535
ubuntu hard nofile 65535

注:不同的用户都要写进来,我这里ubuntu这个普通用户也添加了进来。

 

第二,修改 /etc/pam.d/common-session和/etc/pam.d/common-session-noninteractive:

两个文件中都需要添加:session required pam_limits.so

 

第三,修改 /etc/systemd/user.conf和/etc/systemd/system.conf:

两个文件中都需要添加:DefaultLimitNOFILE=65536


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM