Installing IBM Rational Build Forge using the command line on UNIX/Linux

Technote (FAQ)


Question

How can I install IBM Rational Build Forge 7.1.x.x on UNIX or Linux using the command line? This technote covers step-by-step directions for completing the installation process via command line with the use of the IBM Installation Manager.

Cause

ADVISORY: In general, the command line installation process should only be used when use of the IBM Installation Manager under a graphical interface is not available, as the level of difficulty for this procedure is higher (over using the general GUI IBM Installation Manager method).

The command line installation process laid out in this technote assume that you have followed the pre-installation steps, such as

  1. Setting up the database and the database client
  2. You have the JDBC driver for your chosen database
  3. You are running as root with a umask of 002. If this is not the case, review the final section regarding file and directory security.
  4. The IBM Installation Manager has been installed.

Answer







1. Prepare the response file



The response file is used by the IBM Installation Manager to perform the silent installation.
The name of the response file does not matter, however for the purposes of this technote we will use buildforgeinstall.xml for the response file name. This file can be broken down into required items, database specific items and conditional items. This is a collection of key=value pairs of information. Note that the values are contained under single quotes in the appropriate fields. The defaults are marked as bold.


Core entries:
<profile id='' installLocation=''>

<data key='eclipseLocation' value=''/>

[path] Install location i.e. /opt/buildforge
<repository location=''/> [path] directory to the packages i.e. /opt/buildforge/Manager/depo
<data key='user.buildforge.licenseServer' value=''/> [license server hostname] This is the ip address or hostname of your Rational License server

Enterprise Plus:

<path to BF distribution>/license/irbf_license.properties

<data key='user.buildforge.licensePort' value=''/> [license server port] This is the port your rational license server is listening on (27000)

Enterprise Plus:

Set this option to FILE

<data key='user.buildforge.schema.question' value=''/> [y|n]

y= Apply the Build Forge schema to the database using the new bfschema tool. Only needed if the schema is not already applied.

n=Do not apply the Build Forge schema to the database. Choose this option if the Build Forge tables already exist, or you are planning on manually running the bfschema tool per step 6.

<data key='user.buildforge.dbHost' value=''/> [BF database host] The ip address/hostname of your database
<data key='user.buildforge.dbPort' value=''/> [BF database port] The port your database is listening on
<data key='user.buildforge.dbName' value=''/> [BF database name] The name of your database instance
<data key='user.buildforge.dbUser' value=''/> [BF database user account] The user you will connect to your database as
<data key='user.buildforge.dbPass' value=''/> [BF DB user account password] The password you will use for the above database account
<data key='user.buildforge.dbPassEncrypted' value=''/> [y|n]

y=The db_password is given in encrypted format.

n=The db_password is given as clear text. Note:This will always be the choice for a manual install.

<data key='user.buildforge.dbType' value=''/> [db2|mysql|oracle] The database type you will be using
<data key='user.buildforge.keystore.password' value=''/> !!REQUIRED!! This is a password that is used for either the generated certificate or the exported one. This password doesn't exist, make one up that you will remember
<data key='user.buildforge.console_startup' value=''/> [start|nostart]

start=Start the Build Forge engine when install completes

nostart=Do nt start the engine after install completes. You will need to manually start the engine using the /opt/buildforge/rc/buildforge start script.

<data key='user.buildforge.keystore.password.encrypted' value=''/> [y|n] Is the above password encrypted. This will be "n" for a manual install.
= l
Database specific items:
<data key='user.buildforge.dbSchema' value=''/> [schema name] The schema the database will reside in.
<data key='user.buildforge.driverLib' value=''/> [path] The directory that holds the database driver

DB2: libdb2.(a|so),libdb2osse.(a.so)

Typically found in $DB2_HOME/lib32.

Oracle: libclntsh.so.

Typically found in $ORACLE_HOME/lib or $ORACLE_HOME

MySQL:libmysqlclient.so

Typically found in /usr/lib, or $MYSQL_HOME/lib

<data key='user.buildforge.jdbcDriverDir' value=''/> [path] The directory that contains the jdbc drivers for the database you have chosen
<data key='user.buildforge.jdbcDrivers' value=''/> The string is used to tell the installer on what jar file(s) to look for. Pick the correct string for your database.

