熱門文章

顯示具有 ubuntu 標籤的文章。 顯示所有文章
顯示具有 ubuntu 標籤的文章。 顯示所有文章

2019年9月21日 星期六

[筆記] 免費使用Oracle cloud vps並打開port 80端口


Oracle 最近宣布提供個人終身免費VPS,但是我在架設網站的過程中遇到了一些困難,nginx怎麼連都連不上去,就寫下來分享一下

直接進到Oracle Cloud Infrastructure裡面,照著圖片點選

Click instance



Click Virtual Cloud Network



Click subnet

Click default security list


Remove all rules and add a ingress rule like this

Remove all rules and add a Egress rule like this


這樣還不行!!因為oracle的ubunt有內建ip table,我們把iptables刪除

ssh進去後輸入
sudo apt remove iptables

啟用root登入 Enable root login

  1. sudo passwd root
  2. sudo nano /etc/ssh/sshd_config
    • PermitRootLogin prohibit-password -> PermitRootLogin yes
    • PasswordAuthentication no -> PasswordAuthentication yes
  3. sudo service ssh restart



這樣就設定完成了

接著安裝nginx請參考這篇

另外,提醒一下要注意免費額度400是否有在扣款,Instance shape必須是VM.Standard.E2.1.Micro才是免費的

VM.Standard.E2.1---> Paid
VM.Standard.E2.1.Micro ---> Free

2018年10月20日 星期六

[教學] Install go & gin on ubuntu 18.04

照著官方教學在Ubuntu上有夠難安裝,自己紀錄一下最快的安裝方法

sudo apt install golang-go
sudo apt install govendor

That's it!
接著就可以繼續照著gin的教學走下去

https://github.com/gin-gonic/gin#installation