CentOS/Debian/Ubuntu系统一键锐速+更换内核脚本

  • A+
所属分类:未分类

为了某些原因我们需要更换系统的本身的内核,vps加速使用的锐速,bbr都需要更换内核,下边以ubuntu系统来举例如何更换内核,非常的简单,

锐速或者是LotServer支持的内核列表:地址

系统要求:CentOS 6 7 /Debian 7 8 9 /Ubuntu 14 16

不支持openvz,不支持openvz,不支持openvz,不支持openvz,不支持openvz,

Centos:更换内核一键脚本   appex.sh是 LotServer脚本

wget --no-check-certificate https://www.vrrmr.net/55R/CTOSneihe.sh && bash CTOSneihe.sh (换内核)

1:wget --no-check-certificate -qO /tmp/appex.sh "https://www.vrrmr.net/55R/appex.sh" && bash /tmp/appex.sh 'install'(盟卡锐速)

2:备用:wget --no-check-certificate -qO /tmp/appex.sh "https://raw.githubusercontent.com/0oVicero0/serverSpeeder_Install/master/appex.sh" && bash /tmp/appex.sh 'install' (盟卡锐速)

3:wget -N --no-check-certificate https://www.vrrmr.net/55R/serverspeeder.sh && bash serverspeeder.sh(91锐速)

Debian/Ubuntun: LotServer+内核更换一键脚本

wget --no-check-certificate https://www.vrrmr.net/55R/rs_nh.sh && bash rs_nh.sh

 

新的锐速代码:(ub18有些更换内核可能会需要手动)

bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/Debian_Kernel.sh')
备用:
bash <(wget --no-check-certificate -qO- https://www.vrrmr.net/55R/Kernel.sh) #内核更换
bash <(wget --no-check-certificate -qO- https://github.com/xidcn/LotServer_Vicer/raw/master/Install.sh) install
备用:
bash <(wget --no-check-certificate -qO- https://www.vrrmr.net/55R/lotServerInstall.sh) install #安装
bash <(wget --no-check-certificate -qO- https://www.vrrmr.net/55R/lotServerInstall.sh) uninstall #卸载

手动安装说明:

1.查看当前系统内核

一般 ssh 登录信息页就可以看到内核信息了,比如窝是:

Welcome to Ubuntu 18.04.3LTS (GNU/Linux 4.15.0-88-generic )

或者使用 uname -r 查看

2.安装需要的内核:

锐速支持的内核可以在这里查看,我要安装的是 4.15.0-30-generic

sudo apt-get install linux-image-4.15.0-30-generic

有的需要点一下YES,有的不需要,看自己的系统情况,就是回车

3.卸载其他内核

1,查看系统现有内核

dpkg -l |grep linux-image

2,有的系统本身有多个内核存在,需要删多次,

卸载列出的其他内核:(蓝色的主要命令,后边的看你的内核有什么)

sudo apt-get purge  linux-image-4.15.0-88-generic linux-image-generic 4.15.0.88

3,这个内核卸载完成以后,最好在把上边查看的内核的代码打一遍,防止隐藏内核,

4.更新 grub 系统引导文件并重启

sudo update-grub

sudo reboot

这会你会发现可以安装加速了。

                    降级/切换 Ubuntu 系统 Linux 内核启动版本

1.查看系统可用的 Linux 内核

查看启动菜单 “Advanced options for Ubuntu” 的子选项,以确定可选的 Linux 内核信息:

grep menuentry /boot/grub/grub.cfg

可以看到子选项:

‘Ubuntu, with Linux 4.4.0-104-generic’

2.修改Grub,设置内核启动版本

用 vim 编辑器打开 grub 文件:

sudo vim /etc/default/grub

GRUB_DEFAULT=0 // 0表示系统当前启动的内核序号

修改为想要启动的内核版本对应子选项:

GRUB_DEFAULT=“Advanced options for Ubuntu > Ubuntu, with Linux 4.4.0-104-generic”

3.更新Grub

sudo update grub

或使用更标准的做法:

sudo grub-mkconfig -o /boot/grub/grub.cfg

此时如果有错误,则检查 GRUB_DEFAULT 是否所选 Linux 内核版本不在次级选项中,若是则需要将前面部分”Advanced options for Ubuntu>”去掉后重新执行。

无错误提示,即可reboot重启系统。

4.查看当前运行内核

查看系统当前运行内核信息,以确认降级是否成功。

uname -r(或-a)

5.安装Linux内核

查看可安装的内核:

sudo apt-cache search linux-image | grep generic

安装新内核:

          sudo apt-get install linux-image-4.4.0-108-generic

4.卸载Linux内核

sudo apt-get remove(或用purge) linux-image-4.4.0-105-generic

1

weinxin
我的QQ群
这是我的QQ群扫一扫

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: