C Contacts Server Configuration Scripts

This appendix provides information about the Oracle Communications Contacts Server configuration scripts.

init-config Script

The init-config script enables you to perform an initial configuration of your Contacts Server deployment.

Table C-1 shows the init-config options.

Table C-1 init-config Options

Option Description

-d

Writes an LDIF file instead of making changes to the Directory Server data.

-f statefile

Uses the statefile for setting input values. Use the nab.defaults file as an example.

-i hostname

Uses hostname as the FQDN of current host.

-l

Uses /bin/hostname for name of host. /bin/hostname must return an FQDN.

-s

Performs a silent install, requires the -f option.

-S statefile

Saves state of configurator input to a named statefile.

-v

Enables verbose mode.

-W

Use this option for WebLogic Server. It is applicable for the initial configuration.

Note: If you do not use this option, GlassFish Server is used as the default application server.


extractSSLArgs.sh Script

When you configure Contacts Server for the first time with Oracle WebLogic Server in a secure mode, run the extractSSLArgs.sh script. This script validates the SSL configuration details in Oracle WebLogic Server and stores the valid details in a format that is required by Contacts Server for all future deployments and processing.

Options

The following table lists the options for validating and storing Oracle WebLogic Server SSL details.

Table C-2 WebLogic Server Options

Option Description

-u

WebLogic Server Administrator User ID

-p

WebLogic Server Administrator User Password

-l

WebLogic Server Administrator URL

t3|t3s://FQDN:Weblogic AdminServer (SSL|NonSSL)Port

For example, t3://hostname.com:7001 Or t3s://hostname.com:7002

-r

Runtime directory under which /config/davadmin.properties file resides. For example, /var/opt/sun/comms/nabserver/config/davadmin.properties.

You can use this option only on the existing Contacts Server deployment which is already running on WebLogic Server. Use this option if WebLogic Server's keystore settings are modified after Contacts Server is deployed and those settings have to be updated on Contacts Server Configuration.


Running the Script for a Fresh Installation

  • Validate the SSL and Keystore configurations on WebLogic Server setup

  • Perform the steps in the "Installing and Configuring WebLogic Server" section to set up WebLogic Server in a secure mode

  • Keep the configuration details of WebLogic Server handy

To validate and store Oracle WebLogic Server SSL details for Contacts Server in a secure mode:

  1. Open a new terminal and prepare the terminal by sourcing the setDomainEnv.sh script of the Oracle WebLogic Server domain:

    cd Weblogic_Domain/bin
    
    source ./setDomainEnv.sh   OR  . ./setDomainEnv.sh
    
  2. Set the WLST_PROPERTIES environment variable depending on the selected Oracle WebLogic Server keystore configuration.

    • If the CustomIdentityandCustomTrust keystore option is configured as the Oracle WebLogic Server keystore configuration, set the WLST_PROPERTIES variable to:

      export WLST_PROPERTIES="-Dweblogic.security.TrustKeyStore=CustomTrust , -Dweblogic.security.CustomTrustKeyStoreFileName=Weblogic_Domain/mytrust.jks"
      

      where Weblogic_Domain/mytrust.jks is the location of truststore file location.

    • If the CustomIdentityandJavaStandardTrust keystore option is configured as the Oracle WebLogic Server keystore configuration, set the WLST_PROPERTIES variable to:

      export WLST_PROPERTIES="-Dweblogic.security.TrustKeyStore=JavaStandardTrust"
      
  3. Run the extractSSLArgs.sh bash shell script extractSSLArgs.sh which is available under the Contacts Server installed location: Contacts_Server_Installedlocation/sbin:

    sh ./extractSSLArgs.sh -u weblogic_admin_user -p weblogic_admin_user_password -l t3s://weblogic_server_host:SSL_port
    

    If the execution of the script is successful, it creates .wls_sslargs under the configuration directory of your Oracle WebLogic Server domain. You can verify the creation of .wls_sslargs by navigating to the Weblogic_Domain/config directory.

Running the Script to Repair Keystore Information

If you modify keystore settings of the in-production WebLogic Server on which Contacts Server is deployed, you must update the previously supplied SSL Keystore details on Contacts Server. By using the extractSSLArgs.sh -r option, you can update the keystore information.

  1. Ensure that WebLogic Server Keystore and SSL configurations are modified and you have the latest configuration details.

  2. Open a new terminal and prepare the terminal by sourcing the setDomainEnv.sh script of the Oracle WebLogic Server domain:

    cd Weblogic_Domain/bin
    
    source ./setDomainEnv.sh   OR  . ./setDomainEnv.sh
    
  3. Set the WLST_PROPERTIES environment variable. See step 2 in "Running the Script for a Fresh Installation". Ensure to enter the latest keystore details.

  4. Run the following script:

    sh ./extractSSLArgs.sh -u weblogic_admin_user -p weblogic_admin_user_password -l t3s://weblogic_server_host:SSL_port  -r naberver_runtime_dir
    

    For example,

    sh extractSSLArgs.sh -u weblogic -p weblogic123 -l t3s://myhost.domain.com:7002 -r /var/opt/sun/comms/nabserver

  5. Restart WebLogic Server.

    Weblogic_Domain/config/.wls_sslargs and nabserver_runtime_dir/config/davadmin.properties files are updated according to the Keystore modifications performed on WebLogic Server.

    Note:

    ContactsServer_home/config/ contains the davadmin.properties file. CLI davadmin utility of the product uses the davadmin.properties file. Therefore, any modifications performed on WebLogic Server for keystore settings must reflect in the davadmin.properties file.

