###### tags: `Linux系統管理` `軟體套件的管理`
# Linux
第一段影片:
https://cute365.sharepoint.com/sites/msteams_348ca5/_layouts/15/stream.aspx?id=%2Fsites%2Fmsteams%5F348ca5%2FShared%20Documents%2FGeneral%2FRecordings%2FLinux%E7%B3%BB%E7%B5%B1%E7%AE%A1%E7%90%861201%2D20221201%5F132010%2D%E6%9C%83%E8%AD%B0%E9%8C%84%E8%A3%BD%2Emp4&referrer=Teams%2ETEAMS%2DELECTRON&referrerScenario=teamsSdk%2DopenFilePreview
# 網路設定
地址10.80.79.1xx
通訊閘10.80.79.254
伺服器8.8.8.8

# 終端機:
**指令:su**
**密碼:cuteb103**
**指令:yum install httpd httpd-tools**

有這個一律按"y"
看到Complete就完成了
**指令:cd /etc**
**指令:cd /etc/httpd**
**指令:cd conf.d**

**指令:cd ..**
**指令:cd conf**
**指令:systemctl start httpd**
**指令:systemctl status httpd**檢視是否有開啟

**指令:cd /var/www/html**
**指令:echo > index.htmpwd**
**指令:pwd**
**指令:echo > /var/www/html/index.html**
**指令:vi index.html**
按 [i] 開啟編輯
裡面打學號跟姓名(英文)中文沒辦法打

編輯完按[esc]後打[:wq]
**指令:cat index.html**檢視是否有編輯完成
第二段影片:
https://cute365.sharepoint.com/sites/msteams_348ca5/_layouts/15/stream.aspx?id=%2Fsites%2Fmsteams%5F348ca5%2FShared%20Documents%2FGeneral%2FRecordings%2FLinux%E7%B3%BB%E7%B5%B1%E7%AE%A1%E7%90%861201%2D20221201%5F141308%2D%E6%9C%83%E8%AD%B0%E9%8C%84%E8%A3%BD%2Emp4&referrer=Teams%2ETEAMS%2DELECTRON&referrerScenario=teamsSdk%2DopenFilePreview
**指令:firewall-cmd --add-service=http**
**指令:firewall-cmd --list-all**檢視是否有開啟

**指令:cd /etc/httpd**
**指令:cd conf.d**
**指令:ls -l**
編輯這檔案:

**指令:vi userdir.conf**
按 [i] 開啟編輯
更改前:

更改後:

編輯完按[esc]後打[:wq]
**指令:cat userdir.conf**是否有更改完
**指令:systemctl restart httpd
**指令:cd /home**
**指令:ls -l**
**指令:cd /cute**
**指令:mkdir public_html**
**指令:ls -l**檢視有建立檔案
**指令:cd public_html**
**指令:vi index.html**
按 [i] 開啟編輯
打學號

編輯完按[esc]後打[:wq]
**指令:cat index.html**檢視是否有內容
**指令:cd ..**
**指令:cd ..**
**指令:chmod 711 cute**
**指令:ls -l**

**指令:cd cute**
**指令:cd public_html**
**指令:chmod 755 index.html**
**指令:ls -l**
查看有沒有:x

建新只用者
**指令:useradd 11014610xx**學號
**指令:passwd 11014610xx**學號
**指令:cd /home**
**指令:chmod 711 11014610xx**
**指令:cd 11014610xx**
**指令:mkdir public_html**
**指令:cd public_html**
**指令:vi index.html**
按 [i] 開啟編輯
打學號

編輯完按[esc]後打[:wq]
**指令:cat index.html**
**指令:chmod 755 index.html**
**指令:ls -l**
檢視有沒有[xr-x]

{"metaMigratedAt":"2023-06-17T16:22:09.763Z","metaMigratedFrom":"Content","title":"Linux","breaks":true,"contributors":"[{\"id\":\"ce3e7058-8bf8-4590-b0b1-a27000d64abb\",\"add\":2740,\"del\":84}]"}