Generate an RSA private key:

# openssl genrsa -des3 -out server.key.encrypted 1024

Create a self-signed certificate (make sure to enter the FQDN for the ‘Common Name’)

# openssl req -new -x509 -nodes -sha1 -days 365 -key server.key.encrypted -out server.crt

Remove the password from the encrypted key

# openssl rsa -in server.key.encrypted -out server.key
# chmod 400 server.key