DB2: db2jcc.jar,db2jcc_license_cu,jar|ojdbc14.jar

Typically found in $DB2_HOME/java or $DB2DIR/java

Oracle: ojdbc14.jar

Typically found in $ORACLE_HOME/lib or $ORACLE_HOME

MySQL:mysql-connector-java-5.*-bin.jar

Note: Use the 5.0.x version not the 5.1.x version JDBC driver for MySQL

DB2:
<data key='user.buildforge.db2Home' value=''/> [path] The value of the $DB2_HOME or $DB2DIR env variable
Oracle:
<data key='user.buildforge.oracleHome' value=''/> [path] The value of the $ORACLE_HOME env variable
<data key='user.buildforge.oracleTNS' value=''/> [path] The value of the $TNS_ADMIN env variable
Third party apps:
<data key='user.buildforge.file_storage' value=''/> [path] A temporary directory for the install

i.e. /opt/buildforge/temp

Apache\PHP:
<data key='user.buildforge.apache.install' value=''/> [y|n]

y=Use the packaged Apache. (default)

n=Point the installer to a currently installed Apache.

Note: "n" is an advanced user choice. Please only use it if you have a good understanding of Apache configuration

<data key='user.buildforge.apache.https' value=''/> [y|n]

y=Turn on SSL for Apache. This will enable port 443, or the port you specify in apache_port for https. You will connect using https://server:port.

n=This will not turn on SSL for Apache. You will connect using http://server:port. (default)

<data key='user.buildforge.apache.port' value=''/> Port you want to apache to listen on

The default apache ports are:

non-ssl (http) - 80

ssl (https) - 443

<data key='user.buildforge.apache.user' value=''/> [valid user account] For *nix, supply a user to run apache as i.e. daemon
<data key='user.buildforge.apache.group' value=''/> [valid group] For *nix, supply a group to run apache i.e. daemon
<data key='user.buildforge.php.memory_limit' value=''/> [number] PHP's default memory limit in megabytes i.e. 256
data key='user.buildforge.extra_library' value=''/> [path] Only used on Solaris for the path to libgcc
Tomcat:
<data key='user.buildforge.tomcat.install' value=''/> [y|n]

y=Use the packaged Tomcat (default)

n=Point the installer to an already installed Tomcat

Note: "n" is an advanced option. Please only use "n" if you understand Tomcat configuration and how it interacts with webapps.

<data key='user.buildforge.tomcat.http_port' value=''/> [port] The port that tomcat uses for http

Default port is 8080

<data key='user.buildforge.tomcat.ajp_port' value=''/> [port] The port that tomcat uses for ajp

The default port is 8009

<data key='user.buildforge.tomcat.ssl_port' value=''/> [port] The port that tomcat uses for https

The default port is 8443

<data key='user.buildforge.tomcat.shutdown.port' value=''/> [port] The port that tomcat uses for shutdown protocol

The default port is 8005

<data key='user.buildforge.services_unsecure' value=''/> [port] The unecrypted port that services will listen

The default port is 3966

<data key='user.buildforge.services_secure' value=''/> [port] The encrypted port that services will listen

The default port is 49150

<data key='user.buildforge.services_host' value=''/> [BF server FQDN name] Fully Qualified domain name that the install will run on i.e. machine.ibm.com

This option becomes the services_hostname entry in the buildforge.conf file.

In addition it will be used to build the services_url using the format: https://<services_host>:<tomcat_ssl_port>/rbf-services

Advanced Options:
<data key='user.buildforge.secure' value=''/> [n|y]

n=Installer creates a default SSL certificate for you

y=You will specify either custom entries for a self signed certificate or supply a CA certificate for this system

If <data key='user.buildforge.tomcat.install' value=''/> == "n":
<data key='user.buildforge.external.jar_path' value=''/> [path] Path to a local jdk. For example /usr/java/jdk1.6.0_12
<data key='user.buildforge.external_deploy_path' value=''/> [path] Specify path to $CATALINA_HOME for your current Tomcat install
<data key='user.buildforge.services_plugin_path' value=''/> [path] A readable and writable directory that the services application can use on the application server. Typically it is the Tomcat user which needs the read and write permissions to this directory.
<data key='user.buildforge.services_url' value=''/> [url] The http URL to access the deployed services layer

