CentOS + Hexo + Git Hub + 域名集成 (二)

接着上篇CentOS + Hexo + Git Hub + 域控集成 (一)

Github 集成:

1. Github上注册好账号

2. 新建一个repositories,取名fionaxlh.github.io (这边取名一定要注意username.github.io,要不后期会报404错误)

CentOS + Hexo + Git Hub + 域名集成 (二)

[[email protected] hexo]# git config --global user.email "*******@qq.com"

[[email protected] hexo]# git config --global user.name "fionaxlh"

[[email protected] hexo]# ssh-****** -t rsa -C "*******@qq.com" 上面的邮箱地址

[[email protected] hexo]# less  ~/.ssh/id_rsa.pub 复制到github上面的ssh key如下:

CentOS + Hexo + Git Hub + 域名集成 (二)

[[email protected] hexo]# hexo clean

[[email protected] hexo]# hexo g

[[email protected] hexo]#hexo d 正常运行完,打开上面的https://fionaxlh.github.io

 

 

 

 

 

 

上面的基本版的hexo博客已经弄好了,下面就是将域控结合

1. 域控解析,我这边用买的是阿里的域,所以这边只针对阿里的设置如下:

CentOS + Hexo + Git Hub + 域名集成 (二)

注意上面的记录值是你上面已经好的hexo的博客地址

[r[email protected] hexo]# cd source
[[email protected] source]# pwd
/home/Fiona/hexo/source
[[email protected] source]# touch CNAME

[[email protected] source]# vim CNAME

fxlh-security.com ------输入个人的域名地址

 

 

 


 

 配置Github端的域:

CentOS + Hexo + Git Hub + 域名集成 (二)

CentOS + Hexo + Git Hub + 域名集成 (二)

上面输入你的域名地址:

[[email protected] source]# hexo clean

[[email protected] source]# hexo d -g

执行上面两条命令,成功后,打开上面的域名地址:http://www.fxlh-security.com/

基本已经成功,打开页面如下: 

CentOS + Hexo + Git Hub + 域名集成 (二)

 

上面的主题不太喜欢,等接下来有时间弄一下hexo的主题。。。。