Thursday Jul 28, 2011

Installing WebLogic in a Zone

Sadly, the download page for WebLogic 10.3.5 doesn't yet include an installer for Solaris on x86. So, here for you, I outline the steps I took to successfully install WebLogic on Solaris - in a zone, of course.

Step 1: Create the Zone

The Web Logic installer requires 1.2 GB of swap space. Follow these steps to ensure you have enough.

Create a VNIC for the zone:
bleonard@solaris:~$ sudo dladm create-vnic -l e1000g0 wls_zone0

Create the zone:

bleonard@solaris:~$ sudo zonecfg -z wls_zone
wls_zone: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:wls_zone> create
zonecfg:wls_zone> set zonepath=/zones/wls_zone
zonecfg:wls_zone> set ip-type=exclusive
zonecfg:wls_zone> add net
zonecfg:wls_zone:net> set physical=wls_zone0
zonecfg:wls_zone:net> end
zonecfg:wls_zone> verify
zonecfg:wls_zone> exit 

Install the zone:

bleonard@solaris:~$ sudo zoneadm -z wls_zone install
...

Here's the sysidcfg file I used for the zone:

bleonard@solaris:~$ sudo cat /zones/wls_zone/root/etc/sysidcfg
system_locale=C
terminal=xterms
network_interface=PRIMARY {
	hostname=wls_zone
	ip_address=10.0.1.70
        default_route=10.0.1.1
	netmask=255.255.255.0
 	protocol_ipv6=no}
security_policy=none
name_service=NONE
nfs4_domain=dynamic
timezone=US/Eastern
root_password=fto/dU8MKwQRI

Boot and configure the zone:

bleonard@solaris:~$ sudo zoneadm -z wls_zone boot
bleonard@solaris:~$ sudo zlogin -C wls_zone
[Connected to zone 'wls_zone' console]
100/100
Hostname: wls_zone
Loading smf(5) service descriptions: 3/3
Creating new rsa public/private host key pair
Creating new dsa public/private host key pair
Configuring network interface addresses:.

wls_zone console login: root
Password: abc123 

Configure DNS name resolution:

bleonard@solaris:~$ sudo cp /etc/nsswitch.conf /zones/wls_zone/root/etc/.
bleonard@solaris:~$ sudo cp /etc/resolv.conf /zones/wls_zone/root/etc/.

Step 2: Install the Supporting Software

The JDK:

root@wls_zone:~# pkg install jdk
               Packages to install:     3
           Create boot environment:    No
               Services to restart:     1
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  3/3   1252/1252    71.7/71.7

PHASE                                        ACTIONS
Install Phase                              1633/1633 

PHASE                                          ITEMS
Package State Update Phase                       3/3 
Image State Update Phase                         2/2 

Include 64-bit support:

root@wls_zone:~# pkg install jdk64
               Packages to install:     1
           Create boot environment:    No
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  1/1       32/32      0.7/0.7

PHASE                                        ACTIONS
Install Phase                                  59/59

PHASE                                          ITEMS
Package State Update Phase                       1/1 
Image State Update Phase                         2/2 

The X authority file utility. This will allow us to forward the display to the zone so we can run the graphical installer:

root@wls_zone:~# pkg install xauth
               Packages to install:     1
           Create boot environment:    No
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  1/1         6/6      0.0/0.0

PHASE                                        ACTIONS
Install Phase                                  37/37 

PHASE                                          ITEMS
Package State Update Phase                       1/1 
Image State Update Phase                         2/2 

Install the X Test and Record extensions client library. This library is also required to start the graphical installer:

root@wls_zone:~# pkg install libxtst
               Packages to install:     2
           Create boot environment:    No
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  2/2       96/96      0.2/0.2

PHASE                                        ACTIONS
Install Phase                                176/176 

PHASE                                          ITEMS
Package State Update Phase                       2/2 
Image State Update Phase                         2/2 

Step 3:  Create a User Account

For this exercise I'm going to create a user 'weblogic'.

root@wls_zone:~# useradd -m -d /weblogic -s /usr/bin/bash weblogic
root@wls_zone:~# passwd weblogic 
New Password: weblogic
Re-enter new Password: weblogic 
passwd: password successfully changed for weblogic

Step 4: Download WebLogic and Copy to the Zone

Downloading the Oracle WebLogic Server 11gR1 (10.3.5) + Coherence Package Installer File 1 for Additional Platforms. You may also want to download the Supplemental ZIP distribution File 1 that contains sample applications.

Copy those files into the zone:

bleonard@solaris:~$ sudo cp Download/wls1035_generic.jar /zones/wls_zone/root/weblogic/.
bleonard@solaris:~$ sudo cp Download/wls1035_dev_supplemental.zip /zones/wls_zone/root/weblogic/.

Step 5: Start the Installer

SSH into the zone. Be sure to forward the X11 display:

bleonard@solaris:~$ ssh -X weblogic@10.0.1.70
The authenticity of host '10.0.1.70 (10.0.1.70)' can't be established.
RSA key fingerprint is c4:73:8b:ea:db:c5:1e:fd:76:35:61:26:92:8e:4e:4b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.1.70' (RSA) to the list of known hosts.
Password: 
Last login: Thu Jul 28 07:55:41 2011 from 10.0.1.3
Oracle Corporation      SunOS 5.11      snv_151a        June 2011

Here's the official documentation to Starting the Installation Program on UNIX Using .jar Installers. Note, I'm also adding the option -Dspace.detection=false, because I can't figure out how to get past this error:

I certainly have more then 1MB of space in my home directory. So basically:

weblogic@wls_zone:~$ java -d64 -Dspace.detection=false -jar wls1035_generic.jar 
Extracting 0%....................................................................................................100%

Working through the installer, I select most of the defaults except where noted:

Enter your My Oracle Support credentials if you have them. You're allowed to continue if you them them blank, as I did:

Select the Custom Install Type. I like to include the Server Examples, but this is optional.

Select Server Examples:


I recommend running Quickstart to create an initial domain. To run Quickstart later, you'll find it at Oracle/Middleware/wlserver_10.3/common/quickstart/quickstart.sh.


Step 6:  Start the Server

weblogic@wls_zone:~$ ./Oracle/Middleware/user_projects/domains/base_domain/startWebLogic.sh &

..

<Jul 28, 2011 8:54:10 AM PDT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

Step 7:  Browse to the Console

http://10.0.1.70:7001/console:


About

The Observatory is a blog for users of Oracle Solaris. Tune in here for tips, tricks and more as we explore the Solaris operating system from Oracle.

Connect with Oracle Solaris:


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today