How to Generate CSR on CentOS?

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Generate CSR on CentOS

Steps to Generate CSR on CentOS

This guide will show you how to generate Certificate Signing Request in CentOS Server.

To generate the CSR, you have two options.

  • Automatic CSR Generation Tool: Using our free CSR generation tool, generating CSR on CentOS is easy and quick. You need to provide some basic details like Common Name (CN), Organization (O), Locality (L), etc., and the tool will automatically generate CSR for you.
  • Use OpenSSL Command: If you want more granular control over the CSR generation process, you can use OpenSSL commands. Check for the below steps.

CSR Generation Steps on CentOS using OpenSSL Command

  • Open the OpenSSL configuration file. This file contains the OpenSSL configuration settings.

Run this command:

nano /etc/openssl.cnf
  • In the file, locate the section [req] and uncomment the line req_extensions = v3_req.
  • This enables the standard X.509v3 extensions in the CSR.
  • Save the file by pressing Ctrl+O in nano.
  • Generate a new private key. This will be used to generate the CSR.

Run this command:

openssl genrsa -des3 -out privatekey.pem 2048
  • This will prompt you to enter a passphrase to encrypt the private key.
  • Generate the CSR using the private key.

Use the following command:
openssl req -new -out CSR.csr -key privatekey.pem -config /etc/openssl.cnf

  • This will prompt you for details to include in the CSR like Common Name, Organization, etc.
  • Your CSR file CSR.csr will be generated in the same directory.
  • Submit this CSR.csr file to a certificate authority to obtain an SSL certificate.

Once you receive the SSL certificate, you can install SSL on CentOS server to enable HTTPS.

Buy SSL Certificates