#### Configuring the admin server

You can configure the admin server by using the JReport Administration page or the server.properties file.

##### Using the JReport Administration page

1. Launch JReport Enterprise Server on the admin server, and then log onto the JReport Administration page (port 8889 by default).
2. Click Configuration on the system toolbar and switch to the Cluster tab.
3. Check the Admin Server option to indicate that this server will run as the admin server in the cluster.
4. In the Server's RMI Host text field, type the RMI IP address or host name of the local server, or localhost.
5. In the Server's RMI Port text field, type the RMI port number of the local server.
6. Specify the paths of the shared directories on the shared disk (mapped network drive), such as shared properties directory, shared realm directory, shared resource root directory, shared temporary directory, and shared history directory.
7. If you are using HSQLDB for JReport Enterprise Server's system database, click Data on the system toolbar, then in the URL text field, make the system database be in the shared properties directory as set in step 6.
8. Shut down JReport Enterprise Server on the admin server.

##### Using the server.properties and dbconfig.xml files

1. Launch JReport Enterprise Server once on the admin server, and then shut it down.
2. Open the server.properties file in `<install_root>\bin`.
3. Modify the properties file as follows:
   - server.rmi.port=1129
     Specifies the RMI port number of the local server.
   - cluster.server.admin=true
     Specifies whether the server is the admin server. The default value is true.
   - cluster.server.backup=false
     Specifies whether the server is a backup server. The default value is false.
   - loadbalance=(boolean)
     Specifies whether to enable the load-balancing feature. The default value is true.
   - loadbalance.type=(integer)
     Specifies the load-balancing algorithm type. This property only applies to the admin server.

     Value | Description
     --- | ---
     0 | Allocates tasks with the Least Current Report Sets Algorithm.
     1 | Allocates tasks with the Round Robin Algorithm.
     2 | Allocates tasks with the Least Weighted Current Report Sets Algorithm.
     3 | Allocates tasks randomly.

     See Built-in load balancing algorithm for details about the four load balancing types.

   - cluster.only_accept_predefined_server=true
     If this value is set to true, the admin server will only accept connections from servers that exist in the Predefined Server List. The default value is false.
   - cluster.update_concurrent_reports_immediately=(boolean)
     Specifies whether to send the number of concurrently running report sets on this server to the admin server immediately when the number is changed. The default value is false.

     If it is set to false, each clustered server will check whether this number has changed at a certain time interval. If it has changed, the number will be sent to the admin server. Otherwise it will not be sent.

     This property can be set to true when you have enough network bandwidth.

4. Specify the paths of the shared directories on the shared disk (mapped network drive), such as shared properties directory, shared realm directory, shared resource root directory, shared temporary directory, and shared history directory.

   Add the following properties to the server.properties file:

   - resource.share.temp.dir=
     Specifies the directory for storing temporary files.
   - resource.share.hist.dir=
     Specifies the directory for storing all versions of report set results in the cluster.
   - resource.share.realm.dir=
     Specifies the directory of the realm files.
   - resource.share.properties.dir=
     Specifies the directory of the properties files.
   - resource.root=
     Specifies the directory of the JReport demo report sets.
5. If you are using HSQLDB for JReport Enterprise Server system database, edit dbconfig.xml in `<install_root>\bin` by making the system database be in the shared properties directory as set in step 4.

Notes:

- The shared directories must exist in the shared disk before the cluster can begin to function. If they do not exist, create or copy them from the JReport Enterprise Server home directory. They are properties, realm, jreports, temp, and history.

  If you choose to copy folders such as properties, realm, jreports, temp, and history from the JReport Enterprise Server home directory to the shared disk, you must first clear the content of the folders. Otherwise, the existing settings and information the folders contain will cause conflicts when JReport Enterprise Server is running.

- The folder names for the shared directories can be different from that of JReport Enterprise Server. However, you must make sure the paths you specify are consistent with that of the existing directories.
- If the content of the shared resource root directory jreports is removed, the Public Reports folder in the resource tree will be empty. When JReport Enterprise Server finds that there is no content in the properties folder, it will re-scan the resource directory in order to re-construct the properties folder's content.