limits.conf路径为:/etc/security ,/etc/security/limits.d
~]$ ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 6857
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65535
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 2048
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
//临时生效
ulimit -n 65500
ulimit -u 4086
//永久生效,下面内容写入limits.conf
#开启core文件
* soft core unlimited
#软连接
* soft nproc 2048
#硬连接
* hard nproc 2048
#单用户
root soft nofile 65535
root hard nofile 65535
#all用户
* soft nofile 65535
* hard nofile 65535