---
# System prepended metadata

title: 雲端實務MidTerm

---

# 雲端實務MidTerm
<br></br>
## Linux安裝
### 製作USB開機碟
用Win32磁碟映像工具製作ubuntu-20.04.2 server開機碟
![](https://i.imgur.com/sXOuHBS.jpg)

![](https://i.imgur.com/EMhN0xx.jpg)

### server安裝Linux
![](https://i.imgur.com/Uzz4BKg.jpg)

![](https://i.imgur.com/INFP0nj.jpg)

![](https://i.imgur.com/b0gKN8C.jpg)

![](https://i.imgur.com/z86l4Fo.jpg)
查看網卡資料
![](https://i.imgur.com/6FS8IXh.jpg)
<br></br>
## openstack安裝
安裝的時候不能使用root帳號，否則會報錯
安裝microstack
```sudo snap install microstack --beta --devmode```
![](https://i.imgur.com/r8JZc3Q.png)

初始化
```sudo microstack init --auto --control```
![](https://i.imgur.com/B2gZnu9.png)

產生密碼
```sudo snap get microstack config.credentials.keystone-password```
使用帳號admin登入 
登入畫面
![](https://i.imgur.com/tAilLae.png)
<br></br>
## VM設定
### 上傳image映像檔
Centos8映像檔大約1G，而nginx有預設上傳大小限制100MB
修改上傳限制:
nano /var/snap/microstack/common/etc/nginx/snap/nginx.conf
加入client_max_body_size 2048M;
重啟microstack:
```sudo snap disable microstack```
```sudo snap enable microstack```
上傳
![](https://i.imgur.com/KJnut0Q.png)

### 產生Key pairs
![](https://i.imgur.com/lPp1Jrr.png)

### Launch Instance
![](https://i.imgur.com/js3vX5B.png)
選擇映像檔
![](https://i.imgur.com/eLAQZUa.png)
![](https://i.imgur.com/yJ4g00Y.png)
選擇網路
![](https://i.imgur.com/bKYE0Ft.png)
選擇Key pairs
![](https://i.imgur.com/1hAgL9i.png)

![](https://i.imgur.com/LZnSZkT.png)


