如何通过命令行完成与IIB Toolkit GUI部署步骤完全一致的IIB应用部署?
Let me break this down for you—when you use the IIB Toolkit's right-click "Deploy... to Integration Server" option, it’s running a series of hidden operations under the hood. To replicate that exact workflow via the command line, you’ll need to mirror those steps precisely. Here’s your step-by-step guide:
First, you need to load the IIB environment profile to access the command-line tools. This is equivalent to opening the Toolkit and having it initialize its environment:
- On Linux/macOS:
source /path/to/your/iib/server/bin/mqsiprofile - On Windows:
"C:\Program Files\IBM\IIB\10.0.0.20\server\bin\mqsiprofile.cmd"
Replace the path with your actual IIB installation directory and version.
The Toolkit first packages your project resources (message flows, schemas, libraries, etc.) into a BAR file before deploying. To do this via command line, use the mqsicreatebar tool, which uses the same logic as the Toolkit's packaging step:
mqsicreatebar -data <toolkit_workspace_path> -b <output_bar_file_path> -p <project_name> [-o Y] [-l <library_project_name>]
Let’s break down the key parameters:
-data: Path to your IIB Toolkit workspace (the same one you use in the GUI)-b: Full path and filename for the output BAR file (e.g.,/tmp/MyApp.bar)-p: Name of the integration project you want to package-o Y: Optional (but recommended) to overwrite an existing BAR file (matches the Toolkit's behavior when you re-deploy)-l: Optional, add this if your project depends on shared library projects to include them in the BAR
Now use mqsideploy to push the BAR to your integration server—this is the direct equivalent of the Toolkit's "Deploy" step. To match the GUI's default behavior, use these parameters:
mqsideploy -i <node_host> -p <node_port> -q <integration_node_name> -e <integration_server_name> -a <bar_file_path> -m -s start
Key parameters explained:
-i/-p: Host and HTTP port of your integration node (default port is 4414; skip these if deploying to a local node)-q: Name of your integration node (e.g.,MYNODE)-e: Name of the target integration server (e.g.,default)-a: Path to the BAR file you built in Step 2-m: Forces overwrite of an existing application with the same name (matches the Toolkit's "Replace existing application" checkbox)-s start: Ensures the application starts immediately after deployment (this is the Toolkit's default behavior; omit if you want to deploy but not start the app)
Here’s a complete end-to-end example for a local IIB node:
# Load IIB profile (Linux) source /opt/ibm/iib-10.0.0.20/server/bin/mqsiprofile # Build BAR from Toolkit workspace mqsicreatebar -data /home/john/IIBWorkspace -b /tmp/CustomerApp.bar -p CustomerIntegrationProject -o Y -l SharedUtilsLibrary # Deploy to local default integration server mqsideploy -q MYINTEGRATIONNODE -e default -a /tmp/CustomerApp.bar -m -s start
- Verify Node/Server Status: The Toolkit checks if the integration node/server is running before deploying—make sure yours is up with
mqsistart <node_name>if needed. - Dependency Checks: Just like the Toolkit, ensure all shared libraries or referenced resources are either included in the BAR or already deployed to the server.
- Application Naming: If you want a custom application name (instead of using the BAR filename), add
-n <custom_app_name>to themqsideploycommand—this matches the "Application name" field in the Toolkit's deploy wizard.
内容的提问来源于stack exchange,提问作者Rudy Vissers

