LetsEncrypt (Ubuntu 18.04): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 18: | Zeile 18: | ||
sudo chmod 0755 /usr/local/bin/certbot-auto | sudo chmod 0755 /usr/local/bin/certbot-auto | ||
</pre> | </pre> | ||
Folgender Befehl fügt einen Cron-Job zu den systemweiten Cronjobs hinzu: | |||
<pre> | <pre> | ||
echo "0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && /usr/local/bin/certbot-auto renew -q" | sudo tee -a /etc/crontab > /dev/null | echo "0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && /usr/local/bin/certbot-auto renew -q" | sudo tee -a /etc/crontab > /dev/null | ||
</pre> | |||
Systemweiten Cronjobs auflisten: | |||
<pre> | |||
less /etc/crontab | |||
</pre> | </pre> | ||
Version vom 2. März 2020, 22:13 Uhr
Noch in Bearbeitung
Installation
Ubuntu
sudo apt-get install certbot python-certbot-apache
Raspbian
wget https://dl.eff.org/certbot-auto sudo mv certbot-auto /usr/local/bin/certbot-auto sudo chown root /usr/local/bin/certbot-auto sudo chmod 0755 /usr/local/bin/certbot-auto
Folgender Befehl fügt einen Cron-Job zu den systemweiten Cronjobs hinzu:
echo "0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && /usr/local/bin/certbot-auto renew -q" | sudo tee -a /etc/crontab > /dev/null
Systemweiten Cronjobs auflisten:
less /etc/crontab
Migration bestehender Zertifikate
Backup
sudo ls -l /etc/letsencrypt/live/tutorials-rasp.kirner.or.at
insgesamt 0 lrwxrwxrwx 1 root root 52 Jän 11 10:31 cert.pem -> ../../archive/tutorials-rasp.kirner.or.at/cert20.pem lrwxrwxrwx 1 root root 53 Jän 11 10:31 chain.pem -> ../../archive/tutorials-rasp.kirner.or.at/chain20.pem lrwxrwxrwx 1 root root 57 Jän 11 10:31 fullchain.pem -> ../../archive/tutorials-rasp.kirner.or.at/fullchain20.pem lrwxrwxrwx 1 root root 55 Jän 11 10:31 privkey.pem -> ../../archive/tutorials-rasp.kirner.or.at/privkey20.pem
sudo ls -l /etc/letsencrypt/renewal
insgesamt 4 -rw-r--r-- 1 root root 594 Jän 11 10:31 tutorials-rasp.kirner.or.at.conf
sudo tar -chvzf certs_raspberry2.tar.gz /etc/letsencrypt/archive/tutorials-rasp.kirner.or.at \ /etc/letsencrypt/renewal/tutorials-rasp.kirner.or.at.conf
Restore
cd / sudo tar -xvf ~/temp/certs_raspberry2.tar.gz sudo mkdir -p /etc/letsencrypt/live/tutorials-rasp.kirner.or.at
sudo ln -s /etc/letsencrypt/archive/tutorials-rasp.kirner.or.at/cert20.pem /etc/letsencrypt/live/tutorials-rasp.kirner.or.at/cert.pem sudo ln -s /etc/letsencrypt/archive/tutorials-rasp.kirner.or.at/chain20.pem /etc/letsencrypt/live/tutorials-rasp.kirner.or.at/chain.pem sudo ln -s /etc/letsencrypt/archive/tutorials-rasp.kirner.or.at/fullchain20.pem /etc/letsencrypt/live/tutorials-rasp.kirner.or.at/fullchain.pem sudo ln -s /etc/letsencrypt/archive/tutorials-rasp.kirner.or.at/privkey20.pem /etc/letsencrypt/live/tutorials-rasp.kirner.or.at/privkey.pem
Links
https://ivanderevianko.com/2019/03/migrate-letsencrypt-certificates-certbot-to-new-server
Links
https://certbot.eff.org/lets-encrypt/debianother-apache
Zurück zu LetsEncrypt