(iSeries)
Configure Qshell to run WebSphere scripts using wsadmin.sh
We can configure Qshell to run product scripts for IBM i.
In a default installation, unless otherwise specified, all WebSphere Application Server scripts are in the app_server_root/bin directory.
The scripts must be run from Qshell. To ensure that we use the correct version and directory, run QShell commands using one of the following methods:
Tasks
- Invoke the fully qualified path name of the script:
app_server_root/bin/script_name parameterswhere script_name is the name of the script and parameters represents the parameters passed to the script.- Invoke the script from the IBM i command line or from an IBM i CL program. To use this method, run the STRQSH command and specify the fully qualified path name of the script:
STRQSH CMD('app_server_root/bin/script_name parameters')where script_name is the name of the script and parameters represents the parameters passed to the script.- Change directories to app_server_root/bin and run the following script:
cd app_server_root/bin script_name parameterswhere script_name is the name of the script, and parameters represents the parameters passed to the script.- We can update the PATH environment variable to automatically locate the script when we run it. After updating the PATH variable, we can run these scripts from any directory. To update the PATH environment variable...
- Edit the .profile file in the /home/user_profile directory, where user_profile is the name of our IBM i user profile.
If this file does not exist, create it in this directory. Use the EDTF command from an IBM i command line or use any editor from a workstation. Also note that .profile is the full name of the file. When we start Qshell, it searches for the .profile file, and runs the commands listed in it. Use the .profile file to set persistent environment variables for our Qshell session.
- Add the following line to the .profile file:
export PATH=app_server_root/bin:$PATH- Save the file.
What to do next
The updates to .profile do not take effect until you restart Qshell (if you had a session open) or start .profile with the ./home/user_profile/.profile command.
To change the path for a single Qshell session instead of changing the default path for all Qshell sessions, run the export commands shown in the last step during the Qshell session, but do not edit the .profile.
Script and command line reference material