The format is:https://<server>:<tomcat_secure_port>/rbf-services

i.e.:https://machine.ibm.com:8443/rbf-services

If <data key='user.buildforge.secure' value=''/> ="y":
<data key='user.buildforge.selfsigned' value=''/> [y|n]

y= User will supply their own certificate. This certificate has to already exist on the system prior to install.

n=Use self signed cert the installer creates with custom answers.

If <data key='user.buildforge.selfsigned' value=''/> = "y":
<data key='user.buildforge.ca.cert' value=''/> [path] Path to the CA certificate including the file name.
If <data key='user.buildforge.selfsigned' value=''/> = "n":
<data key='user.buildforge.selfsigned.company' value=''/> Company Name (IBM)
<data key='user.buildforge.selfsigned.country' value=''/> Country Name (US)
<data key='user.buildforge.selfsigned.locality' value=''/> Locality Name (Lexington)
<data key='user.buildforge.selfsigned.organization' value=''/> Organization Name (Rational)
<data key='user.buildforge.selfsigned.organization.unit' value=''/> Organization Unit (Build Forge)
<data key='user.buildforge.selfsigned.street.address' value=''/> Address (123 Somewhere Lane)
<data key='user.buildforge.selfsigned.state.province' value=''/> State/Province (Massachusetts)
<data key='user.buildforge.selfsigned.duration' value=''/> Amount of time for the certificate to be valid. This entry should only be a number - such as 365.
<data key='user.buildforge.selfsigned.duration.unit' value=''/> Time unit for above.

You can use days,weeks, months or years.

If <data key='user.buildforge.secure' value=''/> == "y" AND <data key='user.buildforge.selfsigned' value=''/> == "y":
<data key='user.buildforge.keystore.password' value=''/> The password for the imported ssl certificate
<data key='user.buildforge.keystore.password.encrypted' value=''/> [n|y]

y=The given password is encrypted in the response file

n=The given password is in plain text in the response file. Note: A manual install will always use a plain text password.

7.1.1 New Entries
<data key='user.buildforge.dbODBC' value=''/> [name] SQL Server only - provide the name of the ODBC system datasource created to connect to the BF DB
<data key='user.buildforge.real_host' value=''/> [FQDN:port] The combination of the FQDN of the BF host and port Apache is listening on. e.g.

server.domain.com:80

<data key='user.buildforge.run_as' value=''/> Not used yet. This option can be omitted.
<data key='user.buildforge.rafw' value=''/> [y|n] States whether or not to install RAFW add-on component. This is a separate purchase from BF. This should be "n" unless you have purchased RAFW.
7.1.1.4 New Entries
<data key='user.buildforge.dbODBC' value=''/> [name] SQL Server only - provide the name of the ODBC system datasource created to connect to the BF DB

Sample buildforgeinstall.xml response file with default values:

