# Installation Guide

# Installing the Database

This chapter provides an overview of the process of installing the database for use with Oracle Communications Services Gatekeeper.

- Outline of Installation
- Install an Oracle 10g with RAC Database
- Install an Oracle 10g Single Instance Database
- Install a MySQL Database

Note: | Individual files names are given in the form: filename<version>.type. As an example, the file referred to as jrockit-j2sdk<version>.bin.gz could have the full name jrockit-j2sdk1.4.2_05-linux-ia32.bin.gz

## Outline of Installation

Although there are substantial differences among the installation procedures for each type of database, all installation types include the following basic steps:

- Install the base software
- Set up a user account that Oracle Communications Services Gatekeeper will use to access the database
- Give the user account appropriate privileges on the database

## Install an Oracle 10g with RAC Database

Use these instructions if you are using Oracle 10g with RAC as your database. For more information on using OWLS RAC with multidatasource configuration, see Oracle WebLogic Server Configuring and Managing WebLogic JDBC at http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jdbc_admin/.

Note: | This is the only database configuration supported for production environments that require High Availability.

### 1. Set up the base configuration

Oracle 10g RAC must be installed on dedicated servers not running in the cluster building up the Oracle Communications Services Gatekeeper.

1. Install the Oracle 10g RAC database software using the instructions provided by Oracle.
2. Download and install the latest patch set. This is important because significant improvements have been made with regards to fail-over.

### 2. Use these recommended configuration options

1. Create the database using the Transaction Processing template.
2. Use Automatic Storage Management.
3. Use the Dedicated Server Mode for the database.
4. Change the processes parameter:

Define the number or of processes to be equal to (`wlng.datasource MaximumCapacity + wlng.localTX.datasource MaximumCapacity`) times the number of Oracle Communications Services Gatekeeper servers in the cluster. MaximumCapacity is defined as a parameter in the connection pool settings for the JDBC datasources. Normally this value is 150 for both datasources.

### 3. Define a database user

1. Create a database user for Oracle Communications Services Gatekeeper with an allowed (unlimited) quota on its default tablespace, (the users tablespace).The user name and password for the user are later copied to each Oracle Communications Services Gatekeeper Server.
2. The user must be granted the following privileges:

- CREATE SESSION
- CREATE TABLE

Oracle Communications Services Gatekeeper must be configured with an additional set of parameters to make it work correctly with the database. This action is performed during the domain configuration phase. See Configuring the Domain for Oracle Communications Services Gatekeeper for more information.

### 4. Configure the Oracle database for backup

1. Configure the Oracle database for backup as described in the System Backup and Restoration Guide.

## Install an Oracle 10g Single Instance Database

Follow the instructions in this section if you are using an Oracle 10g single instance as your database.

### 1. Set up the base configuration

The Oracle 10g instance must be installed on a dedicated server not running in the cluster building up the Oracle Communications Services Gatekeeper.

1. Install the Oracle 10g database software using the instructions provided by Oracle.

### 2. Use these recommended configuration options

1. Create the database using the Transaction Processing template.
2. Use Automatic Storage Management.
3. Use Dedicated Server Mode for the database.
4. Change the processes parameter:

Define the number or of processes to be equal to (`wlng.datasource MaximumCapacity + wlng.localTX.datasource MaximumCapacity`) times the number of Oracle Communications Services Gatekeeper servers in the cluster. MaximumCapacity is defined as a parameter in the connection pool settings for the JDBC datasources. Normally this value is 150 for both datasources.

### 3. Define a database user

1. Create a database user for Oracle Communications Services Gatekeeper with an allowed (unlimited) quota on its default tablespace, (the users tablespace). The user name and password for the user are later defined in each Oracle Communications Services Gatekeeper Server.
2. The user must be granted the following privileges:

- CREATE SESSION
- CREATE TABLE

Oracle Communications Services Gatekeeper must be configured with an additional set of parameters to make it work correctly with the database. This action is performed during the domain configuration phase. See Configuring the Domain for Oracle Communications Services Gatekeeper for more information.

### 4. Configure the Oracle database for backup

1. Configure the Oracle database for backup as described in the System Backup and Restoration Guide

## Install a MySQL Database

Follow the instructions in this section if you are using MySQL as your database.

Note: | MySQL is not supported in environments that require High Availability.

MySQL can be installed either on a server in the cluster building up the Oracle Communications Services Gatekeeper or on a separate server. If it is installed in the cluster, it should be in the same server as the Network Tier.

