1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| vim /etc/sysctl.conf net.ipv4.tcp_timestamps = 1 net.ipv4.tcp_fin_timeout = 10 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_max_tw_buckets = 8000
vm.max_map_count = 262144 vm.swappiness = 10 sysctl –p
vim /etc/security/limits.conf * soft nofile 1024000 * hard nofile 2048000 * soft nproc 1024000 * hard nproc 2048000 root soft nproc unlimited ulimit -Sn ulimit -Hn
echo 'HISTTIMEFORMAT="%F %T `whoami`"' >> /etc/profile sed -i "s/HISTSIZE=1000/HISTSIZE=200/" /etc/profile
sed -i 's/UseDNS yes/UseDNS no/g' /etc/ssh/sshd_config sed -i 's/UsePAM yes/UsePAM no/' /etc/ssh/sshd_config
ps h -Led -o user | sort | uniq -c | sort -n
ps -o nlwp,pid,lwp,args -u boer | sort -n
vim /etc/security/limits.d/20-nproc.conf * soft nproc 1024000 root soft nproc unlimited
|