Prerequisites

Deploy Mirage Gateway OVA.

Procedure

  1. Log in to the Mirage Gateway command-line utility with your Mirage account.
  2. Go to the following directory location:
    /opt/MirageGateway/tomcat/ssl
  3. To delete the older certificate files, run the following command:
    order: rm tomcat.csr tomcat.cer tomcat.ks
  4. Generate a certificate.
    1. Go to the /opt/MirageGateway/tomcat/conf folder, and open the server.xml file for editing, and search for the parameters:

      keystorePass="vmware" maxThreads="150" SSLEnabled="true" scheme="https"

      Change the value of the keystorePass parameter to your own keystore password. The default password is vmware.

      Note:

      The keystore password and key password must be the same as the password in the server.xml file.

    2. Go to the following location directory location:

      /opt/MirageGateway/tomcat/ssl

    3. To create an untrusted certificate in a keystore file named tomcat.ks, run the following command:

      keytool -keystore tomcat.ks -storepass vmware -genkey -keyalg RSA -alias tomcat -validity 3650
    4. When prompted, provide the answers to the keytool questions.

    5. Create a certificate signing request for the Tomcat service. To create a certificate signing request in the file tomcat.csr, run the following command:

      keytool -keystore tomcat.ks -storepass vmware -certreq -alias tomcat -file tomcat.csr
  5. Send the certificate signing requests to your Certification Authority.
  6. When you receive the signed certificates, import them into the keystore file.
    1. Import the Certification Authority root certificate into the keystore file. To import the root certificate from the root.cer file to the tomcat.ks keystore file, run the following command:

      keytool -keystore tomcat.ks -storepass vmware -import -alias root -file root.cer
    2. Import the certificate for the Tomcat service. To import the certificate from the tomcat.cer file to the tomcat.ks keystore file, run the following command:

      keytool -keystore tomcat.ks -storepass vmware -import -alias tomcat -file tomcat.cer
  7. To verify that all the certificates are imported, run the following command to view the contents of the keystore file.
    keytool -keystore tomcat.ks -storepass vmware -list
  8. To restart Tomcat, run the following commands:
    1. Go to the /opt/MirageGateway/tomcat/bin directory location using the root account.

    2. To stop the Tomcat server, run ./shutdown.sh.

    3. To start the Tomcat server, run ./startup.sh.