更改 Hostname
1
| hostnamectl set-hostname <new_hostname>
|
設定 IP
1 2 3 4 5 6 7 8
| # 進入設定精靈 nmtui
# 重啟 network systemctl restart network
# 檢查設定是否正確 ip address
|
安裝 EPEL Repository
1
| yum install epel-release
|
1
| yum install open-vm-tools
|
停用 SSH root 登入
1 2 3 4 5 6 7 8
| # 編輯 sshd_config vim /etc/ssh/sshd_config
# 修改以下內容 PermitRootLogin no
# 重啟 sshd systemctl restart sshd
|
yum rollback 到安裝前的狀態
1 2 3 4 5
| # 查看預計要退的版本號 yum history
# undo yum history undo 8
|
firewall-cmd
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| # 查看目前網卡套用的 Zone firewall-cmd --get-active-zones
# 將服務或端口永久新增或移除 firewall-cmd --zone=public --permanent --add-service=http firewall-cmd --zone=public --permanent --add-port=8080/tcp firewall-cmd --zone=public --permanent --remove-service=http firewall-cmd --zone=public --permanent --remove-port=8080/tcp
# reload 防火牆來套用新規則 firewall-cmd --reload
# 檢查設定 firewall-cmd --list-all-zones
|
Welcome to my other publishing channels