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.
To administer a service instance through WLST, use one of these methods:
For more information, see Running WLST Commands on a VM
For more information, see Running WLST Commands from a Different Host
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 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 domain or modify security data. You cannot run offline commands from a remotely-attached Oracle Java Cloud Service because the domain configuration files are not local to your system, so you cannot manipulate them.
You can run WLST commands from within a VM that includes an Oracle WebLogic Server installation.
Prior to running WLST, identify the public IP address of the VM and connect to it with SSH, as described in Accessing a VM Through a Secure Shell (SSH).
$> sudo su - oracle
oracle user is used to run Oracle applications and utilities on VMs, including WLST.
setDomainEnv.shcommand, which resides in
$> . ./setDomainEnv.sh
You must use the
. to ensure that the environment variables are set in the current shell.
> connect('loginID', 'password', 'admin-server-host:admin-server-port')
> connect('weblogic', 'welcome1', 'service-wls-1:7001')
You can run WLST commands from a host that is not the VM running Oracle WebLogic Server in Oracle Java Cloud Service (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, remote access to the administration console and WLST over port
7002 is disabled for security purposes.
Alternatively, you can create an SSH tunnel to port
9001 on the Administration Server VM, as described in Creating an SSH Tunnel.
export WLST_PROPERTIES="-Dweblogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.security.TrustKeyStore=DemoTrust"
7002. Specify the WebLogic Server administrative credentials that you specified when you created the service instance.
> connect('username', 'password', 't3s://adminServerPublicIP:7002')
> connect('weblogic', 'welcome1', '10.11.12.13:7002')
If you are accessing the Administration Server VM via an SSH tunnel, connect to