Skip to content

Commit e589000

Browse files
authored
Update centos.sh
1 parent 2be0bfd commit e589000

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

linux/centos.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ centos_version="$1"
66
echo "==> 更换镜像为华为云"
77
cp -a /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
88
wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-"$centos_version"-reg.repo
9-
dnf -y clean all
10-
dnf -y update
9+
yum -y clean all
10+
yum -y update
1111

1212
# 更换终端名
1313
hostname="centos$centos_version"
@@ -19,7 +19,7 @@ hostnamectl --transient
1919

2020
# 安装基础组件
2121
echo "==> 安装基础组件"
22-
dnf install -y curl wget vim
22+
yum install -y curl wget vim
2323

2424
# 增加github hosts
2525
echo "==> 增加github hosts"

0 commit comments

Comments
 (0)