Last active
March 12, 2021 03:20
-
-
Save joshuaquek/916548357b97a9e7583905ff4fc5af89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: Simple tutorial on generating a free SSL cert using LetsEncrypt on CentOS / RHEL (via Certbot) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install LetsEncrypt Certbot and symlink it | |
sudo snap install core; sudo snap refresh core | |
sudo snap install --classic certbot | |
sudo ln -s /snap/bin/certbot /usr/bin/certbot | |
# Set your Domain name and your email here | |
DOMAIN="mydomainnamehere.test.com" | |
EMAIL="[email protected]" | |
# Generate the Cert and the Private Key | |
set -eu | |
sudo certbot certonly --standalone --agree-tos --non-interactive --email $EMAIL --domains $DOMAIN | |
# Print out the generated Certificate | |
sudo cat /etc/letsencrypt/live/$DOMAIN/cert.pem | |
# Print out the generated Private Key | |
sudo cat /etc/letsencrypt/live/$DOMAIN/privkey.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment