Configure Qshell to run WebSphere Application Server scripts
Unless otherwise specified, all of the WebSphere Application Server scripts are located in this directory:
- WebSphere Application Server and WebSphere Application Server Express: /QIBM/ProdData/WebSphere/AppServer/V6/Base/bin
- WebSphere Application Server Network Deployment: /QIBM/ProdData/WebSphere/AppServer/V6/ND/bin
These scripts must be run from Qshell. There are several ways to run QShell commands to ensure the correct version (from the correct directory) is used.
- Invoke the fully qualified path name of the script:
/QIBM/ProdData/WebSphere/AppServer/V6/Base/bin/script_name parametersor/QIBM/ProdData/WebSphere/AppServer/V6/ND/bin/script_name parameterswhere script_name is the name of the script and parameters represents the parameters that are passed to the script.
- Invoke the script from the OS/400 command line or from an OS/400 CL program. To use this method, run the STRQSH command and specify the fully qualified path name of the script:
STRQSH CMD('/QIBM/ProdData/WebSphere/AppServer/V6/edition /bin/script_name parameters')where edition is Base or ND, depending on which product you are running, script_name is the name of the script, and parameters represents the parameters that are passed to the script.
- Use the cd command to change to the /QIBM/ProdData/WebSphere/AppServer/V6/Base/bin or /QIBM/ProdData/WebSphere/AppServer/V6/ND/bin directory, and then run the script:
cd /QIBM/ProdData/WebSphere/AppServer/V6/edition/bin script_name parameterswhere edition is Base or ND, depending on which product you are running, script_name is the name of the script, and parameters represents the parameters that are passed to the script.
- You can also update the PATH environment variable to automatically locate the script when you run it. After you update the PATH variable, you can run these scripts from any directory. To update the PATH environment variable, follow these steps:
- Edit the .profile file in the /home/user_profile_name directory, where user_profile_name is the name of your iSeries user profile.
Note: If this file does not exist, create it in this directory. You can use the EDTF command from an OS/400 command line or use any editor from a workstation. Also note that .profile is the full name of the file. When you start Qshell, it searches for the .profile file, and runs the commands listed in it. You can use the .profile file to set persistent environment variables for your Qshell session.
- Add one of these lines to the .profile file:
- WebSphere Application Server:
export PATH=/QIBM/ProdData/WebSphere/AppServer/V6/Base/bin:$PATH- WebSphere Application Server Network Deployment:
export PATH=/QIBM/ProdData/WebSphere/AppServer/V6/ND/bin:$PATH
- Save the file.
Notes:
- The updates to .profile do not take effect until you restart Qshell (if you had a session open) or source .profile (command: ./home/user_profile_name/.profile)
- If you want to change the path for a single Qshell session instead of changing the default path for all Qshell sessions, run the export commands during the Qshell session.