树莓派之Hexo环境搭建


安装node.js 环境

pi@raspberrypi:~/workdir/node_js $ wget -qO- https://raw.github.com/creationix/nvm/v0.33.11/install.sh | sh

=> Downloading nvm from git to '/home/pi/.nvm'
=> 正克隆到 '/home/pi/.nvm'...
remote: Enumerating objects: 267, done.
remote: Counting objects: 100% (267/267), done.
remote: Compressing objects: 100% (242/242), done.
remote: Total 267 (delta 31), reused 86 (delta 15), pack-reused 0
接收对象中: 100% (267/267), 119.47 KiB | 7.00 KiB/s, 完成.
处理 delta 中: 100% (31/31), 完成.
=> Compressing and cleaning up git repository

=> Appending nvm source string to /home/pi/.profile
=> bash_completion source string already in /home/pi/.profile
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm

使环境变量生效

source ~/.Profile

安装 npm

pi@raspberrypi:~/workdir/node_js $ nvm install stable
Downloading and installing node v11.8.0...
Downloading https://nodejs.org/dist/v11.8.0/node-v11.8.0-linux-armv6l.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v11.8.0 (npm v6.5.0)
Creating default alias: default -> stable (-> v11.8.0)

设置 npm 镜像源(不然安装很忙)

pi@raspberrypi:~/workdir/hexo $ npm get registry
https://registry.npmjs.org/
pi@raspberrypi:~/workdir/hexo $ npm config set registry http://registry.npm.taobao.org/
pi@raspberrypi:~/workdir/hexo $ npm get registry
http://registry.npm.taobao.org/

安装hexo 客户端

pi@raspberrypi:~/workdir/node_js $ npm install -g hexo-cli
/home/pi/.nvm/versions/node/v11.8.0/bin/hexo -> /home/pi/.nvm/versions/node/v11.8.0/lib/node_modules/hexo-cli/bin/hexo
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/hexo-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

+ hexo-cli@1.1.0
added 225 packages from 431 contributors in 181.245s

文章作者: Alex.Lin
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Alex.Lin !
 上一篇
win10子系统wsl win10子系统wsl
2019-08-21 Alex.Lin
下一篇 
C语言之奇门遁甲术 C语言之奇门遁甲术
C语言位操作与计算 C语言中位取反是~,逻辑取反是 布尔位运算符 运算符 意义 示例 对于每个位位置的结果(1=设定,0=清除) & 位 AND x&y 如果 x 和 y 都为 1,则得到 1;如果 x 或 y
2019-01-09
  目录