關閉防火牆
chkconfig iptables off
增大系統打開文件句柄數量
vi /etc/security/limits.conf
在# End of file上面一行加入
* soft nofile 65536
* hard nofile 65536
如下圖:
保存後,重啓操作系統。用ulimit -a 命令查看是否修改成功。如下圖:
Linux環境下:在/etc/sysctl.conf文件中加入配置
net.ipv4.tcp_fin_timeout=30
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_tw_recycle=1
執行命令 sysctl -p
修改完後,不用重啓機器。