Centos7基礎網絡優化

後綴為純粹是為了在編輯器下代碼顯示更好看而設置
以下過程切記不要少回車
連接至服務器,複製以下內容並回車

yum clean all
yum install screen -y
screen -S temp

然後複製以下內容並回車

yum update -y
yum install epel-release -y
yum install net-tools wget vim unzip zip python-pip iptables -y
yum -y groupinstall "Development Tools"
echo "* soft nofile 51200
* hard nofile 51200" >> /etc/security/limits.conf
echo "fs.file-max = 51200
net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.core.netdev_max_backlog = 250000
net.core.somaxconn = 4096
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 10000 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_mem = 25600 51200 102400
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_congestion_control = hybla" >> /etc/sysctl.conf
echo "session required pam_limits.so" >> /etc/pam.d/login
rpm -ivh https://buildlogs.centos.org/c7.1511.00/kernel/20151119220809/3.10.0-327.el7.x86_64/kernel-3.10.0-327.el7.x86_64.rpm --force
wget -4qO- softs.pw/Bash/Get_Out_Spam.sh|bash
reboot

稍等片刻,鏈接後複製以下內容並回車

wget --no-check-certificate -O appex.sh https://raw.githubusercontent.com/0oVicero0/serverSpeeser_Install/master/appex.sh && chmod +x appex.sh && bash appex.sh install

现在我们来看看网速

pip install --upgrade pip
pip install speedtest-cli
speedtest-cli
cd
rm -rf *
curl myip.ipip.net
Last modification:April 6th, 2017 at 10:03 pm

2 comments

  1. 微课堂

    厉害了,大佬

  2. 童年山河

    国破山河在,陈村草木深.OωO

Leave a Comment