### Debian
apt-get install git
### CentOS 6
yum install centos-release-SCL && yum update
yum install python27
scl enable python27 bash
yum install python27-python-devel python27-python-setuptools python27-python-tools python27-python-virtualenv
yum install augeas-libs dialog gcc libffi-devel openssl-devel python-devel
### CentOS 7
yum install -y git python27
yum install -y augeas-libs dialog gcc libffi-devel openssl-devel python-devel
python -V
###SSL
cd /opt
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
./letsencrypt-auto certonly –server https://acme-v01.api.letsencrypt.org/directory –agree-dev-preview
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
./letsencrypt-auto –verbose
# during beta
./letsencrypt-auto –verbose –agree-dev-preview –server https://acme-v01.api.letsencrypt.org/directory certonly
运行完以上命令会弹出一个蓝色UI窗口,
输入email,
然后同意TOS
输入域名,之后出现“Congratulations! Your certificate and chain have been saved at /etc/letsencrypt/live/你的域名/fullchain.pem.”等提示就是成功了。
接着去/etc/letsencrypt/live/你的域名/文件夹下你会发现4个pem文件,
其中
fullchain.pem就是配置https站点需要使用的crt文件,
privkey.pem就是key文件
感谢