1.1 问题 五 Centos 、Ubuntu ulimit 修改 65535
1.4.1 查看原始 ulimit 配置大小
root@localhost:~# ulimit -n
1024
1.4.2 Centos 修改
echo 修改参数
[root@zabbix3-2 shell] /bin/echo '* - nofile 65535' >>/etc/security/limits.conf
查看
[root@zabbix3-2 shell] /usr/bin/tail -1 /etc/security/limits.conf
[root@zabbix3-2 shell] reboot 重启服务器生效
[root@zabbix3-2 shell]# ulimit -n
65535
1.4.3 Ubunut 修改
下面这个通过修改系统配置文件来全局生效的方法,该文件是: /etc/security/limits.conf。
例如想要把所有用户的文件描述符数量限制修改为 65535,可以这样配置:
root@localhost:~# vim /etc/security/limits.conf
* soft nofile 65535
* hard nofile 65535
root soft nofile 65535
root hard nofile 65535
root@localhost:~#重启服务器生效
root@localhost:~# ulimit -n
65535
有需要可以联系微信xuebao19930721和加入微信群