Post-Installation Configuration Activity

 

 

 

Step

Action

1. 

For the purpose of training, a directory is open for you.

 

 

This is the JasperReports Server home directory. It is referred to in written documentation as <js-install>.

 

This directory contains all the software provided by the JasperReports Server installer.

2. 

Tip: Use shortcuts to avoid typing long directory names.

 

 

Type the first few letters of the command, followed by the directory or file you want. Then press the [Tab] key. Linux will display the first matching path name.

 

If the file name is incomplete, as shown in the first attempt, press [Tab] again for all possible matches.

Then, complete the file or document name by typing until you get to a unique character, and press the [Tab] key. An example follows.

3. 

Example: From the current directory you could type: cd ap[Tab]

 

 

Linux partially completes it the command as: cd apache-

 

Press [Tab] again to display the possible matches: apache-ant and apache-tomcat

 

Type t[Tab] to complete the command: cd apache-tomcat.

4. 

The change directory command is completed for you. This directory contains the bundled Apache Tomcat Java web application server software

 

Next run the directory list command.

 

Note: The long list command is also used in this course. To retrieve a long list, type ls -l. Many distributions provide the double-L alias, ll.

 

Type a valid value e.g. "ls".

5. 

The scripts directory contains the ctl.sh file that configures runtime settings.

6. 

Type a valid value e.g. "cd scripts".

7. 

Type a valid value e.g. "ls" to list the file(s) in the directory.

8. 

The directory contains one file, ctl.sh. Runtime settings are configured here.

9. 

Next, open ctl.sh in a plain text editor.

 

For the purpose of training, the file is opened in a plain text editor when you press Enter.

 

Press [Enter] to continue.

10. 

Notice the export JAVA_OPTS line (highlighted). These defaults were set by the Jaspersoft installer.

11. 

When you click -Xms1024m, the Java memory heap size starting value is selected.

12. 

For this example, change the starting heap setting (-Xms) from 1 GB to 2 GB.

 

Type a valid value e.g. "2048".

13. 

The starting setting (-Xms) has been increased.

 

 

The maximum value (-Xmx) must be equal to or greater than the starting value.

14. 

For the purpose of training, the maximum heap size will be increased for you.

 

When you click in the the -Xmx setting, it increases from 2 GB to 4 GB.

 

Click in the -Xmx setting.

15. 

The Java heap is now configured to start with 2 GB of memory, with a maximum of 4 GB.

16. 

The default PermSize and MaxPermSize settings are adequate for most needs.

 

You can increase these values if you encounter PermGen errors. PermGen errors can occur if you load custom Java libraries that exceed the amount of memory reserved by these settings.

17. 

For the purpose of training, the file is saved when you press Enter.

 

Press [Enter] to save your edits.

18. 

The file is saved.

19. 

For the purpose of training, the editor closes when you press Enter.

 

Press [Enter] to exit the text editor.

20. 

Task 1: Increase the memory allocated to the JVM used by Tomcat, is complete.

21. 

Next, increase the system resources available to PostgreSQL.

 

For the purpose of training, the JasperReports Server directory is opened and long list command alias is run for you.

22. 

PostgreSQL must be restarted for changes to take effect.

 

Note: The command used here shuts down both Tomcat and PostgreSQL. Shutting both down makes it more clear to end users that JasperReports Server is unavailable. Refer to the Overview associated with this module for additional options.

 

Begin by typing a valid value e.g. "./ctlscript.sh stop".

23. 

JasperReports Server is stopped.

24. 

Next, edit the postgresql.conf file.

 

 

For the purpose of training, the screen has been cleared and the /opt/jasperreports-server-5.1/postgresql/data directory is listed for you.

25. 

For the purpose of training, when you press Enter, the file is opened for you in a plain text editor. 

 

Press [Enter] to continue.

26. 

The PostgreSQL configuration file opens in a plain text editor.

 

The most common configuration changes are shown in the following steps.

27. 

By default, PostgreSQL allows up to 100 connections.

28. 

JasperReports Server uses connection pooling.

 

You can safely lower the max_connections setting to free up memory.

 

For the purpose of training, this value is reduced when you click the max_connections line.

 

Click the max_connections line.

29. 

The max_connections value has been reduced from 100 to 10.

This frees up some memory.

30. 

The memory allocated to buffers is conservatively low to ensure wide compatibility.

31. 

If you have available memory, you can increase the buffers allocation for better performance.

 

For the purpose of training, these values are increased for you when you click the buffers values.

 

Click a buffers value line.

32. 

The buffers values are increased to take advantage of available memory.

 

 

Notice that the temp_buffers value line was uncommented by deleting the # at the beginning of the line.

 

Important: Refer to the Resources associated with this module for sizing recommendations.

33. 

If you have available memory, you can increase the effective cache size.

 

Important: Refer to the Resources associated with this module for sizing recommendations.

34. 

For the purpose of training, this value is uncommented and increased for you when you click the effective_cache_size value line.

 

Click the effective_cache_size value line.

35. 

The effective_cache_size is uncommented and configured to use 256 MB.

36. 

Suggested configuration changes are complete. For the purpose of training, changes are saved when you press Enter.

 

Press [Enter] to write the file to disk (save).

37. 

For the purpose of training, the editor closes when you press Enter.

 

Press [Enter] to exit the text editor.

38. 

Editing is complete.

39. 

Finally, start JasperReports Server.

 

 

The change directory commands are run for you.

40. 

The Jaspersoft home directory appears.

 

Next, type a valid value e.g. "./ctlscript.sh start".

41. 

JasperReports Server starts.

 

 

Task 2: Increase system resources available to PostgreSQL, is complete.

42. 

Congratulations!

 

You completed the following two tasks:

 

1. Increase the memory allocated to the JVM used by Tomcat.

2. Increase system resources available to PostgreSQL.

End of Procedure.