網路卡設定IP:
nmcli connection show (check the device name)
nmcli con modify ens33 ipv4.address 192.168.0.xx/24 ipv4.gateway 192.168.0.xx
網路卡設定IP:
nmcli connection show (check the device name)
nmcli con modify ens33 ipv4.address 192.168.0.xx/24 ipv4.gateway 192.168.0.xx
CHATGPT教我的
如果是以前可能搞一星期都試不出來
SAMPLE:
apache 2.2
# 設定允許的 IP 地址
SetEnvIf Remote_Addr "^192\.168\.11\." let_me_in
SetEnvIf Remote_Addr "^11\.22\.33\.44$" let_me_in
SetEnvIf Remote_Addr "^192\.168\.22\." let_me_in
# 啟用基本認證
AuthType Basic
AuthName "Restricted Access"
AuthUserFile /mypasswd
AuthGroupFile /dev/null
# 設定訪問規則
Order deny,allow
Deny from all
Allow from env=let_me_in
Satisfy any
<Limit GET POST>
Require valid-user
</Limit>
備份用,參考
https://handle.idv.tw/centos6%E4%B8%AD%E7%84%A1%E6%B3%95%E4%BD%BF%E7%94%A8yum%E7%9A%84%E8%99%95%E7%90%86/
# vi /etc/yum.repos.d/CentOS-Base.repo