甲骨文永久免費雲端服務
可無限期使用的內容:
- 具備 Oracle APEX 和 Oracle SQL Developer 功能強大工具的兩個 Oracle Autonomous Databases
- 兩個 AMD Compute VM
- 最多 4 個 ARM Ampere A1 運算執行處理 (每個月 3,000 個 OCPU 小時和 18,000 GB 小時)
- 區塊、物件及封存儲存;負載平衡器和資料輸出;監控與通知
主機基礎管理:
- 帳號註冊、建立VM實例、設定防火牆,可參考文章:甲骨文Oracle Cloud推出永久免費主機,不但可用來架設WordPress還可選擇日本機房
- 建立Oracle MySQL資料庫 (收費項目) 或直接將MySQL安裝在Ubuntu VM裡
- 使用SSH軟體Termius登入Ubuntu VM
- 更新與升級 apt update && apt upgrade
- 設定IPTABLES,開通80 Port
$ $ sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT $ sudo netfilter-persistent save $
軟體安裝:
- Tmux 視窗管理
- Ranger 檔案管理
- Dropbox 傳輸檔案與同步備份
- MySQL Shell 或 Workbench 管理MySQL伺服器
軟體使用:
tmux 終端機視窗管理工具
設定檔位置 ~/.tmux.conf
開啟滑鼠捲動 set -g mouse on
| 指令 | 功能 |
|---|---|
| $ tmux a | Attach session |
| <ctrl>b c | Create Window |
| <ctrl>b & | Exit Window |
| <ctrl>b <數字鍵> | Switch Window |
| <ctrl>b w | Visual switch Window |
| <ctrl>b d | Exit tmux session |
| <ctrl>b s | Switch session |
| <ctrl>b [ | navigation keys to scroll (eg. Up Arrow or PgDn). Press q to quit scroll mode. |
| <ctrl>b : | :source-file ~/.tmux.conf Reloading the Tmux config :rename-window <Rename Window> |
Ranger 檔案管理工具
設定檔位置 ~/.config/ranger/rc.conf
顯示隱藏檔 set show_hidden true
顯示標籤名 set dirname_in_tabs true
離開時儲存標籤 set save_tabs_on_exit true
| 指令 | 功能 |
|---|---|
| q | Quit |
| m<key> | to bookmark the current directory |
| um<key> | delete bookmark |
| Type ‘<key> | to re-enter bookmark |
| Type / | to search |
| n or N | Find the next file or Find the previous file. |
| S | to open terminal console |
| r | Open with.. |
| Space | Mark a file. |
| yy | Copy (yank) the selection |
| dd | Cut the selection |
| pp | Paste the files which were previously copied or cut |
| Ctrl-n | Create new tab |
| Ctrl-w | Close current tab |
| TAB | Next tab |
| shift + TAB | Previous tab |
MySQL Shell
| 功能 | 指令 |
|---|---|
| Connect to Server | $ mysqlsh user@hostIP |
| Switch to SQL mode | \sql |
| Create Database | CREATE DATABASE name; |
使用Cloud Shell連接私人網路後,便可以mysqlsh 進入MySQL Server,建立資料庫


也可以透過VM建立SSH Tunnel後,以本機GUI介面軟體進入資料庫

- 下載Wordpress,設定檔案權限
$ wget https://wordpress.org/latest.tar.gz tar -xvf latest.tar.gz $ cp -R wordpress /var/www/html/ $ chown -R www-data:www-data /var/www/html/wordpress/ $ chmod -R 755 /var/www/html/wordpress/
- 開始安裝Wordpress
- 設定DNS,成功後網站即上線


