赞
踩
平时用centos比较多,由于aws的lightsail没有centos版本,只能选择ubuntu16.04的版本,拿到一台服务器后,首先得修改连接限制,修改/etc/security/limits.conf后发现根本不起作用,重启后依然不行,结果一番尝试后,解决方案如下:
vim /etc/pam.d/su,找到下列行
- # Sets up user limits, please uncomment and read /etc/security/limits.conf
- # to enable this functionality.
- # (Replaces the use of /etc/limits in old login)
- #下面这一行一定要打开
- session required pam_limits.so
vim /etc/security/limits.conf
- * soft nofile 65534
- * hard nofile 65534
- root soft nofile 65534
- root hard nofile 65534
这样重启后就能生效,ubuntu的root用户必须注明用户
转载来源:https://blog.csdn.net/yuchunhai321/article/details/85985621
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。