Skip to content

Commit 0e38e3e

Browse files
author
gclm
committed
feat(增加github hosts):
1 parent 12def54 commit 0e38e3e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

centos.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,26 @@ dnf -y update
1212
# 更换终端名
1313
hostname="centos$centos_version"
1414
echo "==> 修改hostname为$hostname"
15-
hostnamectl set-hostname centos
15+
hostnamectl set-hostname "$hostname"
1616
hostnamectl --pretty
1717
hostnamectl --static
1818
hostnamectl --transient
1919

2020
# 安装基础组件
21+
echo "==> 安装基础组件"
2122
dnf install -y curl wget vim
2223

24+
# 增加github hosts
25+
echo "==> 增加github hosts"
26+
cat>/etc/hosts<<EOF
27+
# 代理
28+
151.101.0.133 raw.githubusercontent.com
29+
199.232.68.133 raw.githubusercontent.com
30+
199.232.68.133 user-images.githubusercontent.com
31+
199.232.68.133 avatars2.githubusercontent.com
32+
199.232.68.133 avatars1.githubusercontent.com
33+
EOF
34+
2335
# 配置交换分区
2436
echo "==> 修改之前交换分区"
2537
swapon -s

0 commit comments

Comments
 (0)