无法安装screen、iftop、nethogs的解决办法

由于Centos8yum源里没有epel,但是呢screen、iftop、nethogs是在epel里面的,解决方法如下:

yum -y install epel-release

执行命令,出现报错:Failed to set locale, defaulting to C.UTF-8

echo "export LC_ALL=en_US.UTF-8" >> /etc/profile
source /etc/profile

Failed to download metadata for repo 'AppStream'

cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* 
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum clean all
yum makecache

BBR开启

CentOS8系统自带了BBR加速,我们只需要修改配置文件激活即可。

开启BBR

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

使配置文件生效

sysctl -p

重启系统

reboot

检查BBR的开启状态

#两条命令均可
sysctl -n net.ipv4.tcp_congestion_control
lsmod | grep bbr