Debian/Ubuntu 内核降级教程 —— 降低(BBR)为支持锐速的内核版本

本文最后更新于 2017年6月11日 02:37 可能会因为没有更新而失效。如已失效或需要修正,请留言!

前段时间BBR出世后,很多人都去尝鲜了,有的人觉得比锐速加速效果好,有的觉得不如锐速,总之加速效果不同因素影响都不同。

而因为BBR是集成于内核中的一个功能,所以 卸载BBR=更换内核 ,但是很多人不知道怎么更换,一般都是直接重装系统,以回到支持安装锐速的内核版本,今天有人问我了,于是我就简单研究研究写个手动教程好,并不难。


测试环境

Debian 7 x64 和 Ubuntu 14.04 系统,当前内核为 v4.10.1 (支持BBR的最新稳定版内核) 测试通过,Debian 8 暂时没测试(应该差不多的)。

至于其他系统,步骤就完全不一样了,所以不做测试。

OpenVZ不支持更换内核,不支持 锐速和BBR,所以请不要尝试下面的步骤,否则后果自负!

Debian的准备工作(Ubuntu请跳过)

添加软件包源并更新包列表

echo -e "/ndeb http://ftp.debian.org/debian/ wheezy-backports main" >> /etc/apt/sources.list
apt-get update

安装内核

查询可用内核列表

aptitude search linux-image | awk '{print $2}'

执行代码后可以看到很多内核版本,Debian 7 x64 系统选择 linux-image-3.2.0-4-amd64 内核,这个内核大部分 Debian 7 系统都是使用,完美支持锐速和LotServer。而Ubuntu 14.04 则选择 linux-image-3.13.0-32-generic 内核。

锐速支持的内核看这里:传送门

Debian和Ubuntu唯一的区别就是这里提示的内核名称不一样,和下面安装内核用的命令略有区别,其他都通用!

# VPS提示示例/64位 #
# Debian 7 和 8 可能不一样,还有 64位和32位 内容也不一样。

[email protected]:~# aptitude search linux-image | awk '{print $2}'
linux-image
linux-image-2.6-amd64
linux-image-3.16.0-0.bpo.4-amd64
linux-image-3.16.0-0.bpo.4-amd64-dbg
linux-image-3.2.0-4-amd64
linux-image-3.2.0-4-amd64-dbg
linux-image-3.2.0-4-rt-amd64
linux-image-3.2.0-4-rt-amd64-dbg
linux-image-4.10.1-041001-generic

# Ubuntu 14.04 提示内容 #
...
linux-image-3.13.0-32-generic
linux-image-3.13.0-32-generic:i386
linux-image-3.13.0-32-lowlatency
linux-image-3.13.0-32-lowlatency
...
# 多余的我都省略了,写出来意义不大 #

Debian 安装内核

# 示例 #
apt-get -t wheezy-backports install linux-image-3.2.0-4-amd64 -y
# 示例 #

Ubuntu 安装内核

# 示例 #
apt-get install linux-image-3.13.0-32-generic -y
# 示例 #

卸载内核

查看当前系统所有内核

dpkg -l|grep linux-image | awk '{print $2}'
# VPS提示示例/64位 #
# Debian 7 和 8 可能不一样,还有 64位和32位 内容也不一样。

[email protected]:~# dpkg -l|grep linux-image | awk '{print $2}'
linux-image-3.2.0-4-amd64
linux-image-4.10.1-041001-generic

# Ubuntu 14.04 提示内容 #
linux-image-3.13.0-32-generic
linux-image-4.10.1-041001-generic

卸载其余内核

apt-get purge 其余内核名称 -y

从上面示例中可以看到,除了刚才安装的 linux-image-3.2.0-4-amd64 内核外,还剩下一个内核 linux-image-4.10.1-041001-generic ,我们需要卸载这个内核:

# 示例 #
apt-get purge linux-image-4.10.1-041001-generic -y
# 示例 #

结尾工作

关闭 BBR(如有)

