Installing Web Application Back End on Debian

This article describes an example of installing web application back end on Debian OS (supported versions).

The installation must be executed under the user who has local computer administrator permissions.

A web application is installed on Linux OS using the installation archive pp.war (common for x86 and x64 platforms). Installation process depends on the Java version in use. The instruction contains an example of installing a web application to the Apache Tomcat 8 web server.

NOTE. It is also available to start the web application in the Apache web server without Java. For details see the Setting Up Apache to Access Web Application Resources section.

  1. Install the packages tomcat8 and tomcat8-admin (execute this operation in the terminal, it does not require administrator web interface; further unpack the pp.war file as an archive by means of the jar or unzip utility):

sudo apt install tomcat8 tomcat8-admin

  1. Open the file /etc/tomcat8/tomcat-users.xml for edit (in some cases the configuration file is located here: /var/lib/tomcat8/conf/tomcat-users.xml). Add a user with manager-gui permissions:

<tomcat-users>
<role rolename="manager-gui"/>
<user username="user" password="123456" roles="manager-gui"/>
</tomcat-users>

  1. Install Oracle Java.

  2. After installing Oracle Java 8, change the JAVA_HOME variable in the /etc/default/tomcat8 file. Set the following value:

JAVA_HOME=/usr/lib/jvm/jre-8-oracle-x64

  1. Loading of large files within the application may also require to decrease or increase virtual memory limit for Apache Tomcat in this file. It is set in Java application startup parameters. To do this, delete the -Xmx128m parameter (or replace with the required virtual memory limit) from the JAVA_OPTS variable, and add the parameters -XX:PermSize=256m -XX:MaxPermSize=2048m:

JAVA_OPTS="-Djava.awt.headless=true -XX:+UseConcMarkSweepGC -XX:PermSize=256m -XX:MaxPermSize=2048m"

  1. If the size of pp.war web application archive is more than 50 Mb (default load limit), edit the available limit. To do this, open the file /usr/share/tomcat8-admin/manager/WEB-INF/web.xml and add a zero to the right of value of the max-file-size and max-request-size parameters:

<multipart-config>
<!-- 50MB max -->
<max-file-size>524288000</max-file-size>
<max-request-size>524288000</max-request-size>
</multipart-config>

  1. Restart Apache Tomcat by means of the systemctl utility (by using the terminal):

sudo systemctl restart tomcat8

NOTE. To check Apache Tomcat performance, open the URL in the browser: http://localhost:8080/.

  1. Go to the Apache Tomcat administration page by the URL: http://localhost:8080/manager/html. If the box with user name and password fields opens, enter user credentials specified in the tomcat-users.xml file.

  2. Go to the WAR File to Deploy section on the page that opens. Click the Browse button and specify the path to the pp.war file:

Click the Deploy button. Make sure that the application is successfully installed:

  1. In the PP.xml file, add a link to the BI server and identifier of the repository, which is connected. To open the file, execute the command in the terminal:

sudo gedit /var/lib/tomcat8/webapps/pp/config/PP.xml

<service url="http://localhost:9090/axis2/services/PP.SOM.Som" timeout="120000" />
<metabase id="PPREPOSITORY" ping="59000" />

<service url="http://localhost/PPBI_App_v9.0x64/axis2/services/PP.SOM.Som" timeout="120000" />
<metabase id="PPREPOSITORY" ping="59000" />

If the BI server is installed by means of setup package, the string looks as follows:

<service url="http://localhost/PPBI_App_v9.0x64/axis2/services/PP.SOM.Som" />

  1. Restart Apache Tomcat:

sudo systemctl restart tomcat8

  1. Open the web application by the URL in the browser: http://localhost:8080/pp/app/login.html?repo=PPREPOSITORY, where PPREPOSITORY - repository identifier. It authorization failed, check BI server performance.

See also:

Installing in Debian-based Distribution Kits | Installing Web Application Back End on Java