서버환경 CENTOS 7.5
* ROOT 상태에서 설치 진행 root 계정이 아닐경우 sudo 붙이기 바람
========================================
파이썬 패키지 매니저 설치
========================================
curl -k -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py
========================================
CERTBOT 설치
pip install -U setuptools
git clone [email protected]:certbot/certbot.git && cd certbot
python setup.py install
========================================
=======================================
cloudflare 플러그인 설치
cd certbot-dns-cloudflare && python setup.py install
vi /etc/letsencrypt/dnscloudflare.ini
-------------------------------------------- 아래 본인에 맞게 설정바람 ----
# Cloudflare API credentials used by Certbot
dns_cloudflare_email = 이메일
dns_cloudflare_api_key = Global API Key [https://dash.cloudflare.com/profile 참조]
--------------------------------------------------
chmod 600 /etc/letsencrypt/dnscloudflare.ini
while card ssl 사용하기 위해 설정
vi /etc/letsencrypt/cli.ini
---------------------------------------------------
# Let's Encrypt site-wide configuration
dns-cloudflare-credentials = /etc/letsencrypt/dnscloudflare.ini
# Use the ACME v2 staging URI for testing things
server = https://acme-staging-v02.api.letsencrypt.org/directory
# Production ACME v2 API endpoint
#server = https://acme-v02.api.letsencrypt.org/directory
---------------------------------------------------------------------
staging 로 셋팅하고 Production 로 교체바람
certbot certonly -d *.domain -d domain --dns-cloudflare
OR
certbot certonly \
-d domain \
-d *.domain \
--server https://acme-v02.api.letsencrypt.org/directory \
--dns-cloudflare --dns-cloudflare-credentials /etc/letsencrypt/dnscloudflare.ini --preferred-challenges dns-01
출처 -- https://www.eigenmagic.com/2018/03/14/howto-use-certbot-with-lets-encrypt-wildcard-certificates/