sed -i '/net/.core/.default_qdisc=fq/d' /etc/sysctl.conf && sed -i '/net/.ipv4/.tcp_congestion_control=bbr/d' /etc/sysctl.conf
sysctl -p
# 清除BBR启动代码并保存,执行并不会提示任何信息。

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

update-grub
# reboot是重启服务器
reboot

如果有什么问题请在下面告诉我。

转载请超链接注明:月下博客 » Debian/Ubuntu 内核降级教程 —— 降低(BBR)为支持锐速的内核版本
责任声明:本站一切资源仅用作交流学习,请勿用作商业或违法行为!如造成任何后果,本站概不负责!

One thought on “Debian/Ubuntu 内核降级教程 —— 降低(BBR)为支持锐速的内核版本

留言评论

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select * from vps_autoblog_queue where is_running >0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select count(*) from vps_autoblog_queue where task_id=6 and is_running>0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,fetched,is_running,last_date_time from vps_autoblog_queue where task_id=6 and source_url_key='85f8e27ce55bd78fd33f47d2b1409198'

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
insert into vps_autoblog_queue(task_id,source_url,source_url_key,create_date_time,not_check_stoped,post_interval) values(6,'https://www.hijk.pw/post-sitemap.xml','85f8e27ce55bd78fd33f47d2b1409198',1750364551,0,0)

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select count(*) from vps_autoblog_queue where task_id=4 and is_running>0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,fetched,is_running,last_date_time from vps_autoblog_queue where task_id=4 and source_url_key='54b1dccf98c13c81f546faf82132bc77'

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
insert into vps_autoblog_queue(task_id,source_url,source_url_key,create_date_time,not_check_stoped,post_interval) values(4,'https://ssr.tools/sitemap-posttype-post.2020.xml','54b1dccf98c13c81f546faf82132bc77',1750364551,0,0)

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select count(*) from vps_autoblog_queue where task_id=2 and is_running>0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,fetched,is_running,last_date_time from vps_autoblog_queue where task_id=2 and source_url_key='91372ddcd9e4809b115feaa5b6f00815'

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
insert into vps_autoblog_queue(task_id,source_url,source_url_key,create_date_time,not_check_stoped,post_interval) values(2,'https://tlanyan.me/post-sitemap.xml','91372ddcd9e4809b115feaa5b6f00815',1750364551,0,0)

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select count(*) from vps_autoblog_queue where task_id=7 and is_running>0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,fetched,is_running,last_date_time from vps_autoblog_queue where task_id=7 and source_url_key='569e17863f7693f1afa9e9256af9dcff'

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
insert into vps_autoblog_queue(task_id,source_url,source_url_key,create_date_time,not_check_stoped,post_interval) values(7,'https://aisoa.cn/sitemap.xml','569e17863f7693f1afa9e9256af9dcff',1750364551,0,0)

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select count(*) from vps_autoblog_queue where task_id=9 and is_running>0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,fetched,is_running,last_date_time from vps_autoblog_queue where task_id=9 and source_url_key='cc9416f8df40d8c3a48e66856b1cd6fd'

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
insert into vps_autoblog_queue(task_id,source_url,source_url_key,create_date_time,not_check_stoped,post_interval) values(9,'https://www.v2rayssr.com/sitemap.xml','cc9416f8df40d8c3a48e66856b1cd6fd',1750364551,0,0)

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select count(*) from vps_autoblog_queue where task_id=10 and is_running>0

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,fetched,is_running,last_date_time from vps_autoblog_queue where task_id=10 and source_url_key='74714f67855820f0c701ce905b231f27'

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
insert into vps_autoblog_queue(task_id,source_url,source_url_key,create_date_time,not_check_stoped,post_interval) values(10,'https://doubibackup.com/sitemap.xml','74714f67855820f0c701ce905b231f27',1750364551,0,0)

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,is_running,last_post_time,post_interval,not_check_stoped from vps_autoblog_queue WHERE is_running>0 and fetched=0 order BY id ASC

WordPress数据库错误: [Table 'ssrvps.vps_autoblog_queue' doesn't exist]
select id,sn_id from vps_autoblog_queue WHERE is_running=0 and fetched=0 order BY id ASC LIMIT 1