sysctl.con
# sysctl settings are defined through files in# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.## Vendors settings live in /usr/lib/sysctl.d/.# To override a whole file, create a new file with the same in# /etc/sysctl.d/ and put new settings there. To override# only specific settings, add a file with a lexically later# name in /etc/sysctl.d/ and put new settings there.## For more information, see sysctl.conf(5) and sysctl.d(5).net.ipv6.conf.eth0.accept_dad = 0net.ipv6.conf.eth0.accept_ra = 1net.ipv6.conf.eth0.accept_ra_defrtr = 1net.ipv6.conf.eth0.accept_ra_rtr_pref = 1net.ipv6.conf.eth0.accept_ra_rt_info_max_plen = 1vm.swappiness=0net.ipv4.neigh.default.gc_stale_time=120# see details in https://help.aliyun.com/knowledge_detail/39428.htmlnet.ipv4.conf.all.rp_filter=0net.ipv4.conf.default.rp_filter=0net.ipv4.conf.default.arp_announce=2net.ipv4.conf.lo.arp_announce=2net.ipv4.conf.all.arp_announce=2# see details in https://help.aliyun.com/knowledge_detail/41334.htmlnet.ipv4.tcp_max_tw_buckets=5000net.ipv4.tcp_syncookies=1net.ipv4.tcp_max_syn_backlog=1024net.ipv4.tcp_synack_retries=2net.ipv6.conf.all.disable_ipv6=1net.ipv6.conf.default.disable_ipv6=1net.ipv6.conf.lo.disable_ipv6=1kernel.sysrq=1vm.max_map_count=262144net.nf_conntrack_max=1048576net.netfilter.nf_conntrack_max=1048576net.bridge.bridge-nf-call-iptables=1
limit.cof
cat <<EOF>>/etc/security/limits.confroot soft nofile 65535root hard nofile 65535* soft nofile 65535* hard nofile 65535* soft nproc 65535* hard nproc 65535* soft core 0* hard core 0* soft stack unlimited* hard stack unlimited* soft memlock unlimited* hard memlock unlimitedEOF