Centos设置limit最大打开文件数和最大进程数
在/etc/security/limits.conf添加
cat > /etc/security/limits.conf <<EOF * soft nofile 65536 * hard nofile 65536 * soft nproc 131072 * hard nproc 131072 EOF
如果是cento6.x, /etc/security/limits.d/90-nproc.conf会覆盖/etc/security/limits.conf中的设置, 所以简单方法, 清空/etc/security/limits.d/90-nproc.conf
echo -n > /etc/security/limits.d/90-nproc.conf