|
|
本帖最后由 nic2013 于 2016-12-7 01:23 编辑
其实也不是什么大问题,到控制面板重启一下小鸡就可以了。
但是我还是想知道是哪里优化错了,下面是优化内核的内容。优化内核是为了装锐速。
centos 6 64位新装的系统。
1 ,先 yum install glibc -y ,重启小鸡。
2, yum -y update ,重启小鸡。
3,更换 kernel-firmware-2.6.32-504.3.3.el6.noarch 内核。重启小鸡。
4,内核文件修改,清空并修改/etc/sysctl.conf文件内容
内容如下:
- fs.file-max = 51200
- net.core.rmem_max = 67108864
- net.core.wmem_max = 67108864
- net.core.netdev_max_backlog = 250000
- net.core.somaxconn = 3240000
- 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_rmem = 4096 87380 67108864
- net.ipv4.tcp_wmem = 4096 65536 67108864
- net.ipv4.tcp_mtu_probing = 1
- net.ipv4.tcp_mem = 25600 51200 102400
- net.ipv4.tcp_congestion_control = hybla
复制代码
5,修改 /etc/security/limits.conf 文件,在末尾加上
- * soft nproc 65535
- * hard nproc 65535
- * soft nofile 65535
- * hard nofile 65535
复制代码
6,修改 /etc/pam.d/login 文件,在末尾加上
- session required /lib/security/pam_limits.so
复制代码
7,修改 /etc/profile 文件,在文件末尾加入以下内容
8,重启小鸡,运行下面2条命令
- ulimit -n #运行后得到65535结果为设置成功
- sysctl -p #运行后将内核参数生效
复制代码
9,重启小鸡。
至此优化内核完毕(锐速还未安装),我也是在网上找的教程,不知道对错。然后重启小鸡的时候,有时候会重启失败,如下图:
QQ截图20161206191125.jpg
(166.37 KB, 下载次数: 0)
求老司机解答一下,哪里优化的有问题。
我这个是 speedykvm 家达拉斯的。 好像 virmach 家的也有这个情况。
|
|