# 機架式主機安裝Ubuntu流程 ## 1. 製作USB開機碟 1. 至[Ubuntu官網](https://www.ubuntu-tw.org/modules/tinyd0)下載最新的伺服器版安裝檔(ubuntu-22.04.1-live-server-amd64.iso) ![](https://i.imgur.com/I3Z4rUF.png) 2. 至[Rufus官網](https://rufus.ie/zh_TW/)下載Rufus軟體(rufus-3.20.exe) ![](https://i.imgur.com/HXreG45.png) 3. 執行Rufus軟體,先確認軟體介面上有讀取到欲製作之USB開機碟,再選擇前面下載的Ubuntu伺服器版ISO檔,最後點擊「執行」 **注意:執行後,USB內所有原始資料將會被格式化,因此建議先行備份** ![](https://i.imgur.com/xvG3bxG.jpg) 4. USB開機碟完成 ![](https://i.imgur.com/8yj3zCs.png) ## 2. 安裝系統至機架式主機 1. 進入BIOS(按F11) 將USB開機碟插入主機,進到Boot Menu畫面,並選擇"Front USB" ![](https://i.imgur.com/wf5gRmi.jpg) 2. 選擇"Try or Install Ubuntu Server" ![](https://i.imgur.com/HjvVL1h.jpg) 3. Select language 選擇"English" ![](https://i.imgur.com/y45ABZz.jpg) 4. Installer update available 選擇"Continue without updating" ![](https://i.imgur.com/dQSJVV3.jpg) 5. Keyboard configuration 使用預設(Layout:English(US) / Variant: English(US))即可 ![](https://i.imgur.com/0C7GFSM.jpg) 6. Choose type of install 選擇"Ubuntu Server" ![](https://i.imgur.com/0hdR77k.jpg) 7. Network connection 網路先使用預設的DHCP,安裝完成後再設定為固定IP ![](https://i.imgur.com/cjUPpiC.jpg) 8. Configure proxy 不須使用Proxy,故維持空白 ![](https://i.imgur.com/dONBYJo.jpg) 9. Configure Ubuntu archive mirror 保持預設 10. Guided storage configuration 選擇"Use an entire disk" ![](https://i.imgur.com/Cn99vFe.jpg) 11. Storage configuration 確認硬碟詳細資訊 ![](https://i.imgur.com/xRDtpv6.jpg) 12. Confirm destructive action 選擇"Continue" ![](https://i.imgur.com/gLKr9V5.jpg) 13. Profile setup * Your name:要顯示的帳戶名稱,非系統登入帳戶(H12) * Your server's name:伺服器名稱(h12) * Pick a username:系統帳戶名稱(h12) * choose a password:帳戶密碼(h12) * confirm your password:再次確認帳戶密碼(h12) 14. SSH setup 選擇"Install OpenSSH server",未來即可使用SSH遠端操控 15. Featured Server Snaps 不安裝任何軟體 16. Install complete! 選擇"reboot now" ![](https://i.imgur.com/plLWQMP.jpg) 17. 確認安裝成功 **先將USB拔除,再按Enter重新開機**,出現使用者登入畫面即安裝成功 ## 3. 設定IP 1. 開啟網路介面設定檔(.yaml) ```console= cd /etc/netplan sudo nano 01-netcfg.yaml ``` 2. 如下圖進行設定 ![](https://i.imgur.com/x53y5CA.jpg) ```yaml= network: version: 2 ethernets: eno1: addresses: [ 10.2.200.216/25 ] gateway4: 10.2.200.239 nameservers: addresses: [ 8.8.8.8, 8.8.4.4 ] ``` 3. 測試新的網路設定 ``` sudo netplan try ``` 4. 查看網路 ``` ifconfig eno1 ``` ## 4. 新增使用者 1. 新增使用者(s1082959) ``` sudo adduser s1082959 ``` 2. 確認 ``` su s1082959 ``` ![](https://i.imgur.com/mcHwJr0.jpg) ## 5. Mount硬碟 1. 查看硬碟分布 ``` lsblk ``` 2. 開始設定sdb ``` sudo fdisk /dev/sdb ``` 3. 檢視硬碟狀態 ``` p ``` 4. 新增磁碟區 ``` n ``` 5. 確定寫入硬碟 ``` w ``` 6. 將sdb1 mount到/home下 ``` sudo mount /dev/sdb1 /home ``` 最後重複步驟1,確認沒問題 ## Homework * 查看 1. 版本 2. 網路 3. 使用者 ![](https://i.imgur.com/rBI6NUm.jpg) ###### tags: `Linux系統管理` `機架式主機` `安裝Ubuntu`