Chapter 4. Installing and Upgrading an Agent on a Managed Platform from the JAR File
4.1. Before Installing the Agent
4.1.1. Setting up the JRE for the JBoss ON Agent
- Download and install the appropriate version of the JRE, if necessary.
- Set the
RHQ_JAVA_HOMEenvironment variable to the installation directory.
- Open the
.bashrcfor the system user that will run JBoss ON. For example:
- Add a line to set the
RHQ_JAVA_HOMEenvironment variable to the specific JRE directory. For example:
- Set the system to use the correct version of the JRE using the system
alternativescommand. The selected version has the
*+symbols by it.
/usr/sbin/alternatives --config java There are 5 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.5.0-sun/bin/java 2 /usr/lib/jvm/jre-1.4.2-gcj/bin/java 3 /usr/lib/jvm/jre-1.6.0-sun/bin/java *+ 4 /usr/lib/jvm/jre-1.6.0-openjdk/bin/java 5 /usr/lib/jvm/jre-1.6.0-bea/bin/java Enter to keep the current selection[+], or type selection number:
4.1.2. Configuring the Java Path
4.1.3. Picking the Agent System User
- JBoss EAP servers
- PostgreSQL databases
- Tomcat servers
- Apache servers
- Generic JVMs
run.jarfile, plus execute and search permissions for every directory in the path to the
- Deploying applications
- Executing scripts
- Running start, stop, and restart operations
- Creating child resources through the JBoss ON UI
- Viewing and editing resource configuration
- Configure scripts or operations to run using
sudo. For long-running operations, such as starting a service or a process, the user which executes the script should be the same as the resource user because that user will have the proper authorization and permissions.
- Set start script environment variables to use the resource's principal and credentials, if available.
- For JVM or JMX servers. Select the connection configuration based on the user settings. For different users, use JMX remoting. For the same user, use either JMX remoting or the attach API.
Table 4.1. Cheat Sheet for Agent and Resource Users
|PostgreSQL|| No effect for monitoring and discovery.
The agent user must have read/write permissions to the PostgreSQL configuration file for configuration viewing and editing.
|Apache|| No effect for monitoring and discovery.
The agent user must have read/write permissions to the Apache configuration file for configuration viewing and editing.
|Tomcat||Must use the same user or can't be discovered|
|JMX server or JVM||Different users are fine when using JMX remoting; cannot be discovered with different users and the attach API|
|JBoss AS/EAP||Different users are all right, but requires read permissions on run.jar and execute and search permission on all ancestor directories for run.jar|