first attempt . node
def main(args : Array[String]) { println( "Hello newcommer!" ) }
安裝Git :linux
sudo yum install git
安裝NVM(https://github.com/creationix/nvm/#install-script):git
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
驗證是否安裝成功:github
安裝Node.js(https://nodejs.org/en/download/):npm
1.下載源碼 cd /usr/local/src/ wget https://nodejs.org/dist/v6.9.5/node-v6.9.5-linux-x64.tar.xz --no-check-certificate 2.解壓源碼 xz -d node-v6.9.5-linux-x64.tar.xz tar xvf node-v6.9.5-linux-x64.tar 3.設置環境變量 sudo vim /etc/profile #node.js export NODE_HOME=/usr/local/src/node-v6.9.5-linux-x64 export PATH=$PATH:$NODE_HOME/bin source /etc/profile
驗證是否成功:vim
靜態BLOG hexo搭建(https://hexo.io/zh-cn/docs/) :bash
1.安裝 npm install -g hexo-cli 2.建站 hexo init /work/blog cd /work/blog npm install 3.啓動 hexo server 訪問本地博客 https://localhost:4000 4.發佈 hexo deploy ERROR Deployer not found: git solution:npm install hexo-deployer-git --save(http://stackoverflow.com/questions/34452547/hexoerror-deployer-not-found-github) git config --global user.name "tjuhenryli git config --global user.email tjuhenryli@sina.com git config --lis ssh-keygen -t rsa -C "tjuhenryli@sina.com" https://github.com/settings/keys 設置pub key 本地驗證ssh git@github.com
發佈時403 Forbiddenhexo
fatal: HTTP request failed Error: error: The requested URL returned error: 403 Forbidden while accessing https://github.com/tjuhenryli/tjuhenryli.github.io.git/info/refs fatal: HTTP request failed at ChildProcess.<anonymous> (/work/blog/node_modules/hexo-util/lib/spawn.js:37:17) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:877:16) at Socket.<anonymous> (internal/child_process.js:334:11) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at Pipe._handle.close [as _onclose] (net.js:498:12)
將deploy設置ssh
deploy: type: git repo: https://github.com/tjuhenryli/tjuhenryli.github.io branch: master 改成: deploy: type: git repo: https://tjuhenryli@github.com/tjuhenryli/tjuhenryli.github.io branch: master 刪除掉.deploy_git目錄 從新執行hexo d
https://tjuhenryli.github.io/ 博客名稱必須是本身的用戶名。curl