查看linux默認能最多開啟多少個文件數(shù)量
ulimit -n
1024
# vi /etc/security/limits.conf(修改文件開啟的限制)
#<domain> <type> <item> <value> #
#* soft core 0 #* hard rss 10000 #@student hard nproc 20 #@faculty soft nproc 20 #@faculty hard nproc 50 #ftp hard nproc 0 #@student - maxlogins 4 * soft nofile 65535 * hard nofile 65535 (添加的兩行) # End of file 保存退出
執(zhí)行下面兩條命令
ulimit -Hn 65535 ulimit -Sn 65535
最后要重啟后系統(tǒng)才生效
再查看ulimit -n
[root@localhost ~]# ulimit -n 65535 打開文件數(shù)限制已調(diào)到最大
|