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