You can use the WebLogic Scripting Tool (WLST) to administer the Oracle WebLogic Server domain in your Oracle Java Cloud Service instance from a command line or script.
Note:Prior to modifying the default WebLogic Server configuration in your service instance, see Administration Best Practices.
About WLST Online and Offline
You can use WLST as the command-line equivalent to the WebLogic Server Administration Console (WLST online) or as the command-line equivalent to the Configuration Wizard (WLST offline).
Online WLST commands allow you to connect to a running Administration Server and manage the configuration of an active WebLogic Server domain, view performance data about resources in the domain, or manage security data. The commands also allow you to connect to Managed Servers, although you cannot modify configuration data from Managed Servers.
Offline—that is, without connecting to a running WebLogic Server instance—WLST allows you to create domain templates, create a new domain based on existing templates, or extend an existing, inactive domain. You cannot use WLST offline to view performance data about resources in a WebLogic Server domain or modify security data. You cannot run offline commands from a remotely-attached Oracle Java Cloud Service instance because the domain configuration files are not local to your system, and so you cannot manipulate them.
Run WLST Commands on a Node
You can run WLST commands from within any Oracle Java Cloud Service node that includes an Oracle WebLogic Server installation.
Prior to running WLST, identify the public IP address of the node and connect to it with SSH, as described in Access a Node with a Secure Shell (SSH).
- After connecting to the node, switch to the
sudo su - oracle
- Change the directory to the
- Set up the environment.
You must use the
.to ensure that the environment variables are set in the current shell.
- Launch WLST:
- Connect to the Administration Server:
connect('loginID', 'password', 'admin-server-host:admin-server-port')For example:
connect('weblogic', 'password', 'service-wls-1:7001')
Run WLST Commands from a Different Host
You can run WLST commands from a host that is not an Oracle Java Cloud Service node (for example, from your laptop or a separate machine running in the Cloud). Use the WLST installation on this remote machine to connect to your Oracle Java Cloud Service Administration Server.
By default, if you created your service instance in an Oracle Cloud Infrastructure
Classic region, remote access to the administration console and WLST over port
7002 is disabled for security purposes. If you did not enable console access while provisioning your service instance, see Enabling Console Access in an Oracle Java Cloud Service Instance.
Alternatively, you can create an SSH tunnel to port
9001 on the Administration Server node.
- Use the Oracle Java Cloud Service console to identify the public IP address of your Administration Server.
- Launch a command shell on a machine with an Oracle WebLogic Server installation.
- If you have not updated the default SSL configuration of your Administration Server, set the following environment variable to accept the default SSL certificate:
export WLST_PROPERTIES="-Dweblogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.security.TrustKeyStore=DemoTrust"
- Navigate to your Oracle WebLogic Server installation and launch WLST using the
- From the WLST prompt, connect to the Administration Server at port
7002. Specify the WebLogic Server administrative credentials that you specified when you created the service instance.
> connect('username', 'password', 't3s://adminServerPublicIP:7002')
> connect('weblogic', 'password', '203.0.113.10:7002')
If you are accessing the Administration Server node via an SSH tunnel, connect to