安裝 Ghost 依賴:npm install --production,等待完成
報錯nginx 502
猜想:應該是因為ghost沒有啟動導緻原因 因為看到nginx标志,那麼nginx應該是沒有問題的
然後一些列操作之後這樣報錯
try: ------------------------------------------指令: npm install sqlite3 --save
npm install sqlite3 --build-from-source
That fixed my sqlite3 install.
之後不再報這種錯誤,
npm install -g knex-migrator 按照提示
knex-migrator init
當我可以正常啟動ghost時候我發現首頁打開有問題,确實預設的主題
這個是相容性的問題我找到一個答案說是node使用6是沒有為的
Downgraded to node 6.x.x and all is well, for now.
使用pm2來管理保護程序,不然我隻要關閉ssh視窗這個部落格系統也就關閉了node也就關閉了
因為pm2使用有問題,我就決定使用以前自己使用過的screen來挂你也是非常的友善
下面講解screen的使用
yum install screen 安裝
rpm -qa|grep screen 檢視版本
screen -S yourname -> 建立一個叫yourname的session
screen -ls -> 列出目前所有的session
screen -r yourname -> 回到yourname這個session
screen -d yourname -> 遠端detach某個session
screen -d -r yourname -> 結束目前session并回到yourname這個session
第二次安裝ghost遇到問題‘
莫名其妙的一堆錯誤
然後打開 npm-debug.log檢視