Linux
01.系统维护
CPU
内存
drop_cache为什么有些不释放
swap交换分区
磁盘
lvm磁盘扩容
文件夹加密ecryptfs-utils
linux挂载ISCSI磁盘
创建lvm
fstab挂载文件系统
systemd.mount
存储故障
曲线为目录配置限额
lvm缩容
进程
如何找到某一个正在运行的进程?
CRIU进程快照
网络
TCP连接的10种状态
Ubuntu禁用ipv6
close_wait数量过多阻塞网络连接
IP地址与二进制转换
支持ACME的DNS服务器PowerDNS
系统
CentOS版本及对应默认内核版本
修改shell语言
系统启动流程
cgroup
CentOS7升级内核并开启BBR
配置内核参数优化linux
更新grub2默认启动的内核
CentOS-SCLo源
修改键盘映射
Debian12升级时内核编译错误
timesync(ntp)
内核
drop_caches
软件
更新openssl
GUI
Gnome Workspace Names
02.系统安全
Auditd审计服务配置
ssh登陆免公钥验证
恶意脚本处置
2023挖矿脚本m0nad
为ssh服务添加多因子认证
03.基本概念
Out Of Memory
70.QEMU
磁盘格式转换
80.LFS
90.常用脚本
使用except修改操作系统密码
init.d脚本模板
shell脚本判断参数数量
安装oh-my-zsh
systemd脚本模板
端口测试
适用于truenas的ipv6阿里云ddns脚本
更新nginx白名单
将文件改名为md5值
djvu转换为pdf并ocr
99.常用命令
man page中命令后的数字释义
tcpdump
nslookup
nc
rsync
awk
sed
echo
rm
tar
chage
auditctl
ausearch
ab
openssl
parted
find
date
firewall-cmd
sort
vmstat
nice-调整进程的优先级
top
taskset-进程绑定CPU核心
iptables
iostat
sysctl
tr
rpmbuild
转载nginx.spec含说明
安装使用rpmbuild
unpacked files found
grep
vimtutor
tlinux - tos
snmpwalk
chattr
本文档使用 MrDoc 发布
-
+
首页
CentOS7升级内核并开启BBR
# CentOS7升级内核并开启BBR ## BBR BBR是拥塞控制算法,传统拥塞控制算法如:RENO CUBIC当出现拥塞时,会大幅减少发送数据窗口,导致传输速率降低。开启BBR可以优化丢包率较高的线路的带宽使用率。 ## 内核升级 升级内核有多种方法,小版本升级可以用 yum update 直接搞定,大版本升级有源码升级和 ELRepo 库升级两种方法。 ## 安装 ELRepo 库 [ELRepo官网连接](http://elrepo.org/tiki/HomePage "ELRepo官网连接") ``` rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm ``` ## 安装新版本内核 1. 查看当前内核版本 ```shell [root@ihoiwan maintaintools]# uname -r 3.10.0-957.21.3.el7.x86_64 ``` 2. 安装新版内核 ```shell # 查看长期支持版内核信息 [root@ihoiwan maintaintools]# yum --disablerepo=\* --enablerepo=elrepo-kernel info kernel-lt Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * elrepo-kernel: mirror-hk.koddos.net Available Packages Name : kernel-lt Arch : x86_64 Version : 5.4.140 Release : 1.el7.elrepo Size : 50 M Repo : elrepo-kernel Summary : The Linux kernel. (The core of any Linux-based operating system.) URL : https://www.kernel.org/ License : GPLv2 Description : This package provides the Linux kernel (vmlinuz), the core of any : Linux-based operating system. The kernel handles the basic functions : of the OS: memory allocation, process allocation, device I/O, etc. # 开始安装,记得提前备份系统 [root@ihoiwan maintaintools]# yum --disablerepo=\* --enablerepo=elrepo-kernel install kernel-lt Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * elrepo-kernel: mirror-hk.koddos.net Resolving Dependencies --> Running transaction check ---> Package kernel-lt.x86_64 0:5.4.140-1.el7.elrepo will be installed --> Finished Dependency Resolution Dependencies Resolved =================================================================================================================================================================== Package Arch Version Repository Size ===================================================================================================================================================================Installing: kernel-lt x86_64 5.4.140-1.el7.elrepo elrepo-kernel 50 M Transaction Summary ===================================================================================================================================================================Install 1 Package Total download size: 50 M Installed size: 227 M Is this ok [y/d/N]: y Downloading packages: kernel-lt-5.4.140-1.el7.elrepo.x86_64.rpm | 50 MB 00:00:04 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : kernel-lt-5.4.140-1.el7.elrepo.x86_64 1/1 Verifying : kernel-lt-5.4.140-1.el7.elrepo.x86_64 1/1 Installed: kernel-lt.x86_64 0:5.4.140-1.el7.elrepo Complete! # 安装成功!检查一下 [root@ihoiwan maintaintools]# rpm -qa |grep kernel-lt kernel-lt-5.4.140-1.el7.elrepo.x86_64 ``` 3. 修改启动内核版本 ``` # 查看当前内核版本 [root@ihoiwan ~]# grub2-editenv list saved_entry=CentOS Linux (3.10.0-957.21.3.el7.x86_64) 7 (Core) # 查看启动项 [root@ihoiwan ~]# cat /boot/grub2/grub.cfg |grep "CentOS Linux" menuentry 'CentOS Linux (5.4.140-1.el7.elrepo.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.el7.x86_64-advanced-1114fe9e-2309-4580-b183-d778e6d97397' { menuentry 'CentOS Linux (3.10.0-957.21.3.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.el7.x86_64-advanced-1114fe9e-2309-4580-b183-d778e6d97397' { menuentry 'CentOS Linux (3.10.0-957.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.el7.x86_64-advanced-1114fe9e-2309-4580-b183-d778e6d97397' { menuentry 'CentOS Linux (0-rescue-20190711105006363114529432776998) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-20190711105006363114529432776998-advanced-1114fe9e-2309-4580-b183-d778e6d97397' { # 一共有四条启动项,我们要是用的是新安装的版本所以,修改默认启动项 [root@ihoiwan ~]# grub2-set-default 'CentOS Linux (5.4.140-1.el7.elrepo.x86_64) 7 (Core)' [root@ihoiwan ~]# grub2-editenv list saved_entry=CentOS Linux (5.4.140-1.el7.elrepo.x86_64) 7 (Core) ``` ## 开启BBR 修改完启动项以后,开启BBR ``` # 查看当前使用的阻塞控制算法 [root@ihoiwan ~]# sysctl net.ipv4.tcp_available_congestion_control net.ipv4.tcp_available_congestion_control = cubic reno # 修改为BBR [root@ihoiwan ~]# cat >> /etc/sysctl.conf <<\EOF # ENABLE Google BBR net.ipv4.tcp_congestion_control = bbr net.core.default_qdisc = fq EOF [root@ihoiwan ~]# reboot # 已经升级到5.4 [root@ihoiwan ~]# uname -r 5.4.140-1.el7.elrepo.x86_64 # BBR 已开启 [root@ihoiwan ~]# sysctl net.ipv4.tcp_available_congestion_control net.ipv4.tcp_available_congestion_control = reno cubic bbr ```
zhangky
2021年8月16日 11:26
分享文档
收藏文档
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码