<?xml version="1.0" encoding="UTF-8"?>
<agent-input acceptLicense='true'>
<server>
<repository location='/downloads/7.1.1.4/bf7114-GM-all.zip'/>
</server>
<profile installLocation='/opt/buildforge' id='buildforge.console'>
<data key='eclipseLocation' value='/opt/buildforge'/>
<data key='cic.selector.nl' value='en'/>
<data key='user.buildforge.install_type' value='install'/>
<data key='user.buildforge.uninstallFull_7.1.140.0139' value='com.ibm.buildforge.console.CoreWrapper_7.1.140.0139.jar'/>
<data key='user.buildforge.win2k8' value='n'/>
<data key='user.buildforge.platform' value='Solaris'/>
<data key='user.java.home' value='/opt/IBM/InstallationManager/eclipse/jre_5.0.12.sr8a_20080712/jre/bin/java'/>
<data key='user.buildforge.licenseServer' value='LicSrv01'/>
<data key='user.buildforge.licensePort' value='27000'/>
<data key='user.buildforge.schema.question' value='n'/>
<data key='user.buildforge.dbHost' value='MySQLdb01'/>
<data key='user.buildforge.dbPort' value='3306'/>
<data key='user.buildforge.dbName' value='bf7114'/>
<data key='user.buildforge.dbUser' value='build'/>
<data key='user.buildforge.dbPass' value='75dec4180c1eebaf00fa17abad746832c1c368b0d9d26c2f6d26'/>
<data key='user.buildforge.dbPassEncrypted' value='y'/>
<data key='user.buildforge.dbType' value='mysql'/>
<data key='user.buildforge.dbSchema' value=''/>
<data key='user.buildforge.dbODBC' value=''/>
<data key='user.buildforge.db2Install' value='y'/>
<data key='user.buildforge.db2InstallPath' value='C:\Program Files\IBM\SQLLIB\'/>
<data key='user.buildforge.db2InstallData' value='C:\'/>
<data key='user.buildforge.db2UserCreation' value='y'/>
<data key='user.buildforge.jdbcDriverDir' value='/source/mysql-connector-java-5.0.8'/>
<data key='user.buildforge.jdbcDrivers' value='mysql-connector-java-5.0.8-bin.jar'/>
<data key='user.buildforge.oracleHome' value=''/>
<data key='user.buildforge.oracleTNS' value=''/>
<data key='user.buildforge.driverLib' value='/opt/csw/mysql5/lib/mysql'/>
<data key='user.buildforge.db2Home' value=''/>
<data key='user.buildforge.apache.install' value='y'/>
<data key='user.buildforge.apache.https' value='n'/>
<data key='user.buildforge.apache.port' value='80'/>
<data key='user.buildforge.php.memory_limit' value='256'/>
<data key='user.buildforge.apache.user' value='daemon'/>
<data key='user.buildforge.apache.group' value='daemon'/>
<data key='user.buildforge.run_as' value=''/>
<data key='user.buildforge.tomcat.install' value='y'/>
<data key='user.buildforge.tomcat.http_port' value='8080'/>
<data key='user.buildforge.tomcat.ajp_port' value='8009'/>
<data key='user.buildforge.tomcat.shutdown.port' value='8005'/>
<data key='user.buildforge.tomcat.ssl_port' value='8443'/>
<data key='user.buildforge.external_deploy_path' value=''/>
<data key='user.buildforge.external.jar_path' value=''/>
<data key='user.buildforge.services_url' value=''/>
<data key='user.buildforge.services_plugin_path' value=''/>
<data key='user.buildforge.services_secure' value='49150'/>
<data key='user.buildforge.services_unsecure' value='3966'/>
<data key='user.buildforge.services_host' value='BFSol10Srv01.company.com'/>
<data key='user.buildforge.real_host' value='BFSol10Srv01.company.com:80'/>
<data key='user.buildforge.extra_library' value='/usr/local/lib'/>
<data key='user.buildforge.keystore.password' value='4579360753d2efbf00f92710516f3aa695e77055ece98b20afb1'/>
<data key='user.buildforge.keystore.password.encrypted' value='y'/>
<data key='user.buildforge.secure' value='n'/>
<data key='user.buildforge.selfsigned' value='n'/>
<data key='user.buildforge.ca.cert' value=''/>
<data key='user.buildforge.selfsigned.company' value=''/>
<data key='user.buildforge.selfsigned.country' value=''/>
<data key='user.buildforge.selfsigned.locality' value=''/>
<data key='user.buildforge.selfsigned.organization' value=''/>
<data key='user.buildforge.selfsigned.organization.unit' value=''/>
<data key='user.buildforge.selfsigned.street.address' value=''/>
<data key='user.buildforge.selfsigned.state.province' value=''/>
<data key='user.buildforge.selfsigned.duration' value=''/>
<data key='user.buildforge.selfsigned.duration.unit' value=''/>
<data key='user.buildforge.create_shortcut' value='n'/>
<data key='user.buildforge.console_startup' value='nostart'/>
<data key='user.buildforge.file_storage' value='/opt/buildforge/temp'/>
</profile>
<install modify='false'>
<offering features='com.ibm.buildforge.console.webroot,com.ibm.buildforge.console.engine,com.ibm.buildforge.console.slayer,com.ibm.buildforge.console.install.configure' profile='buildforge.console' id='com.ibm.buildforge.console' version='7.1.140.0139'/>
</install>
<preference value='/opt/IBM/SDP70Shared' name='com.ibm.cic.common.core.preferences.eclipseCache'/>
<preference value='30' name='com.ibm.cic.common.core.preferences.connectTimeout'/>
<preference value='30' name='com.ibm.cic.common.core.preferences.readTimeout'/>
<preference value='0' name='com.ibm.cic.common.core.preferences.downloadAutoRetryCount'/>
<preference value='true' name='offering.service.repositories.areUsed'/>
<preference value='false' name='com.ibm.cic.common.core.preferences.ssl.nonsecureMode'/>
<preference value='false' name='com.ibm.cic.common.core.preferences.http.disablePreemptiveAuthentication'/>
<preference value='true' name='com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts'/>
<preference value='false' name='PassportAdvantageIsEnabled'/>
<preference value='false' name='com.ibm.cic.common.core.preferences.searchForUpdates'/>
</agent-input>


