Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 9. How to…
The following CLI commands and operations provide basic examples on how to accomplish certain tasks. For detailed instructions, see the appropriate section of the Configuration Guide or other JBoss EAP guide.
Unless specified otherwise, the examples apply when running as a standalone server. Use the --help argument on a command to get usage for that command. Use the read-operation-description to get information on a particular operation for a resource.
9.1. Add a Datasource Link kopierenLink in die Zwischenablage kopiert!
data-source add --name=DATASOURCE_NAME --jndi-name=JNDI_NAME --driver-name=DRIVER_NAME --connection-url=CONNECTION_URL
9.2. Add a JMS Queue Link kopierenLink in die Zwischenablage kopiert!
jms-queue add --queue-address=QUEUE --entries=java:/jms/queue/QUEUE
9.3. Add a JMS Topic Link kopierenLink in die Zwischenablage kopiert!
jms-topic add --topic-address=TOPIC --entries=java:/jms/topic/TOPIC
9.4. Add a Module Link kopierenLink in die Zwischenablage kopiert!
module add --name=MODULE_NAME --resources=PATH_TO_RESOURCE --dependencies=DEPENDENCIES
Using the module management CLI command to add and remove modules is provided as technology preview only. This command is not appropriate for use in a managed domain or when connecting to the management CLI remotely. Modules should be added and removed manually in a production environment. For more information, see the Create a Custom Module Manually and Remove a Custom Module Manually sections of the JBoss EAP Configuration Guide.
9.5. Add a Server Link kopierenLink in die Zwischenablage kopiert!
Add a new server to a host in a managed domain.
/host=HOST_NAME/server-config=SERVER_NAME:add(group=SERVER_GROUP_NAME)
9.6. Add a Server Group Link kopierenLink in die Zwischenablage kopiert!
Add a new server group in a managed domain.
/server-group=SERVER_GROUP_NAME:add(profile=PROFILE_NAME, socket-binding-group=SOCKET_BINDING_GROUP_NAME)
9.7. Add a System Property Link kopierenLink in die Zwischenablage kopiert!
/system-property=PROPERTY_NAME:add(value=PROPERTY_VALUE)
9.8. Clone a Profile Link kopierenLink in die Zwischenablage kopiert!
Clone a profile in a managed domain.
/profile=PROFILE_TO_CLONE:clone(to-profile=NEW_PROFILE_NAME)
9.9. Create a Hierarchical Profile Link kopierenLink in die Zwischenablage kopiert!
Create a new profile that inherits from other profiles.
/profile=NEW_PROFILE_NAME:add(includes=[PROFILE_1,PROFILE_2])
9.10. Deploy an Application to a Managed Domain Link kopierenLink in die Zwischenablage kopiert!
Deploy an Application to All Server Groups.
deploy /path/to/DEPLOYMENT.war --all-server-groups
Deploy an Application to One or More Server Groups.
deploy /path/to/DEPLOYMENT.war --server-groups=SERVER_GROUP_1,SERVER_GROUP_2
9.11. Deploy an Application to a Standalone Server Link kopierenLink in die Zwischenablage kopiert!
deploy /path/to/DEPLOYMENT.war
9.12. Display the Active User Link kopierenLink in die Zwischenablage kopiert!
Command:
:whoami
Output:
{
"outcome" => "success",
"result" => {"identity" => {
"username" => "$local",
"realm" => "ManagementRealm"
}}
}
9.13. Display Schema Information Link kopierenLink in die Zwischenablage kopiert!
To show the schema information for the :product-info command:
:read-operation-description(name=product-info)
To display the schema version, execute an ls command at the management CLI root and look for the management-*-version values:
...
management-major-version=4
management-micro-version=0
management-minor-version=1
...
9.14. Display System and Server Information Link kopierenLink in die Zwischenablage kopiert!
Command:
:product-info
Output:
{
"outcome" => "success",
"result" => [{"summary" => {
"host-name" => "HOST_NAME",
"instance-identifier" => "INSTANCE_ID",
"product-name" => "JBoss EAP",
"product-version" => "7.0.0.GA",
"product-community-identifier" => "Product",
"product-home" => "EAP_HOME",
"standalone-or-domain-identifier" => "OPERATING_MODE",
"host-operating-system" => "OS_NAME",
"host-cpu" => {
"host-cpu-arch" => "CPU_ARCH",
"host-core-count" => CORE_COUNT
},
"jvm" => {
"name" => "JAVA_VM_NAME",
"java-version" => "JAVA_VERSION",
"jvm-version" => "JAVA_VM_VERSION",
"jvm-vendor" => "JAVA_VM_VENDOR",
"java-home" => "JAVA_HOME"
}
}}]
}
Similarly, for a managed domain, you can display the information for a particular JBoss EAP host or server:
/host=HOST_NAME:product-info
/host=HOST_NAME/server=SERVER_NAME:product-info
9.15. Reload a Host Controller Link kopierenLink in die Zwischenablage kopiert!
reload --host=HOST_NAME
9.16. Reload a Host Controller in Admin-only Mode Link kopierenLink in die Zwischenablage kopiert!
reload --host=HOST_NAME --admin-only=true
9.17. Reload the Server Link kopierenLink in die Zwischenablage kopiert!
reload
9.18. Reload the Server in Admin-Only Mode Link kopierenLink in die Zwischenablage kopiert!
reload --admin-only=true
9.19. Remove a Module Link kopierenLink in die Zwischenablage kopiert!
module remove --name=MODULE_NAME
Using the module management CLI command to add and remove modules is provided as technology preview only. This command is not appropriate for use in a managed domain or when connecting to the management CLI remotely. Modules should be added and removed manually in a production environment. For more information, see the Create a Custom Module Manually and Remove a Custom Module Manually sections of the JBoss EAP Configuration Guide.
9.20. Shut Down a Host Controller Link kopierenLink in die Zwischenablage kopiert!
Shut down a host controller in a managed domain.
shutdown --host=HOST_NAME
9.21. Shut Down the Server Link kopierenLink in die Zwischenablage kopiert!
Shut down a standalone server.
shutdown
9.22. Start a Server Link kopierenLink in die Zwischenablage kopiert!
Start a server in a managed domain.
/host=HOST_NAME/server-config=SERVER_NAME:start
9.23. Start All Servers in a Server Group Link kopierenLink in die Zwischenablage kopiert!
Start all servers in a certain server group in a managed domain.
/server-group=SERVER_GROUP_NAME:start-servers
9.24. Stop a Server Link kopierenLink in die Zwischenablage kopiert!
Stop a server in a managed domain.
/host=HOST_NAME/server-config=SERVER_NAME:stop
9.25. Stop All Servers in a Server Group Link kopierenLink in die Zwischenablage kopiert!
Stop all servers in a certain server group in a managed domain.
/server-group=SERVER_GROUP_NAME:stop-servers
9.26. Take a Configuration Snapshot Link kopierenLink in die Zwischenablage kopiert!
Take a snapshot of the current configurations.
:take-snapshot
9.27. Undeploy an Application from a Managed Domain Link kopierenLink in die Zwischenablage kopiert!
Undeploy an application from all server groups with that deployment.
undeploy DEPLOYMENT.war --all-relevant-server-groups
Undeploy an application from a specific server group. The --keep-content parameter is required in order to keep the content in the repository for other server groups with that deployment.
undeploy DEPLOYMENT.war --server-groups=SERVER_GROUP_NAME --keep-content
9.28. Undeploy an Application from a Standalone Server Link kopierenLink in die Zwischenablage kopiert!
undeploy DEPLOYMENT.war
9.29. Update a Host Name Link kopierenLink in die Zwischenablage kopiert!
Update the name of a host in a managed domain. The host must be reloaded in order for the changes to take effect.
/host=EXISTING_HOST_NAME:write-attribute(name=name,value=NEW_HOST_NAME)
reload --host=EXISTING_HOST_NAME
9.30. View a Server Log Link kopierenLink in die Zwischenablage kopiert!
/subsystem=logging/log-file=SERVER_LOG_NAME:read-log-file