進(jìn)行連接
Windows用戶請(qǐng)使用 putty
地 址:VPS對(duì)應(yīng)IP
端 口:22
用戶名:root
密 碼:在管理面板查看
Mac用戶請(qǐng)?jiān)诮K端輸入
ssh root@域名
或如同 ssh root@192.168.1.2 -p 8080 的制定端口連接
輸入以下指令安裝 VestaCP 管理面板
apt-get update -y && apt-get install wget git vim curl -y && curl -O http://vestacp.com/pub/vst-install.sh && bash vst-install.sh
安裝node
// 先升級(jí)系統(tǒng)
# sudo apt-get update
# sudo apt-get install git-core curl build-essential openssl libssl-dev
// 然后如下
# sudo apt-get install build-essential
# git clone https://github.com/joyent/node.git
# cd node/
// # git tag # // 此步驟可列出當(dāng)前全部版本
# git checkout v0.12.7 // 指定安裝版本
// 然后編譯并安裝
# ./configre
# make
# sudo make install
// 可輸入以下查看安裝結(jié)果
# node -v // 0.12.7
安裝npm
# wget https://npmjs.org/install.sh --no-check-certificate
# chmod 777 install.sh
# ./install.sh
# npm -v // 2.11.3
有一個(gè)安裝的依賴 可讓服務(wù)持續(xù)運(yùn)行
# sudo npm install forever -g
# forever start app.js #啟動(dòng)
# forever stop app.js #關(guān)閉
# forever start -l forever.log -o out.log -e err.log app.js #輸出日志和錯(cuò)誤