2. Install Build Forge



This is the point where you lay down the binaries using the response file just created. If any of the entries are invalid the install will halt. You will then have the opportunity to correct the information and re-run the installation.

The install is kicked off by running:

./install --launcher.ini silent-install.ini -input <response file path and name> -log <log file path and name>

ie:

# cd /opt/IBM/InstallationManager/eclipse
# ./install --launcher.ini silent-install.ini -input buildforgeinstall.xml -log /tmp/buildforgeinstall.log


3. Create the Build Forge 7.1 schema - only follow this if db_schema_question = n


The Build Forge schema is now created outside of normal Build Forge operations. The database will need to be prepared before you start the engine only if you elected not to have the installer apply the schema for you. This is controlled by the db_schema_question option - if you used "n" then you will need to manually apply the schema.

To manually apply the schema run this in the /opt/buildforge/Platform directory:

cd /opt/buildforge/Platform
./bfschema -cV -f "BuildForge/DB/Schema/schema.xml" -i "BuildForge/DB/Schema/initialData.xml" -k -s "table_create.sql" –r


4. Start the engine



At this point you can start the engine up using the /opt/buildforge/rc/buildforge start script.

/opt/buildforge/rc/buildforge start

For example:
# /opt/buildforge/rc/buildforge start
Checking for Build Forge Management Console... not running.
Starting Build Forge Management Console... ENVIRONMENT:
-------------------------
JAVA_HOME = /opt/buildforge/server//ibmjdk
PATH    = /opt/buildforge/server//apache//bin:/bin:/sbin:/usr/sbin:/bin:/usr/bin
LD_LIBRARY_PATH = /opt/buildforge/server//apache//lib:/opt/ibm/db2/V9.5/lib32:/opt/buildforge/openssl:/opt/ibm/db2/V9.5/lib32:/opt/ibm/db2/V9.5/lib32:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib
CATALINA_PID = /opt/buildforge/server//tomcat/temp/CATALINA.PID
CATALINA_HOME = /opt/buildforge/server//tomcat
CATALINA_BASE = /opt/buildforge/server//tomcat
CATALINA_TMPDIR = /opt/buildforge/server//tomcat/temp
JRE_HOME = /opt/buildforge/server//ibmjdk
------------------------
Starting Apache
Starting Tomcat
Using CATALINA_BASE:   /opt/buildforge/server//tomcat
Using CATALINA_HOME:   /opt/buildforge/server/tomcat
Using CATALINA_TMPDIR: /opt/buildforge/server//tomcat/temp
Using JRE_HOME:       /opt/buildforge/server//ibmjdk


5. Install Build Forge into the OS as a service



This piece ensures Build Forge will start automatically in the event of a system restart. The only rc script we need to be concerned with for Build Forge 7.1 is the buildforge script itself if you elected to use the packaged Apache and Tomcat. In this circumstance all three pieces will be started from the buildforge start script - Build Forge engine, Apache and Tomcat.

Your system admin can review the below commands to ensure Build Forge will start on the system in the correct order.

