本文基于
本人使用的vps目前内核版本是4.10.2-1.el7.elrepo.x86_64,是为了使用bbr而升过级的,原先的内核是3.10.0-514.10.2.el7.x86_64。
如果你使用的不是centos7,可以查看https://github.com/0oVicero0/serverSpeeder_kernel/blob/master/SystemList.md来确认你需要安装的内核。
看了一下作者提供的支持内核版本centos7下有多个,我选择了其中最新的一个3.10.0-327.el7.x86_64。
下面列出以下安装步骤:
1 下载安装327版内核:
下载地址是 https://buildlogs.centos.org/c7.1511.00/kernel/20151119220809/3.10.0-327.el7.x86_64/
先准备辅助lib的安装
wget https://buildlogs.centos.org/c7.1511.00/kernel/20151119220809/3.10.0-327.el7.x86_64/kernel-tools-3.10.0-327.el7.x86_64.rpm wget https://buildlogs.centos.org/c7.1511.00/kernel/20151119220809/3.10.0-327.el7.x86_64/kernel-tools-libs-3.10.0-327.el7.x86_64.rpm rpm -ivh kernel-tools-3.10.0-327.el7.x86_64.rpm kernel-tools-libs-3.10.0-327.el7.x86_64.rpm --force #强制安装,因为本机有更高版本存在
安装内核
wget 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 rpm -ivh kernel-3.10.0-327.el7.x86_64.rpm --force
2 设置启动内核
grub2-mkconfig -o /boot/grub2/grub.cfg
看到的结果大致如下,各人的内核不一致,所以会有多少
Generating grub configuration file …
Found linux image: /boot/vmlinuz-4.10.2-1.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-4.10.2-1.el7.elrepo.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-514.10.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.10.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-514.2.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.2.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-327.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-327.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-8c51b04886234e47bf5385321ac3bcae
Found initrd image: /boot/initramfs-0-rescue-8c51b04886234e47bf5385321ac3bcae.img
Found linux image: /boot/vmlinuz-0-rescue-f93f471fcefa4190a918621cd9b830e9
Found initrd image: /boot/initramfs-0-rescue-f93f471fcefa4190a918621cd9b830e9.img
Found linux image: /boot/vmlinuz-0-rescue-b1feb1d0adc84bdca5097f5ea2b903ce
Found initrd image: /boot/initramfs-0-rescue-b1feb1d0adc84bdca5097f5ea2b903ce.img
这里可以看到vmlinuz-3.10.0-327.el7.x86_64这个内核处于第7个位置,,内核启动顺序是从0开始计数的,那么我们需要的启动内核就是设置为6,各位网友可以根据自己的实际情况判断该是使用什么内核启动,执行下列语句
grub2-set-default 6
3 重启系统,使内核生效,并查看一下内核是否已经是327版本了
reboot uname -a
正常情况下会显示内核已经是327了
3.10.0-327.el7.x86_64
4 开始安装lotserver
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
然后一路回车,就安装好了
会显示
[Running Status]
LotServer is running!
version 3.11.20.5[License Information]
License 469FCD1291AC52AC (valid on current device)
MaxSession unlimited
MaxTcpAccSession unlimited
MaxBandwidth(kbps) 1024000
ExpireDate 2035-12-31[Connection Information]
TotalFlow 4
NumOfTcpFlows 4
TotalAccTcpFlow 3
TotalActiveTcpFlow 0[Running Configuration]
accif eth0
acc 1
advacc 1
advinacc 0
wankbps 1000000
waninkbps 1000000
csvmode 0
subnetAcc 0
maxmode 0
pcapEnable 0
这时安装就完成了。
系统的安装目录是在根目录下的/appex目录内,一些执行文件位于 /appex/bin内
lotServer.sh 是控制文件
/appex/bin/lotServer.sh start #启动锐速 /appex/bin/lotServer.sh stop #停止锐速 /appex/bin/lotServer.sh restart #重启锐速 /appex/bin/lotServer.sh status #查看锐速状态
utils.sh是查看运行数据,会及时显示当前每秒进出流量,执行前需要安装BC 安装指令是 yum install bc -y
setConfig.sh 与showConfig.sh是设置以及显示配置
5 最后是卸载lotserver
wget --no-check-certificate -O appex.sh https://raw.githubusercontent.com/0oVicero0/serverSpeeser_Install/master/appex.sh && chmod +x appex.sh && bash appex.sh unstall