We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12def54 commit 0e38e3eCopy full SHA for 0e38e3e
centos.sh
@@ -12,14 +12,26 @@ dnf -y update
12
# 更换终端名
13
hostname="centos$centos_version"
14
echo "==> 修改hostname为$hostname"
15
-hostnamectl set-hostname centos
+hostnamectl set-hostname "$hostname"
16
hostnamectl --pretty
17
hostnamectl --static
18
hostnamectl --transient
19
20
# 安装基础组件
21
+echo "==> 安装基础组件"
22
dnf install -y curl wget vim
23
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
+
35
# 配置交换分区
36
echo "==> 修改之前交换分区"
37
swapon -s
0 commit comments