WebLogic Server 11g
WebLogic Server 11g
WebLogic Server 11g
6) installation
Posted on March 22, 2013 by Garth First of all, Im assuming here that the oracle user, groups etc. have already been created here. If not, take a look at Create oracle user and groups under my Linux installation post here. Im using the WebLogic 11gR1 generic package installer (which is used for all 64 -bit platforms) to do this installation on Linux 6.4, with the Oracle JRockit 6 JDK. If youre using a 32-bit package installer, this will already contain the appropriate JDK.
o o o o o o
Next /u01/app/oracle/middleware/jrockit-jdk1.6.0_37-R28.2.5-4.1.0 Next Ignore the optional components (Demos and Samples, Source Code) Next Done
Optional Components
Installation Complete
Now set your environment and make sure Java is referencing the JRockit JDK: export JAVA_HOME=/u01/app/oracle/middleware/jrockit-jdk1.6.0_37-R28.2.5-4.1.0 export PATH=$JAVA_HOME/bin:$PATH which java /u01/app/oracle/middleware/jrockit-jdk1.6.0_37-R28.2.5-4.1.0/bin/java
$JAVA_HOME/bin/java -d64 -Xmx1024m -jar wls1036_generic.jar Extracting 0%............. NOTE: You need to use the -d64 flag above when using 32/64-bit hybrid JDKs, but I specify it just in case here Once the GUI starts, respond as follows:
Welcome
o o o o o o o
Next Create a new Middleware Home Middleware Home Directory: /u01/app/oracle/middleware Next Accept the warning about the directory not being empty, click Yes Uncheck I wish to receive security updates via My Oracle Support Confirm you wish to bypass this, click Yes
o o o o o o o o o o o o
There is a known bug within the installer at this stage. If you get caught in a loop where you cannot bypass this, leave the box ticked and click Yes and Yes again. When the Connection failed dialog appears, tick the I wish to remain uninformed box, then Continue and you should then make it to the next screen!
Next Custom Next Untick the Oracle Coherence option (unless you plan to use it) Next Local JDK: Oracle 1.6.0_37 (your JRockit JDK installation) Next WebLogic Server: /u01/app/oracle/middleware/wls_10.3.6 Next Next to install Once the installation has finished, remove the tick next to Run Quickstart Done
JDK Selection
Update your oracle profile or create an environment file with the following: vi ~/set_wls11.env # WebLogic 11g environment file export JAVA_HOME=/u01/app/oracle/middleware/jrockit-jdk1.6.0_37-R28.2.5-4.1.0
export PATH=$JAVA_HOME/bin:$PATH export MW_HOME=/u01/app/oracle/middleware export WLS_HOME=$MW_HOME/wls_10.3.6 Set your environment with the new settings: . ./set_wls11.env
o o o
Create a new WebLogic domain Next Generate a domain configured automatically to support the following products
o o o o o o o o o o o o o o o o o o o
I recommend selecting the Oracle Enterprise Manager component here, which will automatically select Oracle JRF (Java Required Files), although its by no means compulsory. Leave everything else unchecked, unless there are additional components you require.
Next Domain name: SnapDomain Domain location: /u01/app/oracle/middleware/user_projects/domains Next Name: weblogic User password: password1 Confirm user password: password1 Description: This user is the default administrator. Next 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 Tick Administration Server Tick Managed Servers, Clusters and Machines Next Name: AdminServer Listen address: linux01.vbox Listen port: 7001 Tick SSL enabled
o o o
o o o o
Name: ManagedServer_1 Listen address: linux01.vbox Listen port: 7010 Tick SSL enabled SSL listen port: 7510
Next Next (were not clustering here) Select the Unix Machine tab Add
o o o o o o o
Name: linux01.vbox Node manager listen address: linux01.vbox Node manager listen port: 5556
Next Assign Server AdminServer to Machine linux01.vbox Assign Server ManagedServer_1 to Machine linux01.vbox Next Check the details Create Done
Configuration Summary
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/AdminSe rver.log NOTE: If youre running in Production mode, you need to run this interactively (without the & sign), as youll 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
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/securit y cp $MW_HOME/user_projects/domains/ SnapDomain/servers/AdminServer/security/boot.pro perties $MW_HOME/user_projects/domains/SnapDomain/servers/ManagedServer_1/security /boot.properties
nohup $MW_HOME/user_projects/domains/SnapDomain/bin/startManagedWebLogic.sh Manage dServer_1 > /dev/null 2>&1 & sleep 5 tail -f $MW_HOME/user_projects/domains/ SnapDomain/servers/ManagedServer_1/logs/Man agedServer_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>
o o o o o o o o o o o o o o o o o o o o o
Create a new WebLogic domain Next Generate a domain configured automatically to support the following products: Tick Oracle Enterprise Manager (Oracle JRF components will be automatically added) Next Domain Name: ClusterDomain Domain Location: /u01/app/oracle/middleware/user_projects/domains Application location: /u01/app/oracle/middleware/user_projects/applications Next Name: weblogic User password: password1 Confirm user password: password1 Next Development Mode (unless Production) Available JDKs: JRockit SDK 1.6.0_37 Next Tick Administration Server Tick Managed Servers, Clusters and Machines Next Name: AdminServer Listen address: linux01.vbox
o o o o o
Listen port: 7004 SSL enabled: tick SSL listen port: 7504 Next Add
o o o
Name: ManagedServer_1 Listen address: linux01.vbox Listen port: 7007 Tick SSL enabled SSL listen port: 7507 Name: ManagedServer_2 Listen address: linux02.vbox Listen port: 7007 Tick SSL enabled SSL listen port: 7507
Add
Next Add
Configure Clusters
o o o o o o
Next Assign Server ManagedServer_1 to Cluster Cluster_1 Assign Server ManagedServer_2 to Cluster Cluster_1 Next Select Unix Machine tab Add
Configure Machines
o o o o o o o
Name: linux01.vbox Node manager listen address: linux01.vbox Node manager listen port: 5556 Name: linux02.vbox Node manager listen address: linux02.vbox Node manager listen port: 5556
Add
Next Assign Server AdminServer to Machine linux01.vbox Assign Server ManagedServer_1 to Machine linux01.vbox Assign Server ManagedServer_2 to Machine linux02.vbox Next Check the configuration is correct
Configuration Summary
o o
Creating Domain
(CTRL+C to exit from the tail command above): <BEA-000360> <Server started in RUNNING mode>
Copy the jar file across to the other machine in your domain (linux02): scp ${DOMAIN_HOME}-template.jar linux02.vbox:/u01/app/oracle/middleware/user_proje cts/domains Then use unpack on the second machine to write the necessary configuration files for your cluster domain: export DOMAIN_HOME=/u01/app/oracle/middleware/user_projects/domains/ClusterDomain cd $WL_HOME/common/bin ./unpack.sh -domain=$DOMAIN_HOME -template=${DOMAIN_HOME}-template.jar
On both of the servers, check that the domain has been registered correctly with the Node Manager services by looking at the following files: grep $DOMAIN_HOME $MW_HOME/domain-registry.xml u01/app/oracle/middleware/user_projects/domains/ClusterDomain"/>
grep $DOMAIN_HOME $WLS_HOME/common/nodemanager/nodemanager.domains clusterDomain=/u01/app/oracle/middleware/user_projects/domains/ClusterDomain Finally, make sure the Node Manager services are up and running on both machines, if not, start them: ps -ef|grep NodeManager nohup $WLS_HOME/server/bin/startNodeManager.sh > /dev/null 2>&1 &
# Set environment variables export MW_HOME=/u01/app/oracle/middleware export WLS_HOME=$MW_HOME/wls_10.3.6 export DOMAIN_NAME=ClusterDomain export DOMAIN_HOME=$MW_HOME/user_projects/domains/$DOMAIN_NAME
echo Stopping WebLogic Managed Servers... echo Stopping WebLogic Managed Server : ManagedServer_1 $DOMAIN_HOME/bin/stopManagedWebLogic.sh ManagedServer_1
echo Stopping Node Manager... nm_pid=`ps -ef | grep [N]odeManager | awk '{print $2}'` if [ "$nm_pid" = "" ]; then echo Node Manager not running else echo Killing Node Manager processes: $nm_pid kill -9 $nm_pid 2>&1 > /dev/null fi
echo "Tidying up temp files..." find $DOMAIN_HOME/servers -name "*.lok" -exec rm -f {} \; find $DOMAIN_HOME/servers -name "*.DAT" -exec rm -f {} \;
# Set environment variables export MW_HOME=/u01/app/oracle/middleware export WLS_HOME=$MW_HOME/wls_10.3.6 export DOMAIN_NAME=ClusterDomain export DOMAIN_HOME=$MW_HOME/user_projects/domains/$DOMAIN_NAME
echo Starting Node Manager... nohup $WLS_HOME/server/bin/startNodeManager.sh > /dev/null 2>&1 &
sleep 10
echo Starting WebLogic Admin Server... nohup $DOMAIN_HOME/bin/startWebLogic.sh > /dev/null 2>&1 & sleep 120
echo Starting WebLogic Managed Servers... echo Starting WebLogic Managed Server : ManagedServer_1 nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh ManagedServer_1 > /dev/null 2>&1 &
echo Done! These scripts would be executed against your primary machine. The same scripts can be applied to your second machine, just without the Admin Server reference, and renaming your Managed Server appropriately e.g. ManagedServer_2
$DOMAIN_HOME/bin/stopWebLogic.sh $DOMAIN_HOME/bin/stopManagedWebLogic.sh ManagedServer_1 Remove the domain entry from the Node Manager file: vi $WLS_HOME/common/nodemanager/nodemanager.domains remove this line: oldDomain=/u01/app/oracle/middleware/user_projects/domains/oldDomain
Remove the domain registry entry relevant to your domain: vi $MW_HOME/domain-registry.xml remove this line: <domain location="u01/app/oracle/middleware/user_projects/domains/oldDomain"/> Finally, delete the oldDomain applications (if any have been deployed) and then the directory structure: rm -Rf $MW_HOME/user_projects/applications/oldDomain rm -Rf $MW_HOME/user_projects/domains/oldDomain All done!