• 为什么写博客,是因为遇到的坑,不希望别人在踩一遍!
  • 选择了,剩下的就是坚持和努力-------致自己!
  • 当能力达不到梦想时,更需要学习,努力,拼搏

问题 五 Centos 、Ubuntu ulimit 修改 65535

Linux运维 雪豹 6年前 (2018-02-09) 621次浏览 0个评论

images

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

images

root@localhost:~#重启服务器生效
root@localhost:~# ulimit -n
65535


有需要可以联系微信xuebao19930721和加入微信群
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址