I’ve recently installed JasperReports Server (release Community Project 4.2.1) on Linux CentOS, so I would like to talk about some issues I’ve been dealing with.
First of all, I have to write about a JRStyledTextParser exception that I got and didn’t have on Microsoft Windows. Once more a forum post was the beginning of the solution, so I edited the file $JASPERSERVER_HOME/apache-tomcat/scripts/clt.sh and set the property java.awt.headless=true:
export JAVA_OPTS="-Djava.awt.headless=true ..."
I wanted to run JasperServer as a service so I had to code the following script in /etc/init.d:
#!/bin/bash## jasperserver ## chkconfig: 2345 95 15# description: Script de inicio de JasperReports ServerRETVAL=$?JASPERSERVER_HOME="/jaspersoft/jasperreports-server-cp-4.2.1"case "$1" in start) if [ -f $JASPERSERVER_HOME/ctlscript.sh ]; then echo $"Starting JasperReports Server" /bin/su - jasperadmin -c "$JASPERSERVER_HOME/ctlscript.sh start" fi ;; stop) if [ -f $JASPERSERVER_HOME/ctlscript.sh ]; then echo $"Stopping JasperReports Server" /bin/su - jasperadmin -c "$JASPERSERVER_HOME/ctlscript.sh stop" fi ;; restart) if [ -f $JASPERSERVER_HOME/ctlscript.sh ]; then echo $"Restarting JasperReports Server" /bin/su - jasperadmin -c "$JASPERSERVER_HOME/ctlscript.sh restart" fi ;; status) if [ -f $JASPERSERVER_HOME/ctlscript.sh ]; then /bin/su - jasperadmin -c "$JASPERSERVER_HOME/ctlscript.sh status" fi ;; *) echo $"Usage: $0 {start|stop|restart|status}" exit 1 ;;esacexit $RETVAL
After that, I added the service:
chmod 755 jasperserverchkconfig --add jasperserver
Finally, I used a specific user jasperadmin as the owner of JasperServer software, this user could not open the restricted ports 80 and 443 (I needed HTTPS), so I set up Apache to act as a proxy, adding this line to the httpd.conf configuration file:
ProxyPass / ajp://jasperserver.test.local:8009/
I hope that my experience will be useful for you!
Recommended Comments
There are no comments to display.