Hexo搭建个人博客

主机配置

安装node.js git,打开git终端

1
2
cd ~/.ssh
ssh-keygen -t rsa -C "1872998728@qq.com"

上传GitHub

详细查看博客:https://www.cnblogs.com/liuxianan/p/build-blog-website-by-hexo-github.html

服务器配置

安装git Nginx

1
2
git init --bare hexo.git
cd hexo.git/hooks

vim post-receive

1
2
#!/bin/bash
git --work-tree=/home/wwwroot/3DCEList --git-dir=/home/wwwroot/hexo.git checkout -f

配置免密登陆:

1
ssh-copy-id -i .ssh/id_rsa.pub root@47.242.8.122
Donate
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.

扫一扫,分享到微信

微信分享二维码
  • Copyrights © 2020-2021 ycfn97
  • Visitors: | Views:

请我喝杯咖啡吧~

支付宝
微信