File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -81,16 +81,19 @@ ls -l /home/
81
81
# 注意aws的磁盘格式化,在mkfs.xfs阶段会有点慢,需要手动执行下,然后执行mount -a重新挂载下
82
82
```
83
83
84
- # 二 、修改主机名
84
+ # 三 、修改主机名
85
85
86
86
```
87
87
https://www.cnblogs.com/zeusmyth/p/6231350.html
88
88
89
- vim /etc/hostname
89
+ cat > /etc/hostname << EOF
90
+ hk-ubuntu-188
91
+ EOF
92
+ hostname hk-ubuntu-188
90
93
```
91
94
92
95
93
- # 三 、脚本
96
+ # 四 、脚本
94
97
```
95
98
sudo apt update -y
96
99
sudo apt upgrade -y
@@ -120,7 +123,7 @@ vim /etc/profile
120
123
export PS1="\[\e]0;\a\]\n\[\e[1;32m\]\[\e[1;33m\]\H\[\e[1;35m\]<\$(date +\"%Y-%m-%d %T\")> \[\e[32m\]\w\[\e[0m\]\n\u>\\$ "
121
124
```
122
125
123
- # 四 、sshd配置
126
+ # 五 、sshd配置
124
127
```
125
128
cat > /etc/ssh/sshd_config << \EOF
126
129
Port 33389
159
162
systemctl restart sshd
160
163
```
161
164
162
- # 五 、防火墙配置
165
+ # 六 、防火墙配置
163
166
```
164
167
sudo apt-get install -y ufw
165
168
sudo ufw reset
You can’t perform that action at this time.
0 commit comments