ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzamy_5.4.0.1/50/admin/wsarun.htm

118 lines
5.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>Run the wsadmin tool</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h4><a name="wsarun"></a>Run the wsadmin tool</h4>
<p>This topic describes how to start and stop an interactive wsadmin session and other ways to invoke wsadmin commands.</p>
<p>The interactive session is a shell environment in which you can run wsadmin commands and scripts.</p>
<ul>
<li><a href="#start">Start wsadmin</a></li>
<li><a href="#stop">Stop wsadmin</a></li>
</ul>
<p>You can also run a single command or script file without starting an interactive session, or run commands in a profile before the interactive session starts. The other ways that you can invoke wsadmin commands are:</p>
<ul>
<li><a href="#individual">Run wsadmin commands individually</a></li>
<li><a href="#script">Run wsadmin commands in a script</a></li>
<li><a href="#profile">Run wsadmin commands in a profile</a></li>
</ul>
<p><strong><a name="start"></a>Start wsadmin</strong></p>
<p>To start an interactive wsadmin session, follow these steps:</p>
<ol>
<li><p>Enter the Start Qshell (STRQSH) command on an CL command line.</p></li>
<li><p>Use the cd command to change to the bin directory of the product installation root:</p>
<pre>cd /QIBM/ProdData/WebASE/ASE5/bin</pre></li>
<li><p>At the Qshell prompt, enter this command:</p>
<pre>wsadmin -instance <em>instance</em></pre>
<p>where <em>instance</em> is the name of the instance that you want to administer.</p></li>
</ol>
<p>Before you exit the interactive session, run this command to save your configuration changes:</p>
<pre>$AdminConfig save</pre>
<p>If you do not run this command, wsadmin discards your changes when you exit the interactive session.</p>
<p><strong><a name="stop"></a>Stop wsadmin</strong></p>
<p>To exit wsadmin, enter this command at the wsadmin prompt:</p>
<pre>exit</pre>
<p><strong><a name="individual"></a>Run wsadmin commands individually</strong></p>
<p>To run commands individually, specify the -c option when you run the <tt>wsadmin</tt> command.</p>
<pre>wsadmin -instance <em>instance</em> -c '$AdminApp list'
WASX7209I: Connected to process &quot;<em>instance</em>&quot; on node <em>node</em> using
SOAP connector; The type of process is: UnManagedProcess
&quot;Business Applications&quot;
DB2WebServicesSamples
ExpressSamples
&quot;IBM Telephone Directory&quot;
adminconsole</pre>
<p>In this example, <em>instance</em> is the name of your WebSphere Application Server - Express instance, <em>server</em> is the name of your application server, and <em>node</em> is the name iSeries host server:</p>
<p>When you run commands with the -c parameter, configuration changes are saved automatically. You do not need to run the <tt>$AdminConfig save</tt> command.</p>
<p><strong><a name="script"></a>Run wsadmin commands in a script</strong></p>
<p>After you run a script, wsadmin returns you to the Qshell prompt.</p>
<p>To run commands in a script, specify the -f option when you run the <tt>wsadmin</tt> command:</p>
<pre>wsadmin -instance <em>instance</em> -f '<em>script.jacl</em>'
WASX7209I: Connected to process &quot;<em>server</em>&quot; on node <em>node</em> using SOAP connector;
The type of process is: UnManagedProcess
adminconsole
DefaultApplication
ivtApp</pre>
<p>In this example, <em>instance</em> is the name of your WebSphere Application Server - Express instance, <em>server</em> is the name of your application server, <em>node</em> is the name of the node where your instance runs, and <em>script.jacl</em> is the fully qualified path of a Jacl script that contains these commands:</p>
<pre>set apps [$AdminApp list]
puts $apps</pre>
<p>If you run a script file that makes changes to your application server's configuration, you must include the <tt>$AdminConfig save</tt> command at the end of the script. If you do not include this command, wsadmin does not save your changes.</p>
<p><strong><a name="profile"></a>Run wsadmin commands in a profile</strong></p>
<p>The wsadmin tool starts an interactive session after it runs the commands in a profile.</p>
<p>To run commands in a profile, specify the -profile option when you run the <tt>wsadmin</tt> command.</p>
<pre>wsadmin -instance <em>instance</em> -profile '<em>profile.jacl</em>'
WASX7209I: Connected to process &quot;<em>server</em>&quot; on node <em>node</em> using SOAP connector;
The type of process is: UnManagedProcess
Applications currently installed:
adminconsole
DefaultApplication
ivtApp
WASX7029I: For help, enter: &quot;$Help help&quot;
wsadmin&gt;</pre>
<p>In this example, <em>instance</em> is the name of your WebSphere Application Server - Express instance, <em>server</em> is the name of your application server, <em>node</em> is the name of the node where your instance runs, and <em>profile.jacl</em> is the fully qualified path of a profile that contains these commands:</p>
<pre>set apps [$AdminApp list]
puts &quot;Applications currently installed:\n$apps&quot;</pre>
</body>
</html>