gpt4 book ai didi

limit - 如何在 Centos 6.4 x64 上更改 root 用户的限制打开文件

转载 作者:行者123 更新时间:2023-12-03 17:48:27 25 4
gpt4 key购买 nike

我尝试了几种方法来从 URL 更改打开文件限制

http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/

我已经改变了 limit.conf 和/etc/sysctl.conf

它与其他用户一起工作,但限制 root 的打开文件不会改变

/etc/security/limits.conf

#####
* - nproc 8500
* hard nofile 200000
* soft nofile 200000
* hard stack 8192
* hard sigpending 45056

root hard nofile 200000
root soft nofile 200000
root hard no file 200000

/etc/sysctl.conf
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
fs.file-max = 200000

重启服务器,然后
[root@ironman ~]# ulimit -n
8192

最后我在/etc/bashrc 下面添加命令,它也适用于 root 用户
我真的不明白为什么只在 sysctl.conf/limits.conf 上设置不会影响?

请指教

最佳答案

尝试添加 ulimit -n 200000进入 /etc/sysconfig/init文件并重新启动。

关于limit - 如何在 Centos 6.4 x64 上更改 root 用户的限制打开文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27644588/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com