Before you start, make sure you have the appropriate installation binaries (5.0 or 5.1) for your platform. The binaries can be downloaded from `http://www.mysql.com`.

1. Copy the installation file to the desired directory.
2. Follow the installation instructions for your platform. These may vary widely depending on your platform and the type of binary you chose to download. You may need to be logged in with administrative privileges.

Linux:

The following is a summary of the commands needed to install MySQL on some versions of Linux. You should check the specific instructions for your version. It assumes an installation directory of`/usr/local:`

1. Create a group for mysql and add the mysql user to it:

    groupadd mysql
    useradd -g mysql mysql

2. Run the installation script:

    cd /usr/local
    ln -s /usr/local/mysql-standard-<version> mysql
    cd mysql
    scripts/mysql_install_db --user=mysql

3. Set ownership:

    chown -R root .
    chown -R mysql data
    chgrp -R mysql .

4. Start the database:

    bin/mysqld_safe --user=mysql &

5. Create a file, /usr/local/mysql/data/my.cnf, and set the following connection variable, so that `max_connections` is equal to (`wlng.datasource MaximumCapacity + wlng.localTX.datasource MaximumCapacity`) times the number of Oracle Communications Services Gatekeeper servers in the cluster. MaximumCapacity is defined as a parameter in the connection pool settings for the JDBC datasources. Normally this value is 150 for both datasources. For example:

    [mysqld]

    set-variable=max_connections=400

You should also add settings for default character set and storage engine:

`set-variable=default-character-set=<desired character set>`

Note: | The recommended character set is `latin1.`

`set-variable=default-storage-engine=<desired default storage engine>`

6. Restart MySQL.

Windows:

The Windows version is available with a GUI installer. Detailed instructions on using the installer are available at the MySQL web site. Unless you need to install the database in a non-standard location, you can select Typical Install.

You can also use the Instance Configuration Wizard to do configuration basics. (Use the default choice unless specified below):

- Select Detailed Configuration
- Select your appropriate usage type

Note: | The recommended usage type is Non-transactional Database.

- To set concurrent connections, select Manual and choose a value equal to (`wlng.datasource MaximumCapacity + wlng.localTX.datasource MaximumCapacity`) times the number of Oracle Communications Services Gatekeeper servers in the cluster. MaximumCapacity is defined as a parameter in the connection pool settings for the JDBC datasources. Normally this value is 150 for both datasources. Use the dropdown menu. You can change this value later if necessary.
- Check Enable TCP/IP Networking (the standard port is fine unless you need to change it for your particular installation)
- Select your default character set.

Note: | The recommended character set is Latin1.

- Select Install as Windows Service if you desire
- Select Modify Security Settings and set a root password.
- Do not check Enable root access from remote machines

1. Setting MySQL to autostart on reboot is recommended. Refer to the instructions for MySQL and the operating system. If you are installing on Windows, you can set up MySQL to run as a Windows Service (see above).
2. Create the Oracle Communications Services Gatekeeper database user and password and give it access privileges using the SQL command. You will need this user name and password for the domain configuration stage of the installation. (For information on the various command level modes of accessing the MySQL server, see the documentation on the MySQL website.

    GRANT ALL ON *.* TO <Gatekeeper database user>@'<ip-address>' IDENTIFIED BY '<password>'

You must do this for every IP address in the cluster.

3. Create the database for Oracle Communications Services Gatekeeper. This name will be used in the Domain Configuration stage of the installation The standard way to do this is to issue the following SQL command

    CREATE DATABASE <database name>

4. Oracle Communications Services Gatekeeper must be configured with an additional set of parameters to make it work correctly with the database. This action is performed during the domain configuration phase. See Configuring the Domain for Oracle Communications Services Gatekeeper for more information.

### Replace the Connector JAR File

If you choose to use MySQL 5.1, you must replace the existing MySQL 5.0 connector JAR file with the MySQL 5.1 connector JAR file.

1. Replace this file:

    mysql-connector-java-commercial-5.0.3-bin.jar

with this file:

    mysql-connector-java-5.1.10-bin.jar

in following directories:

- `$WL_HOME/server/ext/jdbc/mysql`
- `$WL_HOME/server/lib`

2. Add `mysql-connector-java-5.1.10-bin.jar` to the class path, making sure it is placed before the 5.0 JAR file if that is also specified in the class path.