PS:由于网络原因可能导致无法下载安装脚本,请自行下载脚本后,执行sudo sh install.sh安装。
2. 安装npm
1 2 3 4
curl http://npmjs.org/install.sh | sudo sh
five@master:~$ npm --version 3.7.3
3. 安装hexo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
five@master:~$ sudo npm install -g hexo [sudo] password for five: npm WARN deprecated graceful-fs@2.0.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible. /usr/bin/hexo -> /usr/lib/node_modules/hexo/bin/hexo
npm WARN optional Skipping failed optional dependency /hexo/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.8 npm WARN optional Skipping failed optional dependency /hexo/nunjucks/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@0.3.8
4. hexo Step by Step
1 2
mkdir hexo-project cd hexo-project
4.1 hexo init
1 2 3 4 5
five@master:~/github/hexo-fivezh$ hexo init INFO Copying data to ~/github/hexo-fivezh INFO You are almost done! Do not forget to run 'npm install' before you start blogging with Hexo! five@master:~/github/hexo-fivezh$ ls _config.yml package.json scaffolds source themes