=====JasperReporting Server=====
FINALLY :) We arrived to something to install :) So we are going to perform WAR installation on Apache Tomcat and store our data on PostgreSQL, both of which we already installed above:
====Download JasperServer====
Download the package from: https://community.jaspersoft.com/project/jasperreports-server/releases
and transfer to the target machine
Alternatively you can do the following
[root@jasperserver tmp]# wget ttps://sourceforge.net/projects/jasperserver/files/JasperServer/JasperReports%20Server%20Community%20Edition%207.1.0/TIB_js-jrs-cp_7.1.0_bin.zip/download#
Saving to: “download”
100%[==================================================================================================================================>] 332,329,027 9.42M/s in 60s
2018-06-20 17:21:41 (5.25 MB/s) - “download” saved [332329027/332329027]
[root@jasperserver tmp]# unzip download
Archive: TIB_js-jrs-cp_7.1.0_bin.zip
creating: jasperreports-server-cp-7.1.0-bin/
creating: jasperreports-server-cp-7.1.0-bin/apache-ant/
creating: jasperreports-server-cp-7.1.0-bin/apache-ant/bin/
creating: jasperreports-server-cp-7.1.0-bin/apache-ant/etc/
creating: jasperreports-server-cp-7.1.0-bin/apache-ant/etc/checkstyle/
creating: jasperreports-server-cp-7.1.0-bin/apache-ant/lib/
creating: jasperreports-server-cp-7.1.0-bin/buildomatic/
creating: jasperreports-server-cp-7.1.0-bin/buildomatic/bin/
creating: jasperreports-server-cp-7.1.0-bin/buildomatic/conf_source/
creating: jasperreports-server-cp-7.1.0-bin/buildomatic/conf_source/db/
creating: jasperreports-server-cp-7.1.0-bin/buildomat
After the file has been unzipped, we have to configure the postgreSQL.
=====PostgreSQL configuration=====
Edit the pg_hba.conf as follows:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all ident
local postgres postgres md5
# IPv4 local connections:
host all postgres jasper_server_IP/32 md5 <- THIS IP is important :)
host all all 127.0.0.1/32 ident
# IPv6 local connections:
host all all ::1/128 ident
Restart the postgresql OR re-load the configuration, whichever you prefer :)
=====Configure JasperServer=====
After the postgreSQL allows connection, copy the "postgresql_master.properties" into the "buildomatic" directory as "default_master.properties and be sure that the following values are set:
appServerType=tomcat
appServerDir=/opt/apache-tomcat-8.5.31/ <- Location of the Apache tomcat from step 1)
dbHost=JasperServer Hostname
dbUsername=postgres <- PostgreSQL user user :)
dbPassword=postgres <- PostgreSQL user password
At this stage your database should be running and your app server should be DOWN :)
=====Install JasperServer via Script=====
The installation is done via the a sh script as follows:
[root@localhost buildomatic]# ./js-install-ce.sh
Writing to log file: logs/js-install-ce_2018-06-20_16-47-11364.log
----------------------------------------------------------------------
Running JasperReports Server install script at 2018-06-20_16-47
----------------------------------------------------------------------
----------------------------------------------------------------------
Using ANT_OPTS: -Dnet.sf.ehcache.disabled=true -Xms512m -Xmx2048m
----------------------------------------------------------------------
WARNING: JAVA_HOME environment variable not found
[default]
Running install-normal-ce Ant task.
----------------------------------------------------------------------
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el6_9.x86_64/lib/tools.jar
Buildfile: /root/jasper/jasperreports-server-cp-7.1.0-bin/buildomatic/build.xml
[echo] Filtering properties (cleaning out blank spaces)
[echo] chkIfPackageManagedTomcat: check if package managed tomcat
[echo] Tomcat DBCP Factory: com.jaspersoft.jasperserver.tomcat.jndi.JSCommonsBasicDataSourceFactory
[echo] chkAndSetLocaleDbSettings: dbType is postgresql
[echo] chkAndSetLocaleDbSettings: db.set.lc_collate and db.set.lc_ctype are NOT both set
[echo] chkAndSetLocaleDbSettings: parse: scripts.properties for db commands
[echo] chkIfPackageManagedTomcat: check if package managed tomcat
[taskdef] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found.
[echo] using settings file: /root/jasper/jasperreports-server-cp-7.1.0-bs
***************************************************************************************************************************
deploy-webapp-datasource-configs:
[echo]
[echo] Property values (in app-server.xml: deploy-webapp):
[echo] jsEdition = ce
[echo] warFileDistSourceDir = /root/jasper/jasperreports-server-cp-7.1.0-bin/buildomatic/../jasperserver.war
[echo] warTargetDir = /opt/apache-tomcat-8.5.31/webapps/jasperserver
[echo] webAppName = jasperserver
[echo] webAppNameCE = jasperserver
[echo] webAppNamePro = jasperserver-pro
[echo] webAppNameSrc = jasperserver
[echo] webAppNameDel = jasperserver
[echo] warTargetDirDel = /opt/apache-tomcat-8.5.31/webapps/jasperserver
[copy] Copying 8 files to /opt/apache-tomcat-8.5.31/webapps/jasperserver
deploy-webapp-ce:
install-normal-ce:
[echo] Installation successfully completed!
BUILD SUCCESSFUL
Total time: 4 minutes 42 seconds
Checking Ant return code: OK
----------------------------------------------------------------------
======Test======
After all this, you will be rewarded with the option to connect to the Jasper Web Interface :) ... AFTER you start your Apache Tomcat of course :)
Feel free to use the following credentials:
jasperadmin / jasperadmin
{{ :jasperserverinstall.jpg?direct&400 |}}