CSR is generated in 2 steps.
I. Private key generation
1. Log into server and open the Terminal application.
2. At the prompt type commands from below and press return after each one:
cd
openssl md5 * > rand.dat
openssl genrsa -rand rand.dat -des 2048 > key.pem 3. At the next prompt type a password and return again. The password unlocks server's certificate key. You will need it after enabled SSL on server.
4. Create a directory ssl.key, if it does not exist on the server:
/etc/httpd/ssl.key 5. Copy a key.pem to ssl.key directory and change the name on server.key.
II. CSR file creation
1. At the prompt type the following command and press return:
openssl req -new -key key.pem -out csr.pem 2. Enter the following information:
Country: enter two-letter country code, e.g. UK,
State: state or province where organization operates,
Locality: town or city,
Organization Name: full name of company,
Organization Unit: division which is responsible for SSL,
Common Name: fully qualified domain name you want to secure,
E-mail address: contact mail. The file csr.pem is generated from the data you provided.
3. You can open it with text editor. CSR is necessary to issue a SSL certificate.