هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
ماذا يفعل
Certbot speaks the ACME protocol with Let's Encrypt: it proves you control a domain (an HTTP file or a DNS record), gets a certificate valid for 90 days, can install it into nginx or Apache, and renews it with a timer before it expires. On RHEL, install it from EPEL (certbot, python3-certbot-nginx, python3-certbot-apache).
Certificates live in /etc/letsencrypt/live/DOMAIN/ (fullchain.pem, privkey.pem).
طريقة الكتابة
certbot [SUBCOMMAND] [OPTION]...
certbot certonly --webroot -w DIR -d DOMAINالأجزاء الرئيسية
Subcommands
run(default)- Get a certificate and install it.
certonly- Only get the certificate.
renew- Renew all certificates that expire soon.
certificates- List certificates and their expiry dates.
delete--cert-nameNAME- Delete a certificate.
revoke--cert-pathFILE- Revoke a certificate.
reconfigure- Change the renewal settings.
register/update_account/unregister- Manage the ACME account.
الخيارات 14
الأكثر استخدامًا
Main options
لا يوجد شيء يطابق هذا الفلتر.
أمثلة 10
$ مستخدم عادي# بصلاحية root (أو مع sudo)
1Install on RHEL
2Get and install a certificate for nginx
certbot --nginx -d shop.example.com -d www.shop.example.com --email admin@example.com --agree-tos -n3Only get the certificate with the webroot method
certbot certonly --webroot -w /srv/www/shop -d shop.example.com4Get a wildcard certificate with a DNS challenge
certbot certonly --manual --preferred-challenges dns -d '*.example.com' -d example.com5Test on staging first
certbot certonly --staging --nginx -d test.example.com6List certificates and expiry dates
certbot certificates7Test and run the renewal
8Use the files in a server config
cat /etc/nginx/conf.d/shop-tls.conf ssl_certificate /etc/letsencrypt/live/shop.example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/shop.example.com/privkey.pem;9Check the certificate from outside
10Revoke and delete a certificate
certbot revoke --cert-name shop.example.com certbot delete --cert-name shop.example.com
لا يوجد شيء يطابق هذا الفلتر.
انتبه
- Let's Encrypt has rate limits; test with
--staging. - Keep
/etc/letsencrypt/backed up and private: it contains the private keys. - The HTTP challenge needs port 80 open from the internet.
الملفات
/etc/letsencrypt/live/DOMAIN/- Current certificate files (links).
/etc/letsencrypt/renewal/DOMAIN.conf- Renewal settings.
/var/log/letsencrypt/letsencrypt.log- Log.
نصائح للحفظ
- In Kubernetes use cert-manager instead; for Traefik/Caddy the proxy does ACME itself.
رموز الخروج
0 | Success. |
1 | Error. |