Run WLST Commands on a VM

You can run WLST commands from within any Oracle SOA Cloud Service VM that includes an Oracle WebLogic Server installation.

  1. Use the ssh command to connect to the Administration Server VM:
    ssh -i private_key opc@AdminServerVM_IP_address
  2. Change to the oracle user:
    sudo su - oracle
  3. Change the directory to the bin folder in DOMAIN_HOME:
    cd $DOMAIN_HOME/bin

    For example:

    cd /u01/data/domains/soa_domain/bin
  4. Set up the environment:
    . ./setDomainEnv.sh

    You must use . to ensure that the environment variables are set in the current shell.

  5. Start WLST:
    /u01/app/oracle/middleware/oracle_common/common/bin/wlst.sh
  6. Connect to the Administration Server:
    connect('username', 'password', 't3://admin-server-host:admin-server-port')
    For example:
    connect('weblogic', 'welcome', 't3://serviceName-wls-1:9071')
    
  7. To deploy a composite, connect to the Managed Server using port 9073 and run the following command:
    sca_deployComposite('http://admin-server-host:admin-server-port', 'composite-jar')
    For example:
    sca_deployComposite('http://serviceName-wls-1:9073', '/tmp/sca_HelloWorld_rev1.0.jar')
Refer to "WLST Command and Variable Reference" in WLST Command Reference for Oracle WebLogic Server (12.2.1.4 | 12.2.1.3 | 12.2.1.2 | 12.1.3).