1  | 切换到root用户  | 
参照官网
1  | curl -fsSL https://deb.nodesource.com/setup_20.x | bash - &&\  | 
安装提示
1  | ## Run `sudo apt-get install -y nodejs` to install Node.js 20.x and npm  | 
yarn是npm的下一代产品,这里用不到,只安装development tools即可
1  | sudo apt-get install gcc g++ make -y  | 
验证查看版本
1  | npm --version  | 
全局安装 Hexo
npm install -g hexo-cli
初始化 Hexo
mkdir hexo
cd hexo
hexo init
测试
hexo s
返回
INFO  Start processing
INFO  Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
浏览器localhost:4000进行预览