Install JasperReports Server on Linux [Step-by-Step]

In this step by step tutorial we will cover the steps to install Jasper Reports and Tomcat in Linux Environment. Now your Linux environment can be of any distribution such as Ubuntu, Debian, CentOS, Rocky Linux, Alma Linux, Fedora, SUSE etc and the steps will still work as we are going to directly download the archive from jasper's official repo and compile it for installation.

We will install for jasper and tomcat to access the Jasper Report GUI in Linux.

Advertisement

 

What is JasperReports?

JasperReports is an open source lightweight and flexible reporting tool for creating dynamic content. With a web-based BI Platform, you can create interactive reports and dashboards. It is used in Java-enabled applications such as Java EE and Java web applications. You can get various outputs with this tool, some of them are:

  • Output to screen
  • Send to printer
  • PDF
  • HTML
  • Microsoft Office Products
  • LibreOffice Products
  • RTF
  • Comma separated values (CSV)
  • XML files

Although it is open source, it has both Commercial License and Open Source License.

 

Pre-requisites

JasperReports needs Chromium (Or Chrome) web browser. You can complete the Chromium browser installation on your system with the following command:

[foc@rocky9 ~]$ sudo dnf install chromium

The system requirements for JasperReports are as follows:

Resource Minimum Recommended
Disk 10G 40GB +
RAM 4GB 8GB +
CPU(Processor) 2 Core 2.5GHz + multi-core Pentium for Windows, Mac, and Linux

 

Installation JasperReports Server on Linux

Although it is open source, there are 2 different versions:

  • Enterprise Edition (Embeddable web reporting, dashboard, and self-service BI tools)
  • Community Edition (Embeddable pixel-perfect reports for Java apps and small workgroups)

Let's install the Community Edition version on Rocky Linux.

Advertisement

 

Step-1: Download Installation Files

Go to https://sourceforge.net and download the ".run" file of the version you want to download.

Install JasperReports Server on Linux [Step-by-Step]

Then go to the downloaded file location. For example:

[foc@rocky9 ~]$ pwd
/home/foc

and

foc@rocky9 ~]$ ls
TIB_js-jrs-cp_8.0.0_linux_x86_64.run

Note: Another alternative is the official address to download the installation file. But you may need to be logged in to download its files. Login if you already have an account at https://community.jaspersoft.com/modal_forms/nojs/jf-user-login-register, otherwise register. Then you will have the permission to download the file.

 

Step-2: Install and Configure JasperReports Server

Give run permission in the setup file:

[foc@rocky9 ~]$ chmod +x TIB_js-jrs-cp_8.0.0_linux_x86_64.run

Then let's start the installation:

[foc@rocky9 ~]$ ./TIB_js-jrs-cp_8.0.0_linux_x86_64.run

For installation, apply the following steps in terminal:

Do you accept this license? [y/N]: y    -    Accept License Agreement

----------------------------------------------------------------------------

[1] Install All Components and Samples (requires disk space of: 1.5 GB)
[2] Custom Install
Please choose an option [1] : 1

----------------------------------------------------------------------------

Installation folder

Please, choose a folder to install JasperReports Server CP 8.0.0

Select a folder [/home/foc/jasperreports-server-cp-8.0.0]:

----------------------------------------------------------------------------

Chromium folder

JasperReports Server uses the Chromium browser engine when you export reports
and dashboards to PDF and other formats. If you do not have Chrome/Chromium
installed you can download Chrome or Chromium using the links below this text.
Press [Enter] to continue:

https://www.google.com/chrome/ [Y/n]: n

https://www.chromium.org/getting-involved/download-chromium [Y/n]: Y

Do you want to use Chromium? [Y/n]: Y

----------------------------------------------------------------------------
Please specify the Chrome or Chromium executable

Chromium executable [/usr/bin/chromium-browser]:

----------------------------------------------------------------------------
Default Keystore Warning!

If any older JasperReports Server version is installed on your computer,
installing this version will cause the default keystore to stop working. If an
older version of JasperReports Server is still required, you must back up the
.jrsks and .jrsksp files, then configure a separate keystore for the older
version. For more details, see the link below to the Jaspersoft Community
website.

Click Next to acknowledge this warning and continue with the installation.
Press [Enter] to continue:

https://community.jaspersoft.com/wiki/keystore-management-and-repair/ [Y/n]: Y

----------------------------------------------------------------------------
Setup is now ready to begin installing JasperReports Server CP 8.0.0 on your
computer.

Do you want to continue? [Y/n]: Y

----------------------------------------------------------------------------
Please wait while Setup installs JasperReports Server CP 8.0.0 on your computer.

Installing
0% ______________ 50% ______________ 100%
#########################################

----------------------------------------------------------------------------
Completing the JasperReports Server CP 8.0.0 Setup Wizard

For release notes and further documentation please see,
/home/foc/jasperreports-server-cp-8.0.0/docs. Our full documentation is also
available at http://community.jaspersoft.com/documentation

----------------------------------------------------------------------------
Setup has finished installing JasperReports Server CP 8.0.0 on your computer.

Installation is complete. Change to the installation directory of the service:

[foc@localhost ~]$ cd jasperreports-server-cp-8.0.0/

 

Step-3: Start jasper and tomcat service

Start the service with the following commands:

[foc@localhost jasperreports-server-cp-8.0.0]$ ./ctlscript.sh start
waiting for server to start.... done
server started
/home/foc/jasperreports-server-cp-8.0.0/postgresql/scripts/ctl.sh : postgresql started at port 5432
Using CATALINA_BASE: /home/foc/jasperreports-server-cp-8.0.0/apache-tomcat
Using CATALINA_HOME: /home/foc/jasperreports-server-cp-8.0.0/apache-tomcat
Using CATALINA_TMPDIR: /home/foc/jasperreports-server-cp-8.0.0/apache-tomcat/temp
Using JRE_HOME: /home/foc/jasperreports-server-cp-8.0.0/java
Using CLASSPATH: /home/foc/jasperreports-server-cp-8.0.0/apache-tomcat/bin/bootstrap.jar:/home/foc/jasperreports-server-cp-8.0.0/apache-tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Using CATALINA_PID: /home/foc/jasperreports-server-cp-8.0.0/apache-tomcat/temp/catalina.pid
Tomcat started.
/home/foc/jasperreports-server-cp-8.0.0/apache-tomcat/scripts/ctl.sh : tomcat started

To stop the service:

[foc@localhost jasperreports-server-cp-8.0.0]$ ./ctlscript.sh stop

To restart the service:

[foc@localhost jasperreports-server-cp-8.0.0]$ ./ctlscript.sh restart

To status the service:

Advertisement
[foc@localhost jasperreports-server-cp-8.0.0]$ ./ctlscript.sh status

 

Step-4: Access JasperReports GUI

After jasperreports-server starts, open a Chrome browser on the server and type localhost:8080/jasperserver.

Install JasperReports Server on Linux [Step-by-Step]

Then you can log in by typing "jasperadmin" in the username and password field.

 

Summary

JasperReports is a very powerful application for reporting. Remember to give enough system resources for efficient use. In this tutorial we covered step by step instructions to install jasper reports along with tomcat on Linux server.

 

References

Jaspersoft Community - Installing JasperReports Server
TIBCO JasperReports Server Installation Guide - JasperReports Server Installation

 

Didn't find what you were looking for? Perform a quick search across GoLinuxCloud

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can either use the comments section or contact me form.

Thank You for your support!!

Leave a Comment

X