Database Installation Scripts

Contacts Server ships with Perl scripts to prepare a new database installation. You can use these scripts instead of manually preparing a new database installation.

config-mysql Script

The config-mysql script prepares a new MySQL installation for use with Contacts Server.

Caution:

If you already have a running instance of MySQL server, read the following information carefully before using this script.

Syntax and Examples

config-mysql [options]

Table C-3 shows the config-mysql options:

Table C-3 config-mysql Options

Option Description

--help | -?

Prints help.

--contacts | -c

Configures the contacts database.

--server | -s

Configures the MySQL server instance.

--user | -u

Creates the MySQL database user.


To set up a new MySQL Server instance, and the default back end:

config-mysql -s -u -c

To set up just a new contacts back end on any existing instance:

config-mysql -c

Running the config-mysql Script

The config-mysql script creates a minimal instance configuration in the /etc/my.cnf file for use with the Contacts Server database.

To run the config-mysql script:

  1. Copy the config-mysql and Util.pm scripts from a host where Contacts Server is installed to the host where MySQL is installed.

    Both scripts are located in the ContactsServer_home/tools/unsupported/bin directory.

  2. On the host where MySQL is installed, as root, launch the config-mysql script with options -s, -u, and -c.

    The script creates a log file in the /tmp directory with a name such as config-mysql_YYYYMMDDHHMMSS.log.

  3. If you receive a message that the script has found existing instance configuration in the /etc/my.cnf file, enter yes to overwrite the existing instance configuration, or no to exit.

  4. Enter the instance data directory.

    If you choose a directory that already exists, the script assumes that it belongs to an existing MySQL instance and that it might contain useful data. If that's not the case and you want to use that directory, remove the directory first.

  5. Enter the MySQL root user password, and enter again to confirm.

  6. Enter the db user, password (once more to confirm), and contacts db name.

    The script then outputs the list of tasks to be performed and asks you to confirm before proceeding.

  7. Enter y to proceed.

    The script performs the following steps:

    • Stops the running MySQL instance.

      This step is run regardless of whether an instance is running. You might see the following message, which you can safely ignore:

      ERROR! MySQL server PID file could not be found!
      
    • Runs the mysql_install_db command to create the instance data directory specified in Step 3.

    • Creates a minimal /etc/my.cnf file for the instance.

    • Copies the mysql.server script to the system startup and shutdown directory.

    • Starts the MySQL server by using the configuration in the /etc/my.cnf file.

    • Uses the mysqladmin script to change the root password specified in Step 5.

    • Runs mysql_secure_installation script to secure the newly created MySQL instance.

    • When the script asks for the existing root password, use the one from Step 5 and answer no to the "Change the root password?" question.

      One of the tasks in the mysql_secure_installation script is to change the root password (because a fresh instance has a blank root password).

    • The last step is for the script to create the contacts database and database user by using the mysql tool.

config-oracle Script

The config-oracle script prepares a running Oracle Database instance for use with Contacts Server. The config-oracle script is supported by Oracle Database 11g Release 2 and Oracle Database 12c, not pluggable (non-CDB).

Note:

You cannot use the config-oracle script for an Oracle Database 12c container database (that is, one that uses a pluggable database). Instead, you must manually prepare an Oracle Database 12c container database for use with Contacts Server. See "Preparing Oracle Database for Use with Contacts Server" for more information.

Before running this script, ensure that you have run the oraenv or coraenv script. The script creates a log file in the /tmp directory with a name such as config-oracle_YYYYMMDDHHMMSS.log.

Syntax and Examples

config-oracle [options]

Table C-4 shows the config-oracle options:

Table C-4 config-oracle Options

Option Description

--help | -?

Prints help.

--contacts | -c

Configures the contacts database.


To set up the default back end:

config-oracle -c

Running the config-oracle Script

To run the config-oracle script:

  1. Copy the config-oracle and Util.pm scripts from a host where Contacts Server is installed to the host where Oracle Database is installed.

    Both scripts are located in the ContactsServer_home/tools/unsupported/bin directory.

  2. On the host where Oracle Database is installed, as root, enter the following command:

    config-oracle -c
    
  3. Enter the Oracle SYS user password.

  4. Enter the contacts database user name and password.

    The script outputs the list of tasks to be performed.

  5. Enter Y to proceed.

    The script creates the contacts database user and schemas.