如何一步一步建立一个属于你自己的个人网站?

By Long Luo

本站目前采用 Hexo 作为后台系统,托管在Github上。此前我曾在很多地方安过家,最开始新浪和QQ空间上写过博客,后来到网易博客,再后来看到程序员都有自己的个人网站,于是2014年也新建了一个人网站,当时是买了域名和一个VPS,使用的LNMP架构。

在使用了流行的WordPress两年后看到码农的乐土,Jekyll ,一个以纯静态文件的博客系统。但后来我发现Jekyll实在太慢,而且美观度也不够,于是投奔了在Hexo

LNMP

首先去LNMP下载LNMP安装包,然后按照下面操作步骤:

1
2
3
4
5
6
7
8
wget -c http://soft.vpser.net/lnmp/lnmp1.3-full.tar.gz

tar zxf lnmp1.3-full.tar.gz

cd lnmp1.3-full

# auto install
./install.sh lnmpa

Jekyll

$ git –version git version 1.7.1

$ ssh-keygen -t rsa -C “youremail@example.com”

id_rsa.pub

ssh -t git@github.com

$ git config –global user.name “Your Name” $ git config –global user.email “email@example.com”

1
2
3
4
5
6
7
The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts.
PTY allocation request failed on channel 0
Hi longluo! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.

修改SSH密码。登录ssh后, 通过passwd命令修改即可,命令格式:

1
passwd {用户名}

    出现:(current) UNIX password: 然后输入当前系统登陆用户的密码 回车   出现:New password: 再输入新密码(新的密码必须是字母数字都有,不然的话不成功)

Hexo