Linux:
cp /opt/buildforge/rc/buildforge /etc/rc.d/init.d
ln -s /etc/init.d/buildforge /etc/rc.d/rc0.d/K02buildforge
ln -s /etc/init.d/buildforge /etc/rc.d/rc1.d/K02buildforge
ln -s /etc/init.d/buildforge /etc/rc.d/rc2.d/K02buildforge
ln -s /etc/init.d/buildforge /etc/rc.d/rc3.d/S98buildforge
ln -s /etc/init.d/buildforge /etc/rc.d/rc5.d/S98buildforge
ln -s /etc/init.d/buildforge /etc/rc.d/rc6.d/K02buildforge


Solaris:
cp /opt/buildforge/rc/buildforge /etc/rc.d
ln /etc/init.d/buildforge /etc/rc0.d/K02buildforge
ln /etc/init.d/buildforge /etc/rc1.d/K02buildforge
ln /etc/init.d/buildforge /etc/rc2.d/K02buildforge
ln /etc/init.d/buildforge /etc/rc3.d/S98buildforge
ln /etc/init.d/buildforge /etc/rc6.d/K02buildforge




6. RAFW steps

Edit the configure.properties file to replace RAFW_HOST=rafw with the correct hostname

vi /opt/buildforge/rafw/configure.properties

# The hostname of the RAFW Framework Server
RAFW_HOST=rafw

# RAFW HOME for the different OSes
AIX_RAFW_HOME=/opt/RAFW
LINUX_RAFW_HOME=/opt/RAFW
SOLARIS_RAFW_HOME=/opt/RAFW
HPUX_RAFW_HOME=/opt/RAFW
WINDOWS_RAFW_HOME=c:/RAFW
...

Copy the RAFW Environment Wizard to the webapps directory.

# cp /opt/buildforge/rafw/rafw.war /opt/buildforge/server/tomcat/webapps

Integrate RAFW with Build Forge

# cd /opt/buildforge/rafw/bin
# chmod +x integrateToBF.sh
# ./integrateToBF.sh createAll


7. Ensuring the files and directories have the correct permission

[/H3>]

There are quite a number of items to consider when security is involved. There are three distinct processes which comprise of a Build Forge install. The engine, user interface and backend services layer all need to have the proper amount of access to certain files for the user they will be running as.

General Needs:

All of the files and folders under /opt/buildforge need to be 755 to allow the Build Forge service user to read and execute files within these directories. You only have to perform this step if root's umask is not 002 or 022.

chmod -R 755 /opt/buildforge

Apache:

The Apache user is controlled through the response file key=value pairs apache_user and apache_group. The Apache process needs to start as root, and then switches identity to the user and group specified in those directives. The general reason for this is only root can open a port under 1024 which Apache uses.

The Apache user needs read and execute permissions for all of the files under the /opt/buildforge/webroot directory. The Apache user also requires full permissions on the /opt/buildforge/webroot/templates_c directory.

For example:

# ls -la /opt/buildforge/webroot/
total 116
drwxr-xr-x 11 root   root   4096 Dec  5 15:11 .
drwxr-xr-x 11 root   root   4096 May 14 08:20 ..
drwxr-xr-x  2 root   root   4096 Dec  5 15:10 docs
drwxr-xr-x  2 root   root   4096 Dec  5 15:10 docs_c
-rwxr-xr-x  1 root   root    817 Dec  5 15:10 errorpage.html
drwxr-xr-x  4 root   root   4096 Dec  5 15:10 includes
-rwxr-xr-x  1 root   root   4391 Dec  5 15:11 init_base.php
-rwxr-xr-x  1 root   root    729 Dec  5 15:11 init.php
drwxr-xr-x 13 root   root   4096 Dec  5 15:10 lang
drwxr-xr-x 18 root   root   4096 Dec  5 15:10 modules
drwxr-xr-x 14 root   root   4096 Dec  5 15:11 public
drwxr-xr-x  2 root   root   4096 Dec  5 15:10 templates
drwxr-xr-x  2 daemon daemon 4096 Dec  5 15:11 templates_c
drwxr-xr-x  3 root   root   4096 Dec  5 15:11 tools

If this is not the case the Build Forge user interface will not function. To correct the permissions run:

chmod -R 755 /opt/buildforge/webroot
chown -R <apache_user> /opt/buildforge/webroot/templates_c

For example:

