1、操作系统版本为CentOS Linux release 7.6.1810

2、ulimit -n查看大小,默认是1024

3、ulimit -n 204800 临时设置下只在此终端下有效

4、永久生效的方法:
修改/etc/security/limits.conf文件
# End of file
* soft nofile 204800
* hard nofile 204800
* soft nproc 204800
* hard nproc 204800
* # 代表针对所有用户
noproc #是代表最大进程数
nofile #是代表最大文件打开数

5、重启操作系统

6、重启后用root用户进行测试
ulimit -n

7、新建普通用户进行测试
