sed -i 's/enforcing/disabled/' /etc/selinux/config
setenforce 0
/usr/bin/systemctl stop firewalld.service
/usr/bin/systemctl disable firewalld.service
yum -y install gcc gcc-c++ lrzsz vim wget zlib curl ntpdate
ntpdate time .windows.com
cat >> /etc/crontab <<EOF
> 00 10 * * * /udr/sbin/ntpdate time .windows.com; /usr/sbin/hwclock -w > /dev/null 2>&
EOF
ulimit -SHn 65530
echo “ * soft nofile 65535' >> /etc/sysctl .conf
echo " * hard nofile 65535" >> /etc/sysctl .conf
echo "* hard nproc 1204000" >> /etc/security/limits .conf
echo "* soft nproc 1204000" >> /etc/security/limits .conf
sed -i 's@LANG=.*$@LANG=\"en_US.UTF-8\"@g' /etc/sysconfig/i18n
cat >> /etc/sysctl .conf << EOF
net.ipv4.tcp_abort_on_overflow = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 20
net.ipv4.tcp_retries1 = 2
net.ipv4.tcp_retries2 = 5
net.ipv4.tcp_max_orphans = 2000
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.tcp_keepalive_intvl = 15
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_synack_retries = 3
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
EOF
sysctl -p
chattr +a /var/log/messages
(责任编辑:IT) |