设置静态IP
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.73
GATEWAY=192.168.1.1
NETMASK=255.255.255.0
DNS1=8.8.8.8
修改 yum 源为华为源
cp -a /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
sed -i "s/#baseurl/baseurl/g" /etc/yum.repos.d/CentOS-Base.repo
sed -i "s/mirrorlist=http/#mirrorlist=http/g" /etc/yum.repos.d/CentOS-Base.repo
sed -i "s@http://mirror.centos.org@https://mirrors.huaweicloud.com@g" /etc/yum.repos.d/CentOS-Base.repo
yum clean all # 清除原有yum缓存。
yum makecache # 刷新缓存
安装EPEL源
yum -y install epel-release
sed -i "s@^#baseurl=http://download.fedoraproject.org/pub@baseurl=http://mirrors.aliyun.com@g" /etc/yum.repos.d/epel*.repo
sed -i "s@^metalink@#metalink@g" /etc/yum.repos.d/epel*.repo
安装常用软件
yum -y install vim axel htop tig lrzsz multitail mosh