1.更新系统
sudo apt-get upgrade shutdown -r now //重启
2-5步 一码速通
sudo apt install build-essential&&sudo apt-get install npm&&npm config set registry=https://registry.npmmirror.com&&sudo npm install -g cnpm --registry=https://registry.npmmirror.com&&sudo cnpm install -g hexo-cli&&cd ~&&mkdir Blog&&cd Blog&&hexo init&&npm install&&npm install hexo-deployer-git --save&&hexo clean&&hexo g&&hexo s
2.安装编译软件所必需的元包
sudo apt install build-essential
3.安装npm
由于国内装不了npm,所以装cnpm
sudo apt-get install npm npm config set registry=https://registry.npmmirror.com sudo npm install -g cnpm --registry=https://registry.npmmirror.com
4.安装hexo
sudo cnpm install -g hexo-cli
5.搭建本地Blog
cd ~ //回到根目录 mkdir Blog //创建Blog的文件夹 cd Blog //进入Blog hexo init npm install npm install hexo-deployer-git --save hexo clean && hexo g && hexo s