Creating a domain in WebLogic 11g or 12c

I’m going to create a simple domain called “SnapDomain” in WebLogic 12c (12.1.1) here with an Admin Server, and single Managed Server running from the same machine: linux01 (192.168.28.11).

Ensure your environment is set correctly, then start-up the GUI:

. ~/set_wls12.env
cd $WLS_HOME/common/bin
./config.sh

Once the GUI starts, respond as follows:

  • Welcome
    • Create a new WebLogic domain
    • Next
  • Select Domain Source
    • Generate a domain configured automatically to support the following products
      • I recommend selecting the ‘Oracle Enterprise Manager’ component here, which will automatically select ‘Oracle JRF’ (Java Required Files), although it’s by no means compulsory.
      • Leave everything else unchecked, unless there are additional components you require.
    • Next
  • Specify Domain Name and Location
    • Domain name: SnapDomain
    • Domain location: /u01/app/oracle/middleware/user_projects/domains
    • Next
  • Configure Administrator User Name and Password
    • Name: weblogic
    • User password: password1
    • Confirm user password: password1
    • Description: This user is the default administrator.
    • Next
  • Configure Server Start Mode and JDK
    • WebLogice Domain Startup Mode: Development Mode (unless this is for a Production environment)
    • Available JDKs: Sun SDK 1.7.0_21 (this will vary depending on your installation)
    • Next
  • Select Optional Configuration
    • Tick ‘Administration Server’
    • Tick ‘Managed Servers, Clusters and Machines’
    • Next
  • Configure the Administration Server
    • Name: AdminServer
    • Listen address: linux01.vbox
    • Listen port: 7001
    • Tick ‘SSL enabled’
    • SSL listen port: 7501
    • Next
  • Configure Managed Servers
    • Add
      • Name: ManagedServer_1
      • Listen address: linux01.vbox
      • Listen port: 7010
      • Tick ‘SSL enabled’
      • SSL listen port: 7510
    • Next
  • Configure Clusters
    • Next (we’re not clustering here)
  • Configure Machines
    • Select the ‘Unix Machine’ tab
    • Add
      • Name: linux01.vbox
      • Node manager listen address: linux01.vbox
      • Node manager listen port: 5556
    • Next
  • Assign Servers to Machines
    • Assign Server AdminServer to Machine linux01.vbox
    • Assign Server ManagedServer_1 to Machine linux01.vbox
    • Next
  • Configuration Summary
    • Check the details
    • Create
    • Done

Start your Admin Server

Now you can startup your Admin Server and tail the log file to check everything starts as expected:

export MW_HOME/u01/app/oracle/middleware
export WLS_HOME=$MW_HOME/wls_12.1.1

nohup $MW_HOME/user_projects/domains/SnapDomain/startWebLogic.sh > /dev/null 2>&1 &
sleep 10
tail -f $MW_HOME/user_projects/domains/SnapDomain/servers/AdminServer/logs/AdminServer.log

NOTE: If you’re running in Production mode, you need to run this interactively (without the ‘&’ sign), as you’ll be prompted for the password), for example:

$MW_HOME/user_projects/domains/SnapDomain/startWebLogic.sh

…wait for a couple of minutes and look out for the following to ensure the Admin Server starts up correctly:

<BEA-000360> <Server started in RUNNING mode>

Then you can test connectivity to the Administration Console using the following URL: http://192.168.28.11:7001/console

Start your Node Manager

Start the Node Manager process (doing so allows you to start Managed Server using the Administration Console):

nohup $WLS_HOME/server/bin/startNodeManager.sh > /dev/null 2>&1 &
sleep 2
cat $WLS_HOME/common/nodemanager/nodemanager.log

Copy boot.properties file to the new Managed Server

Rather than having to enter the weblogic user credentials in each time, a boot.properties file (an encrypted password file) should have automatically been created for your Admin Server already, as part of the domain creation above.

To avoid having to type in the same credentials for your Managed Server too, copy the existing boot.properties file across as below:

mkdir -p $MW_HOME/user_projects/domains/SnapDomain/servers/ManagedServer_1/security
cp $MW_HOME/user_projects/domains/SnapDomain/servers/AdminServer/security/boot.properties $MW_HOME/user_projects/domains/SnapDomain/servers/ManagedServer_1/security/boot.properties

Start your Managed Server

Now the Managed Server can then be started from within the Administration Console above (Environment > Servers > Control):

..or by running the the following:

nohup $MW_HOME/user_projects/domains/SnapDomain/bin/startManagedWebLogic.sh ManagedServer_1 > /dev/null 2>&1 &
sleep 5
tail -f $MW_HOME/user_projects/domains/SnapDomain/servers/ManagedServer_1/logs/ManagedServer_1.log

The Managed Server will take several minutes start, unlike the Admin Server, but again, look out for the following message to ensure it starts up correctly:

<BEA-000360> <Server started in RUNNING mode>

…and that’s it, your domain is ready to use 🙂

2 thoughts on “Creating a domain in WebLogic 11g or 12c

Leave a comment

Your e-mail address will not be published. Required fields are marked *