Anda di halaman 1dari 16

WebLogic Server 11g (10.3.

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.

JRockit JDK install


To install JRockit, download the latest Linux x86-64 version here, then make the file executable and run it: cd /u01/app/oracle/software chmod +x jrockit-jdk1.6.0_37-R28.2.5-4.1.0-linux-x64.bin ./jrockit-jdk1.6.0_37-R28.2.5-4.1.0-linux-x64.bin Once the GUI starts, respond as follows:
Welcome

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

Product Installation Directory

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

Start the WebLogic install


You can download the wls1036_generic.jar file here. Start up the installer: cd /u01/app/oracle/software

$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

Choose Middleware Home Directory

Register for Security Updates

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

Choose Install Type

Choose Products and Components

JDK Selection

Choose Product Installation Directories

Installation Summary Installation Complete

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

Apply the latest WebLogic PSU (10.3.6.0.3) optional


Patch ID: HYKC Patch No: 14736139 Download the patch from MOS (no OPatch utility required). Create the cache_dir and unzip the patch: mkdir $MW_HOME/utils/bsu/cache_dir cd $MW_HOME/utils/bsu/cache_dir cp /u01/app/oracle/software/p14736139_1036_Generic.zip $MW_HOME/utils/bsu/cache_di r unzip p14736139_1036_Generic.zip Install the patch using the Smart Update command utility: cd $MW_HOME/utils/bsu ./bsu.sh -install -patch_download_dir=$MW_HOME/utils/bsu/cache_dir -patchlist=HYKC -prod_dir=$WLS_HOME Restart any WebLogic servers that are running to pick up the PSU changes. Check the PSU version: . $WLS_HOME/server/bin/setWLSEnv.sh java weblogic.version|grep PSU WebLogic Server 10.3.6.0.3 PSU Patch for BUG14736139 Fri Mar 22 10:16:54 IST 2012 Thats it, WebLogic is installed and patched up-to-date, ready for creation of your domain(s). Related posts: Creating a Domain in WebLogic (11g/12c) Creating a Clustered Domain in WebLogic 11g

Creating a domain in WebLogic 11g or 12c


Posted on March 27, 2013 by Garth Im 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

o o o

Create a new WebLogic domain Next Generate a domain configured automatically to support the following products

Select Domain Source

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

Specify Domain Name and Location

Configure Administrator User Name and Password

Configure Server Start Mode and JDK

Select Optional Configuration

Configure the Administration Server

o o o

SSL listen port: 7501 Next Add

Configure Managed Servers

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

Configure Clusters Configure Machines

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

Assign Servers to Machines

Configuration Summary

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/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

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/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

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 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>

Creating a Clustered Domain in WebLogic 11g


Posted on March 27, 2013 by Garth In this post Im creating a simple WebLogic 10.3.6 cluster domain with two Managed Servers, across two Linux machines, named linux01.vbox and linux02.vbox. Obviously you need to have already installed WebLogic 11g at this point. There are a few different ways you can create a cluster domain in WebLogic, but I usually start with the GUI wizard and then use the pack/unpack utilities to copy over the configuration Open the WebLogic domain configuration wizard: . ./set_wls11.env

echo $WLS_HOME=/u01/app/oracle/middleware/wls_10.3.6 $WLS_HOME/common/bin/config.sh Once the GUI starts, respond as follows:


Welcome

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

Select Domain Source

Specify Domain Name and Location

Configure Administrator User Name and Password

Configure Server Start Mode and JDK

Select Optional Configuration

Configure the Administration Server

o o o o o

Listen port: 7004 SSL enabled: tick SSL listen port: 7504 Next Add

Configure Managed Servers

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

Name: Cluster_1 Cluster messaging mode: unicast Cluster address: linux01.vbox

Next Assign Server ManagedServer_1 to Cluster Cluster_1 Assign Server ManagedServer_2 to Cluster Cluster_1 Next Select Unix Machine tab Add

Assign Servers to Clusters

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

Assign Servers to Machines

Configuration Summary

o o

Create Once created, click Done

Creating Domain

Create a boot.properties file for the new Admin Server


Rather than having to enter the credentials in each time, create a boot.properties file (an encrypted password file) for your Admin Server : export DOMAIN_HOME=/u01/app/oracle/middleware/user_projects/domains/ClusterDomain mkdir -p $DOMAIN_HOME/servers/AdminServer/security vi $DOMAIN_HOME/servers/AdminServer/security/boot.properties The contents of the file should be like below: username=weblogic password=password1 The password will be encrypted once the WebLogic server is restarted. Start the Node Manager (unless its already running of course): nohup $WLS_HOME/server/bin/startNodeManager.sh > /dev/null 2>&1 & Start the Admin Server for your domain and tail the log file:
nohup $DOMAIN_HOME/startWebLogic.sh > /dev/null 2>&1 &

sleep 10 tail -f $DOMAIN_HOME/servers/AdminServer/logs/AdminServer.log


wait for a few minutes and look out for the following to ensure the Admin Server starts up correctly

(CTRL+C to exit from the tail command above): <BEA-000360> <Server started in RUNNING mode>

Pack and unpack your Domain configuration


WebLogic provides two command-line utilities, pack and unpack. These two utilities provide a quick way to package up your existing domain configuration for distribution across other machines within your cluster. On your primary machine (linux01), pack up the domain configuration (ensuring DOMAIN_HOME is still set): cd $WL_HOME/common/bin ./pack.sh -managed=true -domain=$DOMAIN_HOME -template=${DOMAIN_HOME}-template.jar -template_name=ClusterDomain

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

Enroll your second machine


Now we need to enroll the second machine into the WebLogic Domain. Using the WebLogic Scripting Tool (WLST), from the second machine (linux02), we connect to the Admin Server on the first machine (linux01), and register this second machine as follows: $WLS_HOME/common/bin/wlst.sh connect('weblogic','password1','t3://linux01.vbox:7004') nmEnroll ('/u01/app/oracle/middleware/user_projects/domains/ClusterDomain','/u01/a pp/oracle/middleware/wls_10.3.6/common/nodemanager') disconnect() exit()

Add boot.properties files for Managed Servers


On the primary machine (linux01), copy the boot.properties file from earlier into your Managed Server security directory: mkdir -p $DOMAIN_HOME/servers/ManagedServer_1/security cp $DOMAIN_HOME/servers/AdminServer/security/boot.properties $DOMAIN_HOME/servers/ ManagedServer_1/security Then on your second machine (linux02) create a boot.properties file as before: mkdir -p $DOMAIN_HOME/servers/ManagedServer_2/security vi $DOMAIN_HOME/servers/ManagedServer_2/security/boot.properties The contents of the file should be like below: username=weblogic password=password1

Check the Domain has been registered correctly

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 &

Start the Managed Servers


You should be able to now log into the WebLogic console and start the Managed Servers http://linux01.vbox:7004/console or you can start them from the command line on each of the machines: nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh ManagedServer_1 > /dev/null 2>&1 & nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh ManagedServer_2 > /dev/null 2>&1 &

Stop/Start scripts for your new Domain


Once youre happy with everything, youll probably want to create some stop and start scripts to make life easier when managing your domainhere are a couple I made earlier mkdir ~/scripts Shutdown your domain: vi ~/scripts/stop_ClusterDomain.sh

# 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 WebLogic Admin Server... $DOMAIN_HOME/bin/stopWebLogic.sh

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 {} \;

echo Done! Startup your domain: vi ~/scripts/start_ClusterDomain.sh

# 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

Removing a Domain in WebLogic


Posted on May 16, 2013 by Garth First of all, shutdown your domain (in this example, my domain is called oldDomain and has one Managed Server): export MW_HOME=/u01/app/oracle/middleware export WLS_HOME=$MW_HOME/wls_10.3.6 export DOMAIN_NAME=oldDomain export DOMAIN_HOME=$MW_HOME/user_projects/domains/$DOMAIN_NAME

$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!

Anda mungkin juga menyukai