How to install and renew Free Let’s Encrypt SSL/TLS Certificates

Prerequisites:-

A. Have Apache / httpd / nginx installed. 

B. WebSite Will be allowable in Public.

C. Create a DNS record that associates your domain name and your server’s public IP address.


1. install Certbot PKG.

# yum install certbot           ( For Centos or RHEL ) 

# apt-get install certbot       ( For Ubuntu )


2. Create Certificate

#  certbot certonly --manual -d yourwebsite.domain

Saving debug log to /var/log/letsencrypt/letsencrypt.log

Plugins selected: Authenticator manual, Installer None

Enter email address (used for urgent renewal and security notices) (Enter 'c' to

cancel): your_Email_ID


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Please read the Terms of Service at

https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017-w-v1.3-notice.pdf.

You must agree in order to register with the ACME server at

https://acme-v02.api.letsencrypt.org/directory

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(A)gree/(C)ancel: A


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Would you be willing to share your email address with the Electronic Frontier

Foundation, a founding partner of the Let's Encrypt project and the non-profit

organization that develops Certbot? We'd like to send you email about our work

encrypting the web, EFF news, campaigns, and ways to support digital freedom.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(Y)es/(N)o: y

Obtaining a new certificate

Performing the following challenges:

http-01 challenge for raju.com


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

NOTE: The IP of this machine will be publicly logged as having requested this

certificate. If you're running certbot in manual mode on a machine that is not

your server, please ensure you're okay with that.


Are you OK with your IP being logged?

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(Y)es/(N)o: y


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Create a file containing just this data:


l3oRzxER3h-zRZXftJIWPl6EMwRKzMKua2TfUxlKYHk.oZ8TP8uXNa_M-SBLn9_7jJSeh63lmRzzjE9-ivcJucA


And make it available on your web server at this URL:


http://yourwebsite.domain/.well-known/acme-challenge/l3oRzxER3h-zRZXftJIWPl6EMwRKzMKua2TfUxlKYHk


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Press Enter to Continue



3. Open New Terminal and go to your Web folder

#  cd /var/www/html/web1


4. Create Folder and file. as per your Output. 

# mkdir -p .well-known/acme-challenge/

# cd  .well-known/acme-challenge/

# vim l3oRzxER3h-zRZXftJIWPl6EMwRKzMKua2TfUxlKYHk  ( add containing just this data )

 l3oRzxER3h-zRZXftJIWPl6EMwRKzMKua2TfUxlKYHk.oZ8TP8uXNa_M-SBLn9_7jJSeh63lmRzzjE9-ivcJucA


5. Check your website Open web Browser and copy the Link

http://yourwebsite.domain/.well-known/acme-challenge/l3oRzxER3h-zRZXftJIWPl6EMwRKzMKua2TfUxlKYHk


if web Browser Link Working Then go to 1st Terminal and "Press Enter to Continue" 


Waiting for verification...

Cleaning up challenges


IMPORTANT NOTES:

 - Congratulations! Your certificate and chain have been saved at:

   /etc/letsencrypt/live/yourwebsite.domain/fullchain.pem

   Your key file has been saved at:

   /etc/letsencrypt/live/yourwebsite.domain/privkey.pem

   Your cert will expire on 2021-09-14. To obtain a new or tweaked

   version of this certificate in the future, simply run certbot

   again. To non-interactively renew *all* of your certificates, run

   "certbot renew"

 - If you like Certbot, please consider supporting our work by:


   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate

   Donating to EFF:                    https://eff.org/donate-le



6. Now add the certificate in your Website. 

Apache / httpd / nginx 



Apache and Httpd  Add Below Line. 

SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/yourwebsite.domain/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/yourwebsite.domain/privkey.pem
SSLCertificateChainFile  /etc/letsencrypt/live/yourwebsite.domain/fullchain.pem


Nginx Add Below Line. 

ssl on;
ssl_certificate /etc/letsencrypt/live/yourwebsite.domain/cert.pem;
ssl_certificate_key /etc/letsencrypt/live/yourwebsite.domain/privkey.pem;


Comments

Popular posts from this blog

PCS Corosync Pacemaker Cluster Mariadb using NFS

How to install and configure node js and PM2 in rhel7

How to Create or Configure iSCSI Server and Clinet