1. 更换yum

rm -rf /etc/yum.repos.d/*
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum clean all
yum makecache

2. 安装常用软件包并更新原有软件包

yum install -y wget vim git sshpass sudo curl openssl zip unzip telnet scp lrzsz conntrack socat
yum update -y

3. 安装bbr

wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh
sysctl net.ipv4.tcp_congestion_control

4. 禁用SELinux swap 防火墙

setenforce 0
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
swapoff -a  
sed -ri 's/.*swap.*/#&/' /etc/fstab
systemctl stop firewalld.service
systemctl disable firewalld.service

5. 更改时区为东八区

rm -f /etc/localtime
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

6. 关闭/var/spool/mail/root提示

echo "unset MAILCHECK">> /etc/profile
source /etc/profile

杂项

1. 安装docker

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
systemctl enable docker
curl -L "https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
最后修改:2022 年 07 月 18 日 03 : 16 PM
如果觉得我的文章对你有用,请随意赞赏