Letsencrypt 무료 SSL 인증서를 다음과 같이 신청한다.
dnf --enablerepo=epel -y install certbot
certbot certonly --webroot -w /var/www/mydomain.com/webapp -d www.mydomain.com
약관에 동의하냐 ? 관련 메일을 받아 보겠냐 ? Y 를 입력하고 통과한다.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): ryan.min@mydomain.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf.
You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y
Account registered.
Requesting a certificate for
www.mydomain.com
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/
www.mydomain.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/
www.mydomain.com/privkey.pem
This certificate expires on 2023-05-28.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt:
https://letsencrypt.org/donate
* Donating to EFF:
https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
하위 도메인이 있다면 (예: mail 등), apache 를 정지하고 다음과 같이 신청한다.
systemctl stop httpd
certbot certonly --standalone -d mail.mydomain.com
추가로 응답이 필요없이 완료된다.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for mail.mydomain.com
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/mail.mydomain.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/mail.mydomain.com/privkey.pem
This certificate expires on 2023-05-28.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt:
https://letsencrypt.org/donate
* Donating to EFF:
https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
위 경로에 인증서 들이 다운로드 되어 있다.
이 인증서를 Web Server 또는 WAS 에 등록하면 된다.
참조 링크 : https://www.server-world.info/en/note?os=CentOS_7&p=ssl&f=2
무료 인증서는 3개월 후에 만료되는데, cron 에 등록해 놓고 3개월마다 자동 갱신되도록 한다.
현재 시점을 기준으로 몇월 몇일에 업데이트 할지 정하면 된다.
vi /etc/crontab
# 매년 3월, 6월, 9월, 12월 1일 오전 2시 00에 인증서를 갱신하라
0 2 1 Mar,Jun,Sep,Dec * /usr/bin/certbot renew
도움이 되었다면 공감과 댓글 한번 부탁드립니다.
'Linux' 카테고리의 다른 글
집에서 ipTIME DDNS와 미니PC로 무제한 용량 개인 이메일 서버 만들기 (0) | 2023.03.03 |
---|---|
아마존 ec2 redhat 9 서버에서 명령어가 없는 경우 (0) | 2023.03.02 |
Linux CentOS - 유용한 명령어 모음 (2) | 2023.02.26 |
Linux Centos Stream 9 - Samba - 윈도우 파일공유 (0) | 2023.02.24 |
Jenkins - Git 연동하기 (Public Key 공개키 인증) (0) | 2023.02.18 |