Introduction:
When installing Harweb on a Linux system, the standard method is to employ an X-Windows interface so that the options can be selected from GUI windows. In some cases this is not possible and Harweb must be installed “silently” using a response file to specify setting and option selections. This article explains how to install Harweb silently on a Linux system.
Environment:
SCM 12.5 on a Linux operating system
Instructions:
In the following document
everywhere you see | replace with |
<oracle home folder> | the folder to which the Oracle client is installed |
<oracle sid> | the "sid" for your Oracle database |
<scm home folder> | the folder to which SCM client is installed |
<pec home folder> | the folder to which PEC is installed |
<java home folder> | the folder to which Java is installed |
<tomcat home folder> | The folder to which Tomcat is installed |
<jboss home folder> | the folder to which JBoss is installed |
<broker hostname> | the hostname of your SCM Broker machine |
<temp folder> | the location of the "tmp" folder on your Harweb install machine |
<context name> | the root context name for your harweb application (ex. harweb) |
<oracle port number> | the Oracle database port number |
<oracle version> | the Oracle version (ex. 11g or 12g) |
<oracle hostname> | the hostname of your Oracle database machine |
<schemaowner password> | the harvest database schema owner's password |
<schemaowner userid> | the harvest schema owner's userid |
<tns service name> | the tns service name for your Harvest database |
Some things to check before you begin:
Check the system requirements for your application server (Jboss or Tomcat) to confirm which version of Java is supported. That's the version of Java you should use.
You should locate the correct folder to use for the $JAVA_HOME environment variable. To accomplish this, search for the files named "java" and "tools.jar" on your Linux system and find the folder they have in common. This is your $JAVA_HOME folder.
find / -name java 2>null
find / -name tools.jar 2>null
For example, if I find:
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/java
and
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/lib/tools.jar
My $JAVA_HOME variable should be set to "/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64"
Check to confirm that your SCM Client, Oracle Client, Java and application server are all at the same bit-level. If you have installed the 32-bit SCM Client, then you need the 32-bit version of all these other components. If you have the 64-bit SCM Client, you will need the 64-bit version of all other components.
You should check to see which Linux userid "owns" your application server folder and the process. In some cases this will not be the same as the userid that "owns" your CA SCM folder and processes. If you find that a different userid "owns" your application server folder and process, you will need to modify some things so that the application server "owner" has permission to execute CA SCM processes and utilities, and can write to the $CA_SCM_HOME/log folder:
You need to update the application server owner's .bash_profile to include environment variable settings for Oracle and CA SCM.
export ORACLE_HOME=<oracle home folder>
export ORACLE_SID=<oracle sid>
export CA_SCM_HOME=<scm home folder>
export PATH=$CA_SCM_HOME/bin:<pec home folder>:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$CA_SCM_HOME/lib:<pec home folder>/lib/i86_64_linux24:$LD_LIBRARY_PATH
. <pec home folder>/bin/rtinit.sh
If your application server is Tomcat you should include these additional settings to the application server owner's .bash_profile:
export JAVA_HOME=<java home folder>
export CATALINAHOME=<tomcat home folder>
export PATH=$PATH:$JAVA_HOME/bin:$CATALINAHOME/bin
export LD_LIBRARY_PATH=$CATALINAHOME/webapps/harweb/WEB-INF/lib:$LD_LIBRARY_PATH
export PATH=$PATH:$CATALINAHOME/webapps/harweb/WEB-INF
If your application server is JBoss you should include these additional settings to the application server owner's .bash_profile:
export JAVA_HOME=<java home folder>
export JBOSS_HOME=<jboss home folder>
export PATH=$PATH:$JAVA_HOME/bin:$JBOSS_HOME/bin
export LD_LIBRARY_PATH=$JBOSS_HOME/server/default/deploy/harweb.war/WEB-INF/lib:$LD_LIBRARY_PATH
export PATH=$JBOSS_HOME/server/default/deploy/harweb.war/WEB-INF:$PATH
After updating your application server owner's .bash_profile you need to stop the application server, re-source the .bash_profile to pick up the changes, then restart the application server.
You should modify permissions on the $CA_SCM_HOME/log folder to allow group members to write to it
chmod -R 775 $CA_SCM_HOME/log
You should add the application server owner's userid to the "cascm" group
usermod -a -G cascm appserverowner
Ensure your application server owner has permission to create a folder in the <temp> folder and that folder HARWEBHDT and file harweb.rsp do not previously exist in that folder before running HarwebInstall.sh
You should create a response file that contains all the information the HarwebInstall.sh script will need to complete the installation. Below are examples of response files that work with JBoss and Tomcat.
Example Response Files:
Here is a rsp file that works with JBoss
#Wed Nov 11 11:41:31 EST 2015
BROKER=<broker hostname>
DOMAIN=
APPHOME=<jboss home folder>
SJDBCLOC=
TEMP=<temp folder>
APPNAME=<context name>
IHOSTNAME=
HARWEBHOME=
JBOSSCONFIGURATION=default
SAUTHMODE=
IDBNAME=
OPORT=<oracle port number>
APP_SERVER=JBoss Application Server
OJDBCLOC=<oracle home folder>/jdbc/lib
OJDBCVERSION=<oracle version>
OHOSTNAME=<oracle hostname>
INSTALL_TYPE=New
WEBPACKAGEONLY=false
DBPASSWORD=<schemaowner password>
SJDBCVERSION=
DBUSER=<schemaowner userid>
NODE_TO_DEPLOY_LOC=
IPORT=
BOURL=
SDBNAME=
DBTYPE=Oracle
AUTHMODE=Internal
SSERVERNAME=
OSERVICE=<tns service name>
Here is a rsp file that works with Tomcat
#Mon Nov 09 15:41:28 EST 2015
BROKER=<broker host name>
DOMAIN=
APPHOME=<tomcat home folder>
SJDBCLOC=
TEMP=<temp folder>
APPNAME=<context name>
IHOSTNAME=
HARWEBHOME=
JBOSSCONFIGURATION=
SAUTHMODE=
IDBNAME=
OPORT=<oracle port number>
APP_SERVER=Apache Tomcat
OJDBCLOC=<oracle home folder>/jdbc/lib
OJDBCVERSION=<oracle version>
OHOSTNAME=<oracle hostname>
INSTALL_TYPE=New
WEBPACKAGEONLY=false
DBPASSWORD=<schemaowner password>
SJDBCVERSION=
DBUSER=<schemaowner userid>
NODE_TO_DEPLOY_LOC=
IPORT=
BOURL=
SDBNAME=
DBTYPE=Oracle
AUTHMODE=Internal (needs to match what's in hserver.arg)
SSERVERNAME=
OSERVICE=<tns service name>
Installing Harweb in "silent" or "unattended" mode:
You can install the Web Interface from the command line and not use the installation wizard.
Follow these steps:
1. Copy the following files from the Web Interface installation media to a temporary directory on your application server computer:
2. Create a Web Interface response file containing your installation information, which the installer will read when performing the unattended installation.
3. Run the following command from the command line, in the directory where HarwebInstall.jar and harweb.war are stored. These commands require that the database username and password are entered directly in the response file.
java -Dcascmhome="$CA_SCM_HOME" -jar HarwebInstall.jar -rsp path/harweb.rsp
4. For security reasons, if you do not want to enter the database username and password directly in the response file, you can use the following command to specify the user name and password on the command line instead.
java -Dcascmhome="$CA_SCM_HOME" -jar HarwebInstall.jar -rsp path/harweb.rsp -usr cascm_username -pwd cascm_password
In this command, the -jar flag specifies the installation .jar file. The -rsp flag specifies your response file. If the response file is not in the same directory, specify the path to its location.
When you enter the command, the installation program performs the following tasks:
Additional Information:
You should check chapter 6 of the Implementation Guide for your version of CA Harvest SCM for further details about installing Harweb.
The above example response files were created for CA Harvest SCM 12.5. If you have a different version of Harvest, the options you specify in the response file might be slightly different. The easiest way to get a response file that contains the correct options for your situation is to run through the Harweb installation on a Windows system and capture the response file that the installer will create. You can then port this response file to Linux and change any values that must be changed to reflect the correct settings for your Linux system.