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
版权属于:本文是原创文章,版权归 吾梦小站 所有。
本文链接:https://nikm.cn/archives/69.html
本站所有原创文章采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可。
您可以自由地转载和修改,但请务必注明文章来源并且不可用于商业目的。