first attempt .
def main(args : Array[String]) { println( "Hello newcommer!" ) }
安装Git :
sudo yum install git
安装NVM(https://github.com/creationix/nvm/#install-script):
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
验证是否安装成功:
安装Node.js(https://nodejs.org/en/download/):
1.下载源码cd /usr/local/src/wget https://nodejs.org/dist/v6.9.5/node-v6.9.5-linux-x64.tar.xz --no-check-certificate2.解压源码xz -d node-v6.9.5-linux-x64.tar.xztar xvf node-v6.9.5-linux-x64.tar3.设置环境变量sudo vim /etc/profile#node.jsexport NODE_HOME=/usr/local/src/node-v6.9.5-linux-x64export PATH=$PATH:$NODE_HOME/binsource /etc/profile
验证是否成功:
静态BLOG hexo搭建(https://hexo.io/zh-cn/docs/) :
1.安装npm install -g hexo-cli2.建站hexo init /work/blogcd /work/blognpm install3.启动hexo server访问本地博客 https://localhost:40004.发布hexo deployERROR Deployer not found: gitsolution:npm install hexo-deployer-git --save(http://stackoverflow.com/questions/34452547/hexoerror-deployer-not-found-github)git config --global user.name "tjuhenryligit config --global user.email tjuhenryli@sina.comgit config --lisssh-keygen -t rsa -C "tjuhenryli@sina.com"https://github.com/settings/keys 设置pub key本地验证ssh git@github.com
发布时403 Forbidden
fatal: HTTP request failedError: error: The requested URL returned error: 403 Forbidden while accessing https://github.com/tjuhenryli/tjuhenryli.github.io.git/info/refsfatal: HTTP request failed at ChildProcess.(/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. (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设置
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
博客名称必须是自己的用户名。