I will use 2 hosts:
wls1.oraworld.com / 192.168.8.135
wls2.oraworld.com / 192.168.8.136
We will create the following configuration from scratch:
Cluster "oraworldcluster"
Machine "wls1machine"
Host: wls1.oraworld.com
-->AdminServer
-->Managed Server "WLS1"
Machine "wls2machine"
Host: wls2.oraworld.com
-->Managed Server "WLS2"
Creating groups and users in both Servers:
Server wls1.oraworld.com
[root@wls1 ~]# groupadd -g 666 oinstall
[root@wls1 ~]# useradd -u 666 -g oinstall -G oinstall oracle
[root@wls1 ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
[root@wls1 ~]#
[root@wls1 ~]# mkdir -p /u02/oracle/inventory
[root@wls1 ~]# chown -R oracle:oinstall /u02
[root@wls1 ~]# chmod -R 775 /u02
[oracle@wls1 ~]$ mkdir -p /u02/oracle/middleware
[root@wls1 ~]# cd /home/oracle/
[root@wls1 oracle]# ls
jdk-7u71-linux-x64.rpm wls_121200.jar
[root@wls1 oracle]#
[root@wls1 oracle]# rpm -i jdk-7u71-linux-x64.rpm
Unpacking JAR files...
rt.jar...
jsse.jar...
charsets.jar...
tools.jar...
localedata.jar...
jfxrt.jar...
[root@wls1 oracle]#
[root@wls1 oracle]# su - oracle
[oracle@wls1 ~]$ java -version
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
[oracle@wls1 ~]$
Note: Perform the same in wls2.oraworld.com
[oracle@wls2 ~]$ java -version
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
[oracle@wls2 ~]$
Installing WebLogic Server in Server WLS1
Server wls1.oraworld.com
[root@wls1 oracle]# vi /etc/oraInst.loc <<<<-- You have to create this file [root@wls1 oracle]# cat /etc/oraInst.loc inventory_loc=/u02/oracle/inventory inst_group=oinstall [root@wls1 oracle]# chown oracle:oinstall /etc/oraInst.loc [root@wls1 oracle]# chmod 775 /etc/oraInst.loc [root@wls1 oracle]# [oracle@wls1 ~]$ vi /home/oracle/Install.rsp <<<<-- You have to create this file [oracle@wls1 ~]$ cat /home/oracle/Install.rsp [ENGINE] #DO NOT CHANGE THIS. Response File Version=1.0.0.0.0 [GENERIC] #The oracle home location. This can be an existing Oracle Home or a new Oracle Home ORACLE_HOME=/u02/oracle/middleware #Set this variable value to the Installation Type selected. e.g. Fusion Middleware Infrastructure, Fusion Middleware Infrastructure With Examples. INSTALL_TYPE=WebLogic Server #Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name. MYORACLESUPPORT_USERNAME= #Provide the My Oracle Support Password MYORACLESUPPORT_PASSWORD=
#Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration
DECLINE_SECURITY_UPDATES=true
#Set this to true if My Oracle Support Password is specified
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
#Provide the Proxy Host
PROXY_HOST=
#Provide the Proxy Port
PROXY_PORT=
#Provide the Proxy Username
PROXY_USER=
#Provide the Proxy Password
PROXY_PWD=
#Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port]
COLLECTOR_SUPPORTHUB_URL=
[oracle@wls1 ~]$ export WL_HOME=/u02/oracle/middleware/wlserver
[oracle@wls1 ~]$ java -jar wls_121200.jar -silent -invPtrLoc /etc/oraInst.loc -responseFile /home/oracle/Install.rsp -logfile /home/oracle/wlsInstall.log
Extracting files........
Starting Oracle Universal Installer
Checking if CPU speed is above 300 MHz. Actual 2270.324 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 5116696 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
Checking temp space: must be greater than 300 MB. Actual 21101 MB Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2015-01-16_09-35-24AM
Log: /u02/oracle/inventory/logs//home/oracle/wlsInstall.log
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Expected result: One of enterprise-4,enterprise-5,enterprise-6,redhat-6,redhat-4,redhat-5,SuSE-10,SuSE-11
Actual Result: enterprise-6
Check complete. The overall result of this check is: Passed
CertifiedVersions Check: Success.
Expected result: 1.7
Actual Result: 1.7.0_71
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.
Verifying data......
Copying Files...
-----------20%----------40%----------60%----------80%--------100%
The installation of WebLogic Server 12.1.2.0.0 completed successfully.
[oracle@wls1 ~]$
[oracle@wls1 ~]$ ls -ltr /u02/oracle/middleware
total 36
-rw-r----- 1 oracle oinstall 56 Jan 16 09:25 oraInst.loc
drwxr-x--- 8 oracle oinstall 4096 Jan 16 09:36 OPatch
drwxr-x--- 7 oracle oinstall 4096 Jan 16 09:36 oui
drwxr-x--- 5 oracle oinstall 4096 Jan 16 09:36 coherence
drwxr-x--- 11 oracle oinstall 4096 Jan 16 09:36 oracle_common
drwxr-x--- 7 oracle oinstall 4096 Jan 16 09:38 wlserver
drwxr-x--- 2 oracle oinstall 4096 Jan 16 09:39 install
drwxr-x--- 17 oracle oinstall 4096 Jan 16 09:39 inventory
drwxr-x--- 3 oracle oinstall 4096 Jan 16 09:39 cfgtoollogs
[oracle@wls1 ~]$
Note: Perform the same in wls2.oraworld.com
[root@wls2 oracle]# vi /etc/oraInst.loc <<<--- You have to create this file [root@wls2 oracle]# cat /etc/oraInst.loc inventory_loc=/u02/oracle/inventory inst_group=oinstall [root@wls2 oracle]# chown oracle:oinstall /etc/oraInst.loc [root@wls2 oracle]# chmod 775 /etc/oraInst.loc [oracle@wls2 ~]$ vi /home/oracle/Install.rsp <<<--You have to create this file (use the same than wls1) [oracle@wls2 ~]$ cat /home/oracle/Install.rsp |egrep 'HOME|TYPE' ORACLE_HOME=/u02/oracle/middleware INSTALL_TYPE=WebLogic Server [oracle@wls2 ~]$ [oracle@wls2 ~]$ java -jar wls_121200.jar -silent -invPtrLoc /etc/oraInst.loc -responseFile /home/oracle/Install.rsp -logfile /home/oracle/wlsInstall.log Extracting files...... Starting Oracle Universal Installer Checking if CPU speed is above 300 MHz. Actual 2228.183 MHz Passed Checking swap space: must be greater than 512 MB. Actual 5119996 MB Passed Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required) Checking temp space: must be greater than 300 MB. Actual 29166 MB Passed Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2015-01-16_09-41-24AM Log: /u02/oracle/inventory/logs//home/oracle/wlsInstall.log Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. Reading response file.. Expected result: One of enterprise-4,enterprise-5,enterprise-6,redhat-6,redhat-4,redhat-5,SuSE-10,SuSE-11 Actual Result: enterprise-6 Check complete. The overall result of this check is: Passed CertifiedVersions Check: Success. Expected result: 1.7 Actual Result: 1.7.0_71 Check complete. The overall result of this check is: Passed CheckJDKVersion Check: Success. Verifying data...... Copying Files... -----------20%----------40%----------60%----------80%--------100% The installation of WebLogic Server 12.1.2.0.0 completed successfully. [oracle@wls2 ~]$ [oracle@wls2 ~]$ ls -ltr /u02/oracle/middleware/ total 36 -rw-r----- 1 oracle oinstall 56 Jan 16 09:38 oraInst.loc drwxr-x--- 8 oracle oinstall 4096 Jan 16 09:42 OPatch drwxr-x--- 5 oracle oinstall 4096 Jan 16 09:42 coherence drwxr-x--- 7 oracle oinstall 4096 Jan 16 09:42 oui drwxr-x--- 11 oracle oinstall 4096 Jan 16 09:42 oracle_common drwxr-x--- 7 oracle oinstall 4096 Jan 16 09:43 wlserver drwxr-x--- 17 oracle oinstall 4096 Jan 16 09:44 inventory drwxr-x--- 2 oracle oinstall 4096 Jan 16 09:44 install drwxr-x--- 3 oracle oinstall 4096 Jan 16 09:44 cfgtoollogs [oracle@wls2 ~]$ Configuring 1 Domain in wls1.oraworld.com [oracle@wls1 bin]$ cd /u02/oracle/middleware/wlserver/common/bin/ [oracle@wls1 bin]$ ./wlst.sh Initializing WebLogic Scripting Tool (WLST) ... Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away. Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands wls:/offline> readTemplate('/u02/oracle/middleware/wlserver/common/templates/wls/wls.jar')
wls:/offline/base_domain>cd('Servers/AdminServer')
wls:/offline/base_domain/Server/AdminServer>cmo.setListenAddress('wls1.oraworld.com')
wls:/offline/base_domain/Server/AdminServer>setOption('ServerStartMode','prod')
wls:/offline/base_domain/Server/AdminServer>set('ListenPort', 7001)
wls:/offline/base_domain/Server/AdminServer>create('AdminServer','SSL')
Proxy for AdminServer: Name=AdminServer, Type=SSL
wls:/offline/base_domain/Server/AdminServer>cd('SSL/AdminServer')
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('Enabled', 'True')
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('ListenPort', 7002)
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>cd('/')
wls:/offline/base_domain>cd('Security/base_domain/User/weblogic')
wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('manager1')
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('ServerStartMode','prod')
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain', 'true')
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/u02/oracle/middleware/user_projects/domains/oraworld_domain')
wls:/offline/oraworld_domain/Security/oraworld_domain/User/weblogic>closeTemplate()
wls:/offline>exit()
Exiting WebLogic Scripting Tool.
[oracle@wls1 bin]$
Creating 2 Machines, 2 MServers, 1 Cluster and Associate MServers to Machines
Note: These steps were executed from wls1.oraworld.com
[oracle@wls1 bin]$ /u02/oracle/middleware/wlserver/common/bin/wlst.sh
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> readDomain('/u02/oracle/middleware/user_projects/domains/oraworld_domain')
wls:/offline/oraworld_domain>cd('/')
wls:/offline/oraworld_domain>create('wls1', 'Server')
Proxy for wls1: Name=wls1, Type=Server
wls:/offline/oraworld_domain>cd ('Servers')
wls:/offline/oraworld_domain/Server>cd ('wls1')
wls:/offline/oraworld_domain/Server/wls1>set('ListenPort', 7004)
wls:/offline/oraworld_domain/Server/wls1>set('ListenAddress', 'wls1.oraworld.com')
wls:/offline/oraworld_domain/Server/wls1>cd('/')
wls:/offline/oraworld_domain>create('wls2', 'Server')
Proxy for wls2: Name=wls2, Type=Server
wls:/offline/oraworld_domain>cd ('Servers')
wls:/offline/oraworld_domain/Server>cd ('wls2')
wls:/offline/oraworld_domain/Server/wls2>set('ListenPort', 7004)
wls:/offline/oraworld_domain/Server/wls2>set('ListenAddress', 'wls2.oraworld.com')
wls:/offline/oraworld_domain/Server/wls2>cd('/')
wls:/offline/oraworld_domain>create('oraworldcluster', 'Cluster')
Proxy for oraworldcluster: Name=oraworldcluster, Type=Cluster
wls:/offline/oraworld_domain>assign('Server', 'wls1,wls2','Cluster','oraworldcluster')
wls:/offline/oraworld_domain>cd('Cluster/oraworldcluster')
wls:/offline/oraworld_domain/Cluster/oraworldcluster>set('ClusterMessagingMode', 'unicast')
wls:/offline/oraworld_domain/Cluster/oraworldcluster>set('WeblogicPluginEnabled', 'true')
wls:/offline/oraworld_domain/Cluster/oraworldcluster>cd('/')
wls:/offline/oraworld_domain>create('wls1machine', 'Machine')
Proxy for wls1machine: Name=wls1machine, Type=Machine
wls:/offline/oraworld_domain>assign('Server', 'wls1','Machine','wls1machine')
wls:/offline/oraworld_domain>cd('Machines/' + 'wls1machine/')
wls:/offline/oraworld_domain/Machine/wls1machine>create('wls1machine', 'NodeManager')
Proxy for wls1machine: Name=wls1machine, Type=NodeManager
wls:/offline/oraworld_domain/Machine/wls1machine>cd('NodeManager/' + 'wls1machine')
wls:/offline/oraworld_domain/Machine/wls1machine/NodeManager/wls1machine>set('NMType', 'SSL')
wls:/offline/oraworld_domain/Machine/wls1machine/NodeManager/wls1machine>set('ListenAddress', 'wls1.oraworld.com')
wls:/offline/oraworld_domain/Machine/wls1machine/NodeManager/wls1machine>set('DebugEnabled', 'false')
wls:/offline/oraworld_domain/Machine/wls1machine/NodeManager/wls1machine>cd('/')
wls:/offline/oraworld_domain>create('wls2machine', 'Machine')
Proxy for wls2machine: Name=wls2machine, Type=Machine
wls:/offline/oraworld_domain>assign('Server', 'wls2','Machine','wls2machine')
wls:/offline/oraworld_domain>cd('Machines/' + 'wls2machine/')
wls:/offline/oraworld_domain/Machine/wls2machine>create('wls2machine', 'NodeManager')
Proxy for wls2machine: Name=wls2machine, Type=NodeManager
wls:/offline/oraworld_domain/Machine/wls2machine>cd('NodeManager/' + 'wls2machine')
wls:/offline/oraworld_domain/Machine/wls2machine/NodeManager/wls2machine>set('NMType', 'SSL')
wls:/offline/oraworld_domain/Machine/wls2machine/NodeManager/wls2machine>set('ListenAddress', 'wls2.oraworld.com')
wls:/offline/oraworld_domain/Machine/wls2machine/NodeManager/wls2machine>set('DebugEnabled', 'false')
wls:/offline/oraworld_domain/Machine/wls2machine/NodeManager/wls2machine>updateDomain()
wls:/offline/oraworld_domain/Machine/wls2machine/NodeManager/wls2machine>closeDomain()
wls:/offline>disconnect()
You will need to be connected to a running server to execute this command
wls:/offline>exit()
Exiting WebLogic Scripting Tool.
[oracle@wls1 bin]$
Pack and unpack the domain:
In wls1.oraworld.com:
[oracle@wls1 bin]$ ./pack.sh -managed=true -domain=$DOMAIN_HOME -template=${DOMAIN_HOME}-template.jar -template_name=oraworld_domain
<< read domain from "/u02/oracle/middleware/user_projects/domains/oraworld_domain" >> succeed: read domain from "/u02/oracle/middleware/user_projects/domains/oraworld_domain"
<< set config option Managed to "true" >> succeed: set config option Managed to "true"
<< write template to "/u02/oracle/middleware/user_projects/domains/oraworld_domain-template.jar" .......................................................................................... >> succeed: write template to "/u02/oracle/middleware/user_projects/domains/oraworld_domain-template.jar"
<< close template >> succeed: close template
[oracle@wls1 bin]$ scp /u02/oracle/middleware/user_projects/domains/oraworld_domain-template.jar oracle@wls2.oraworld.com:/u02/oracle/middleware/user_projects/domains
oracle@wls2.oraworld.com's password:
oraworld_domain-template.jar 100% 48KB 48.4KB/s 00:00
[oracle@wls1 bin]$
In wls2.oraworld.com
[oracle@wls2 ~]$ export DOMAIN_HOME=/u02/oracle/middleware/user_projects/domains/oraworld_domain
[oracle@wls2 ~]$ export WL_HOME=/u02/oracle/middleware/wlserver
[oracle@wls2 ~]$
[oracle@wls2 bin]$ ./unpack.sh -domain=$DOMAIN_HOME -template=${DOMAIN_HOME}-template.jar
<< read template from "/u02/oracle/middleware/user_projects/domains/oraworld_domain-template.jar" >> succeed: read template from "/u02/oracle/middleware/user_projects/domains/oraworld_domain-template.jar"
<< set config option DomainName to "oraworld_domain" >> succeed: set config option DomainName to "oraworld_domain"
<< write Domain to "/u02/oracle/middleware/user_projects/domains/oraworld_domain" .......................................................................................... >> succeed: write Domain to "/u02/oracle/middleware/user_projects/domains/oraworld_domain"
<< close template >> succeed: close template
[oracle@wls2 bin]$
[oracle@wls2 bin]$ $WL_HOME/common/bin/wlst.sh
Initializing WebLogic Scripting Tool (WLST) ...
Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> connect('weblogic', 'manager1', 't3://192.168.8.135:7001')
Connecting to t3://192.168.8.135:7001 with userid weblogic ...
Successfully connected to Admin Server "AdminServer" that belongs to domain "oraworld_domain".
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
wls:/oraworld_domain/serverConfig> nmEnroll('/u02/oracle/middleware/user_projects/domains/oraworld_domain', '/u02/oracle/middleware/wlserver/common/nodemanager')
Enrolling this machine with the domain directory at /u02/oracle/middleware/user_projects/domains/oraworld_domain ...
Successfully enrolled this machine with the domain directory at /u02/oracle/middleware/user_projects/domains/oraworld_domain.
wls:/oraworld_domain/serverConfig>
wls:/oraworld_domain/serverConfig> disconnect()
Disconnected from weblogic server: AdminServer
wls:/offline> exit()
Exiting WebLogic Scripting Tool.
Starting the Cluster and start to have fun:
[oracle@wls1 bin]$ cd /u02/oracle/middleware/user_projects/domains/oraworld_domain/bin
[oracle@wls2 bin]$ ./startNodeManager.sh &
[oracle@wls1 bin]$ ./startWebLogic.sh &
[oracle@wls1 bin]$ ./startManagedWebLogic.sh wls1
[oracle@wls2 bin]$ cd /u02/oracle/middleware/user_projects/domains/oraworld_domain/bin
[oracle@wls2 bin]$ ./startNodeManager.sh &
[oracle@wls2 bin]$ ./startManagedWebLogic.sh wls2