해당 OS의 패키지 매니저를 이용하여 certbot과 웹서버 모듈을 설치해준다.
Ubuntu에서 Apache를 사용하는 경우를 가정함
certbot 설치
sudo apt install certbot
certbot의 apache 모듈을 설치
sudo apt install python3-certbot-apache
최초에는 인증서를 받기 위해 해당 도메인의 소유 여부를 확인하는 절차가 필요하다. standalone과 webroot 방식을 이용해 도메인 소유 여부를 확인하는데, 전자는 certbot이 소형 웹서비스를 직접 실행하는 방법이고, webroot는 특정 경로에 파일을 만들어두는 식이다.
sudo certbot certonly --standalone -d domain.com
sudo certbot certonly --webroot -d domain.com
sudo certbot -d domain.com,www.domain.com,admin.domain.com --apache