The IBM WebSphere Application Server (WAS) wsadmin command-line tool provides a comprehensive set of commands for administering and configuring WebSphere environments. Below are some commonly used commands and their descriptions. Please note that the availability and syntax of commands may vary depending on the version of WebSphere Application Server you are using.
Common wsadmin Commands:
- connect:
- Syntax:
connect [hostname] [port] [username] [password] - Connects to a WebSphere Application Server instance.
- Syntax:
- disconnect:
- Syntax:
disconnect - Disconnects from the connected server.
- Syntax:
- AdminApp:
- Commands for managing applications.
AdminApp.install('appPath', ['-appname', 'appName', '-node', 'nodeName', '-server', 'serverName']): Installs an application.AdminApp.uninstall('appName'): Uninstalls an application.
- Commands for managing applications.
- AdminConfig:
- Commands for managing server configuration.
AdminConfig.show(): Displays the current configuration.AdminConfig.modify(params): Modifies the server configuration.AdminConfig.save(): Saves the configuration changes.
- Commands for managing server configuration.
- AdminTask:
- Commands for various administrative tasks.
AdminTask.listServers(): Lists all servers in the cell.AdminTask.stopServer('serverName'): Stops a server.AdminTask.startServer('serverName'): Starts a server.
- Commands for various administrative tasks.
- AdminControl:
- Commands for controlling and querying server runtime information.
AdminControl.completeObjectName('type=Server,node=nodeName,process=serverName,*'): Retrieves the ObjectName for a server.AdminControl.invoke('serverName', 'start'): Invokes a start operation on a server.
- Commands for controlling and querying server runtime information.
- Help:
- Syntax:
help [command] - Displays help information for a specific command.
- Syntax:
Example Usage:
# Connect to the server connect localhost 8880 admin mypassword # Install an application AdminApp.install('/path/to/your/app.ear', ['-appname', 'YourAppName', '-node', 'Node1', '-server', 'server1']) # Save configuration changes AdminConfig.save() # Disconnect from the server disconnect
Additional Resources:
Always refer to the official IBM documentation specific to your version of WebSphere Application Server for the most accurate and up-to-date information. The provided links are based on my knowledge cutoff date in January 2022, and newer versions may have updated documentation.