Post-Installation Configuration Activity

 

 

 

Step

Action

1. 

Begin by running the Tomcat Service manager. This needs to launch from a command line.

 

Click the Windows Start button.

2. 

Enter a valid value e.g. "cmd".

3. 

Right-click the cmd menu.

4. 

Click the Run as administrator menu.

5. 

The Windows Command Processor window appears.

 

 

From this window you type commands to change directories and run programs.

6. 

First change to the JasperReports Server home directory by typing cd \jasperreports-server-5.0.1

 

When you click the Command line window, the change directory command is run for you.

 

Click the Command line window.

7. 

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.

8. 

Tip: You can use shortcuts to avoid typing long directory names.

 

Type the first few letters of the directory, file or command you want, then press the [Tab] key. Windows will display the first matching path name. Press [Tab] again for additional matches.

9. 

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

 

 

Windows would complete it as: cd apache-ant

 

Press [Tab] again to find the next match, which is the desired directory: cd apache-tomcat

10. 

Now change to the Apache Tomcat home directory by typing cd apache-tomcat.

 

When you click the Command line window, the change directory command is run for you.

 

Click the Command line window.

11. 

The apache-tomcat directory contains the bundled Apache Tomcat Java web application server software.

12. 

Next change to the Apache Tomcat bin directory.

 

Enter a valid value e.g. "cd bin".

13. 

This directory contains the Apache Tomcat binary executable files.

14. 

For the purpose of training, a directory list is shown.

 

When you click the Command line window, the dir *.bin command is run for you.

 

Click the Command line window.

15. 

A directory listing of executable files appears.

16. 

tomcat6w.exe is the Tomcat (version 6) service manager application.

17. 

In the next step run the tomcat6w application with the following arguments:

 

 

tomcat6w launches the Tomcat (version 6) service manager

 

//ES// is the command line switch for "Edit Service"

 

jasperreportsTomcat is the service name

18. 

Type a valid value e.g. "tomcat6w //ES//jasperreportsTomcat".

19. 

The  jasperreportsTomcat Properties window opens.

 

This is the Apache Tomcat service manager.

20. 

Memory is allocated to the Java Virtual Machine.

 

Click the Java tab.

21. 

Notice the text in the Java Options box. These defaults were set by the Jaspersoft installer.

 

Note: For the purpose of training, you can disregard the three boxes at the bottom of the panel.

22. 

Click -Xms1024M to select the Java memory heap size starting value.

23. 

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

 

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

24. 

The starting setting (-Xms) has been increased.

 

 

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

25. 

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

 

When you click in the Java Options box, the -Xmx setting will increase to 4 GB.

 

Click in the Java Options field.

26. 

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

27. 

Click the scrollbar to view additional information.

28. 

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.

29. 

Click OK to commit the changes.

30. 

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

31. 

Next increase the system resources available to PostgreSQL.

 

Begin by shutting down the PostgreSQL service.

 

Click the Windows Start button.

32. 

Click the JasperReports Server 5.1 folder.

33. 

Click the Start or Stop Services folder.

34. 

Click the Stop Service menu.

35. 

A command line window displays briefly.

36. 

Next, edit the postgresql.conf file.

 

For the purpose of training, folder C:\jasperreports-server-5.0.01\postgresql\data is opened

for you.

 

Right-click the postgresql.conf file.

37. 

Click the highlighted text editor.

 

Note: You can use any plain text editor.

38. 

The PostgreSQL configuration file opens in a plain text editor.

 

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

39. 

Click the Vertical scrollbar to view more information.

40. 

By default, PostgreSQL allows up to 100 connections.

41. 

JasperReports Server uses connection pooling.

 

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

 

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

 

Click the max_connections line.

42. 

The max_connections value has been reduced from 100 to 10. This frees up some memory.

43. 

Click the Vertical scrollbar to view more information.

44. 

The memory allocated to shared_buffers is conservatively low to ensure wide compatibility. Also notice that temp_buffers is commented out (disabled).

45. 

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.

46. 

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 lesson for sizing recommendations.

47. 

Click the scrollbar to view more of the file.

48. 

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

 

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

49. 

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

 

Click in the effective_cache_size value line.

50. 

The effective_cache_size was uncommented and configured to use 256 MB.

51. 

Suggested configuration changes are complete.

 

Click the Close button.

52. 

Click the Save button to commit your changes.

53. 

Finish by restarting the PostgreSQL service.

 

Click the Windows Start button.

54. 

Click the JasperReports Server 5.1 folder.

55. 

Click the Start or Stop Services folder.

56. 

Click the Start Service menu.

 

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

57. 

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.