Experience Portal includes an automated installation script for the Tomcat 8.5.xx application server.
About this task
For details about the automated installation script, see Optional: Installing a Tomcat application server on the Experience Portal server.
Before you begin
-
Install the Experience Portal software on the server.
-
Experience Portal includes the Tomcat installation tar file for Tomcat 8.5.xx. To install a later build of the Tomcat application server, download the appropriate Tomcat installation tar file from the Apache website http://jakarta.apache.org/tomcat/ and ensure that the file is available.
Procedure
- Log in to Linux on
the Experience Portal server in one of the following ways:
Log on to the local Linux console as root.
Log on remotely as a non-root user, and then change the user to root by entering the su - root command.
- Create the installation directory by running the mkdir /opt/Tomcat/AppServer command.
- Navigate to the installation directory by running the cd /opt/Tomcat/AppServer command.
- To:
Use the Tomcat 8.5.xx installation tar file installed with Experience Portal, run the cp $AVAYA_HOME/Support/AppServer/manual/apache-tomcat-8.5.xx_ae.tar.gz . command.
Use the installation tar file you downloaded from the Apache website, copy that file to the directory by running the cp pathname/tomcat-tar-file . command, where pathname/tomcat-tar-file is the name of the Tomcat installation tar file.
- Install the server
by running the tar -zxvf tomcat-tar-file command, where tomcat-tar-file is the name of the Tomcat installation tar file.
The Tomcat files are extracted to /opt/Tomcat/AppServer/tomcat-subdirectory, where tomcat-subdirectory is the name of the Tomcat installation tar file without the .tar.gz extensions. For example, if you extract the apache-tomcat-8.5.xx_ae.tar.gz installation file that was installed with Experience Portal, the installation subdirectory is apache-tomcat-8.5.xx.
- Create a soft link for the new directory by running the ln -s /opt/Tomcat/AppServer/tomcat-subdirectory tomcat command.
- Navigate to the new Tomcat bin directory by running the cd tomcat/bin command.
- Copy the configuration
files by running the following commands:
cp startup.sh startup.sh.old
cp shutdown.sh shutdown.sh.old
- Modify the startup configuration script:
- Open startup.sh in the ASCII editor of your choice.
- Add the following
export variable-namestatements at the top of the script:export CATALINA_BASE=/opt/Tomcat/AppServer/tomcat export CATALINA_HOME=/opt/Tomcat/AppServer/tomcat export JAVA_OPTS="-server –Xmx1024M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ThreadStackSize=512 -Davaya.appserver.type=tomcatappserver"Important:Specify each
export variable-nameline on a separate line without line breaks. If you copy these lines from documentation, ensure that you remove the extra line break in the exportJAVA_OPTSdefinition. Also, retype the hyphens to remove hidden characters.In addition, if you installed Tomcat in a directory other than /opt/Tomcat/AppServer, ensure that you change the
export variable-namestatements accordingly. - Save and close the file.
- Modify the shutdown
configuration script:
- Open shutdown.sh in the ASCII editor of your choice.
- Add the following environment
variables at the top of the script:
export CATALINA_BASE=/opt/Tomcat/AppServer/tomcat export CATALINA_HOME=/opt/Tomcat/AppServer/tomcat - Save and close the file.
- Modify the Tomcat configuration
XML file:
- Navigate to the configuration directory by running the cd tomcat-subdirectory/conf command.
- Copy the configuration file by running the cp server.xml server.xml.old command.
- Open server.xml in the XML editor of your choice.
- Change the port numbers
as shown:
Change port number...
To port number...
8080
7080
8443
7443
8005
7005
8009
7009
- Save and close the file.
- Modify the Tomcat context configuration XML file:
- Navigate to the configuration directory by running the cd tomcat-subdirectory/webapps/manager/META-INF command.
- Copy the configuration file by running the cp context.xml context.xml.old command.
- Open context.xml in the XML editor of your choice.
- Comment out the Value xml tag with className set to “org.apache.catalina.values.RemoteAddrValue” using the <!-- start comments and --> end comment tags as shown
below:
<!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> --> - Save and close the file.
- Before you configure
the Application server to run as a Linux service, you must define
an environment variable so that the service script can always find
the Application server. To define the variable:
- Run the cd /etc/profile.d command.
- Copy the Avaya-provided configuration files to this directory by running the cp $AVAYA_HOME/Support/AppServer/manual/appserver.* . command.
- If you installed Tomcat
in a directory other than /opt/Tomcat/AppServer:
Open the appserver.sh script in an ASCII editor and change all occurrences of /opt/Tomcat/AppServer to the directory in which you installed Tomcat.
Open the appserver.csh script in an ASCII editor and change all occurrences of /opt/Tomcat/AppServer to the directory in which you installed Tomcat.
- Set the configuration file permissions by running the chmod 0755 appserver.* command.
- Log out and re-log in for the environment variables to take effect.
-
Configure the Application server to
run as a Linux systemyd service so that the Application server responds to the Linux
systemyd service
command and the Linux automatically restarts the Application server if the machine
reboots:
- Run the cd /etc/systemd/system command.
- Copy the Avaya-provided Application server script to this directory by running the cp $AVAYA_HOME/Support/AppServer/appserver.service . command.
- Set the script permissions by running the chmod 0755 appserver.service command.
- Open the appserver.service script in an ASCII editor and change all instances of %%APPSERVER_HOME%% with the directory you installed on the appserver.
-
Change the ownership of the directories by entering the following
commands:
chown -R avayavp:avayavpgroup $APPSERVER_HOME/logs
chown -R avayavp:avayavpgroup $APPSERVER_HOME/lib
chown -R avayavp:avayavpgroup $APPSERVER_HOME/conf
chown —R avayavp:avayavpgroup $APPSERVER_HOME/bin
chown —R avayavp:avayavpgroup $APPSERVER_HOME/temp
chown —R avayavp:avayavpgroup $APPSERVER_HOME/work
chown —R avayavp:avayavpgroup $APPSERVER_HOME/webapps
-
Copy the Avaya-provided Application server pre-script to the
$APPSERVER_HOME/.. directory by running the
command:
cp $AVAYA_HOME/Support/AppServer/appserver-pre.sh $APPSERVER_HOME/..
- Set the script permissions by running the chmod 0755 $APPSERVER_HOME/../appserver-pre.sh command.
-
Register the service by
running the following commands:
systemctl daemon-reload
systemctl enable appserver.service
- Start the Application server by running the systemctl start appserver.service command.
-
Give the server time to start,
and then check the server status by running the systemctl is-active
appserver command.
The server must respond that the
Tomcatservice is running. - If you want to administer the server, open a web browser and go to http://EPMS-server:7080/manager/html, where EPMS-server is the hostname or IP address of the Experience Portal server.
- In the /opt/Tomcat/tomcat/lib/config/voiceportal.properties file, set the value of enableLocalAppServer to true and then restart the vpms service.
- Restart the vpms service by entering the /sbin/service vpms restart command.