Configure and manage the installed JBoss EAP 7 server.
| Resources | |
|---|---|
| Files | NA |
| Application URL | http://localhost:9990 |
Outcomes
You should be able to login as an admin user and explore the various features of the administration console.
Run the following command to recreate the JBoss EAP installation at /opt/jboss-eap-7.4:
[student@workstation ~]$ lab start features-managing
Instructions
Start the JBoss EAP 7 server as the jboss user:
[student@workstation ~]$ sudo -u jboss /opt/jboss-eap-7.4/bin/standalone.shAdd a new admin user:
In a new terminal window, run the add-user.sh script as the jboss
user.
[student@workstation ~]$ sudo -u jboss /opt/jboss-eap-7.4/bin/add-user.shCreate a new user based on the following criteria.
Table 1.1. Administrative user creation
| Field | Value |
|---|---|
User Type
| Management User. Choose option a
|
Username
|
admin
|
User 'admin' already exists and is disabled, would you like to…
| Choose option a
|
Password
|
redhat123
|
Are you sure you want to use the password entered yes/no?
|
yes
|
Re-enter Password
|
redhat123
|
A List of groups that the user belongs to
| Press Intro |
Is this new user going to be used for one AS process to connect to another AS process?
|
no
|
Inspect the mgmt-users.properties file, which is used for defining users who need access to the JBoss EAP management console, either through the web interface, or by using the management CLI.
Using a text editor, open the JBOSS_HOME/standalone/configuration/mgmt-users.properties file as the jboss user.
Verify that you have a user named admin in this file, and the user has a hashed password.
The same file is also available on the domain directory of the JBoss EAP 7 installation to secure the administrative console.
Using a text editor, open the JBOSS_HOME/domain/configuration/mgmt-users.properties file as the jboss user.
Verify that the admin user is also in this file.
Notice that the same credentials are defined for both the standalone and the managed domain.
Close the two mgmt-users.properties files.
Log in to the management console:
Point your web browser to http://localhost:9990/, which is the location of the management console.
Log in as the admin user that you created in the previous step, with redhat123 as the password.
You should see the home page of the JBoss EAP 7 management console:
![]() |
The Java Virtual Machine (JVM) is responsible for managing the amount of memory used by the application server and deployed applications, as well as to manage class loading. Read the metrics obtained from the JVM, by using the JBoss EAP management console.
View the JVM Status page of the JBoss EAP management console. Navigate to → → and click to view the JVM details.
![]() |
View the JBoss EAP server logs.
The JBoss EAP server logs are stored in the local file system. Sometimes due to file system access restrictions, the administrator might need to access it via a web console.
Navigate to → → and click in the second column of the menu. Then, click to view the log file.
![]() |
Change the deployment scanner interval.
The JBoss EAP deployment scanner is a subsystem that periodically scans and detects new application deployments to the application server.
In this step, you update the time interval which JBoss EAP scans for new files in the deployments directory.
Navigate to → → . Then, click to show the configuration page.
Select the default scanner, and click .
Change the value from the default value of 5000 (5 seconds) to 8000 (8 seconds).
![]() |
Scroll down, and click .
Verify Configuration Changes:
Open the file JBOSS_HOME/standalone/configuration/standalone.xml in a text editor as the jboss user.
Verify that the deployment-scanner subsystem reflects the changes you made via the administration console.
....
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir"
scan-interval="8000"
runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
</subsystem>
....Launch the management CLI tool and verify that the configuration changes are visible.
The CLI tool is presented later, but it uses an approach similar to a bash script to customize JBoss EAP configuration files.
For example, to get information about the deployment scanner subsystem, open a terminal window, run the jboss-cli.sh script, and connect to the running instance of EAP using the following commands:
[student@workstation ~]$sudo -u jboss /opt/jboss-eap-7.4/bin/jboss-cli.sh \--connect[standalone@localhost:9990 /]/subsystem=deployment-scanner\/scanner=default:read-resource{ "outcome" => "success", "result" => { "auto-deploy-exploded" => false, "auto-deploy-xml" => true, "auto-deploy-zipped" => true, "deployment-timeout" => 600, "path" => "deployments", "relative-to" => "jboss.server.base.dir", "runtime-failure-causes-rollback" => expression "${jboss.deployment.scanner.rollback.on.failure:false}", "scan-enabled" => true, "scan-interval" => 8000 } }
Exit the management CLI by running the exit command:
[standalone@localhost:9990 /] exitShut down JBoss EAP.
Before moving on to the next lab, if EAP is running, then shutdown the JBoss EAP 7 server by pressing Ctrl+C in the terminal window where you started JBoss EAP 7.