
先前曾分享過,透過Google Cloud Platform雲端主機,一鍵就能完成WordPress架設,甚至還有SFTP金鑰的建立,和FileZilla的設定,如此一來就能透過SFTP自行的上傳檔案,雖然說SFTP相當的安全,但是否有感受到,在設定的過程中相當的繁索,就連在FileZilla的設定也有些麻煩。
因此今天要來分享,如何在Google Cloud Platform雲端主機,自行安裝所需的作業系統,與圖形化的管理後台,和開啟FTP的服務,因此接下來就來分享,在Google Cloud Platform雲端主機建立一個CentOS的作業系統,與搭配ZPanel的後台圖形化管理介面,而ZPanel就有點像是cPanel 的簡化版,透過ZPanel中,就可自行的建立資料庫、域名綁定,甚至還有FTP權限的控管,和MySQL資料庫的建立,如此一來讓設定上更加的靈活,同時也可自行架設WordPress,一點也不難喔!因此現在就一塊來看看如何在Google Cloud Platform雲端主機中,安裝CentOS+Zpanel+FTP+WordPress吧!
CentOS系統與主機建立
Step1
首先進到「Compute Engine」,建立一個執行個體,再將開機磁碟設定為「CentOS6」,與機器的硬體配備。

Step2
接著把下方二個選項勾選後,再按「建立」。

Step3
建立好後,再點選剛所建立好專案,後方的SSH下拉選單,再選擇「在瀏覽器視窗中開啟」。

ZPanel安裝
Step4
啟開SSH的視窗後,再輸入「wget http://www.zvps.co.uk/downloads/centos/10-1-0/installer-10-1-0-centos-64.sh.x.tar.gz」,按下Enter鍵後,將ZPanel套件進行下載。

Step5
下載完畢後,再輸入「tar -xf installer-10-1-0-centos-64.sh.x.tar.gz」將檔案進行解壓。

Step6
接加入執行權限「chmod +x installer-10-1-0-centos-64.sh.x」。

Step7
切換權限「sudo -s」。

Step8
接著再輸入「./installer-10-1-0-centos-64.sh.x」,進行安裝。

Step9
按y。

Step10
再將時區改為Asia/Taipei。

Step11
再輸入zpanel的網址。

Step12
IP位置不用改,再按下Enter。

Step13
再按「y」。

Step14
這時就會開始進行安裝,

Step15
當都安裝完畢時,會重新開機,接著再按「重新連線」。

Step16
接著輸入「setzadmin –set 密碼」設定ZPanel的登入密碼,到這邊ZPanel已安裝與設定完成,可將視窗關閉。

DNS設定
Step17
接著再到DNS的地方,分別設定二組子域名稱與對應的IP位置。

防火牆FTP設定
Step18
再到Google Cloud Platform後台的「網路/防火牆規則」,點右上方的「建立防火牆規則」選單。

Step19
接著將來源篩選器設為「允許任何來源的流量」,以及將通訊埠設為tcp:21。

Step20
當建立完成後,在防火牆規則中,就會看到剛所建立好的ftp埠號。

Zpanel登入
Step21
這時再開啟剛所建立好的zpanel後台網址,就會看到ZPanel登入畫面,帳號為「zadmin」,密碼輸入剛剛所建立的。

Zpanel-域名設定
Step22
進入ZPanel的管理畫面後,與cPanel有幾分相似,接著先建立網站的網域名稱。

Step23
接著再輸入要綁定的網域名稱,與建立一個新的網站根目錄。

Step24
當建立完畢後,需一段時間後才會生效,當生效時後方的狀態會顯示為「Live」。

Step25
這時再開啟瀏覽器,並輸入剛所綁定的網域名,就會看到以下的畫面。

Zpanel-FTP設定
Step26
接著再回到ZPanel後台,建立一個FTP的帳號,並將目錄指向剛所建立的位置。

Step27
建立好後,開啟FileZilla並輸入主機的IP位置,與剛所建立好的FTP帳密。

Step28
設定完畢後,再切到「傳輸設定」將模式設為「主動模式」

FTP- WordPress 上傳
Step29
再按下「連線」鈕,立即就可順利的連到網站的根目錄啦!

Step30
接著將WordPress上傳到網站根目錄中,並將原來的index.html給刪除。

ZPanel-資料庫建立
Step31
在檔案的傳輸過程中,再回到ZPanel建立一個新的資料庫。

WordPress-安裝
Step32
上傳完畢後,再重新整理剛所綁定的網址,這時就會看到WordPress的安裝畫面,就依照上方的指示,就可完成WordPress的安裝啦!

Step33
當WordPress安裝完畢後,並輸入帳密,就可順利的提入WordPress的管理後台。

Step34
接著再回到前台檢查一下,哈~一切都正常,透過ZPanel在設定上更加的方便,同時更容易管理喔!因此有在用的朋友,不妨也可試試看,這個自己架設方式,會來的更好操控喔!
