操作如下:

ulimit -a      #查看现有各个限制值情况

ulimit -n      #查看现有打开文件打开数量最大值

cat /proc/sys/fs/file-max         #查看本Linux最大打开文件打开数限制

echo ' *               soft  nofile 409600 ' >> /etc/security/limits.conf        #修改

echo ' *               hard nofile 409600 ' >> /etc/security/limits.conf        #修改

echo ' *               soft  nproc    409600 ' >> /etc/security/limits.conf        #修改

echo ' *               hard   nproc   409600' >> /etc/security/limits.conf        #修改

echo '  ' >> /etc/security/limits.conf        #添加空白行

ulimit -n  409600     #即时调整生效

ulimit -n      #查看更新后的文件打开数量最大值

more /etc/security/limits.conf

ulimit -a 

posted on 2017-04-09 19:35  流浪在伯纳乌  阅读(2577)  评论(0编辑  收藏  举报