# chmod -R 755 /opt/buildforge/webroot
# chown -R daemon /opt/buildforge/webroot/templates_c

The Apache user is configurable in the /opt/buildforge/server/apache/conf/httpd.conf file. The two directives which control who Apache runs as are User and Group. If these need to be changed the owner of /opt/buildforge/webroot/templates_c also needs to be updated to reflect the new Apache user.

[httpd.conf]
...
User daemon
Group daemon
...

[/httpd.conf]

Tomcat:

Tomcat does not perform user switching as Apache does. It starts and stays as the user who starts the process. In addition all of the files and folders for Tomcat need to be owned by the user it is running as. The /opt/buildforge/server/start script can be modified to control who Tomcat will start as. This user needs to have complete ownership of all files and directories in the /opt/buildforge/server/tomcat directory. In addition you must manually modify the /opt/buildforge/server/start script to change the user Tomcat will run as.

vi /opt/buildforge/server/start

Find the two Tomcat functions tomcat_start and tomcat_stop:

[start]
...
tomcat_start() {
if [ -d $TOMCAT_PATH ]; then
echo "Starting Tomcat"
rm -f $CATALINA_PID
$TOMCAT_PATH/bin/catalina.sh start
fi

}
...
tomcat_stop() {
if [ -d $TOMCAT_PATH ]; then
echo "Stopping Tomcat"
$TOMCAT_PATH/bin/catalina.sh stop -force
rm -f $CATALINA_PID
fi


}
...
[/start]

Edit them and add /bin/su/<new tomcat user> to the beginning of the catalina.sh start|stop lines. In this example we will use a user called tomcat:

[start]
tomcat_start() {
        if [ -d $TOMCAT_PATH ]; then
                echo "Starting Tomcat"
                rm -f $CATALINA_PID
                /bin/su tomcat $TOMCAT_PATH/bin/catalina.sh start
        fi

}

tomcat_stop() {
        if [ -d $TOMCAT_PATH ]; then
                echo "Stopping Tomcat"
                /bin/su tomcat $TOMCAT_PATH/bin/catalina.sh stop -force
                rm -f $CATALINA_PID
        fi


}
[/start]
Now you must also change ownership of all of the Tomcat files and directories to this new user.

# chown -R tomcat /opt/buildforge/server/tomcat

Build Forge Engine:

The Build Forge engine comprises all of the files and processes which control job execution. The user Build Forge runs as is typically root, however this can be changed to another user if desired. The /opt/buildforge/rc/buildforge script controls this behavior.

To change the user the Build Forge engine will run as modify the RUN_AS directive in the /opt/buildforge/rc/buildforge script.

vi /opt/buildforge/rc/buildforge

Locate the entry below:

[buildforge]
...
# If a valid user is specified here, then this script will attempt
# to switch to that user before running the engine.  $INSTALLDIR and
# all the files and directories within it should be owned by this
# user.
#RUN_AS="build"
...
[/buildforge]

Modify and enter a user which is valid and you wish to run the Build Forge engine as. You must uncomment this line as well. In this example we will use build:

[buildforge]
...
# If a valid user is specified here, then this script will attempt
# to switch to that user before running the engine.  $INSTALLDIR and
# all the files and directories within it should be owned by this
# user.
RUN_AS="build"
...
[/buildforge]

The final step requires all of the files and folders under /opt/buildforge/Platform change ownership to this user. The .lock and log files in the /opt/buildforge directory will require the new user's ownership as well if they exist. These last two files will only exist if the engine has been started at least once using the /opt/buildforge/rc/buildforge start script.

chown -R build /opt/buildforge/Platform
chown build /opt/buildforge/.lock
chown build /opt/buildforge/log


RAFW

The RAFW directory and files should be owned by the RAFW user.

chown -R rafw:rafwadms /opt/buildforge/rafw
chmod g+s /opt/buildforge/rafw


Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Build Forge
Installation

Software version:

7.1.1, 7.1.1.1, 7.1.1.2, 7.1.1.3, 7.1.1.4

Operating system(s):

AIX, Linux, Solaris

Software edition:

Enterprise, Standard

Reference #:

1444433

Modified date:

2010-12-08

Translate my page

Machine Translation

Content navigation