py-certbot 1.10 설치
/usr/ports/security/py-certbot
make config
make all install clean
설치한 다음에 나오는 중요한 정보
This port installs the "standalone" client only, which does not use and
is not the certbot-auto bootstrap/wrapper script.
The simplest form of usage to obtain certificates is:
# sudo certbot certonly --standalone -d <domain>, [domain2, ... domainN]>
NOTE:
The client requires the ability to bind on TCP port 80 or 443 (depending
on the --preferred-challenges option used). If a server is running on that
port, it will need to be temporarily stopped so that the standalone server
can listen on that port to complete the challenge authentication process.
For more information on the 'standalone' mode, see:
https://certbot.eff.org/docs/using.html#standalone
The certbot plugins to support apache and nginx certificate installation
will be made available in the following ports:
* Apache plugin: security/py-certbot-apache
* Nginx plugin: security/py-certbot-nginx
In order to automatically renew the certificates, add this line to
/etc/periodic.conf:
weekly_certbot_enable="YES"
More config details in the certbot periodic script:
/usr/local/etc/periodic/weekly/500.certbot-3.7
이 패키지는 보안연결서버를 인증해줄 때 사용한다. 먼저 /etc/periodic.conf 를 새로 만들어나, 있는 문서에 다음 내용을 더해준다. 이렇게 설정하면 일주일 간격으로 인증기간을 자동으로 연장해 준다.
weekly_certbot_enable="YES"
'sockstat' | grep http 를 실행해서 port 80과 443이 보이면 다음 명령을 실행해서 내가 돌리는 서버인 my.domain를 인증받는다.
certbot certonly --webroot -w /usr/local/www/apache24/data -d my.domain
제대로 실행이 되고 인증을 받았다면 다음과 같은 보안문서들이 저장된다.
/usr/local/etc/letsencrypt/live/my.domain/cert.pem
/usr/local/etc/letsencrypt/live/my.domain/privkey.pem
/usr/local/etc/letsencrypt/live/my.domain/fullchain.pem
이 단계는 반드시 성공해야 한다. 나중에 이 인증서들로 아파치와 전자우편을 보안연결을 통해서 접속하는 서버로 만들 것이기 때문이다.
참고로 하나의 문서로 다수의 가상서버를 인증 받을 수 있는데, 혹시라도 그 중 하나를 인증취소하려면 다음과 같이 하면 된다.
certbot delete --cert-name example.com