Friday, June 3, 2011

Solaris 10 and the Linux Zone

For anyone out there trying to make an installation of Oracle with this configuration, I wish you the best of luck and I hope you don’t spend hours and hours researching, googling and figuring out the best way to make this work.

As we’re already half the way into 2011, past the first decade of the 21st century, you may be asking yourselves (as I did) why the hell a client wants to keep Oracle 9i if there’s 2 new versions out there.

Anyhow, the fact is that we’re stuck with UIX systems that aren’t meant to host Oracle under version 10g and we’re trying to get a dinosaur into a beauty spa.

Here’s what I did after numerous failed attempts a lot of research and an organization of tutorials, whitepapers and some common sense.

Users and Groups

I like to have access with a “support” account that has root privileges in order to be able to work remotely on the server. So, first step after installation, must be create groups and users.

Here’s how and soon I’ll post a full explanation about the commands for user and group management under Solaris 10

First the group: support

Group creation commands
groupadd -g 100 support
Group creation commands

Next the users: support

User creation commands
useradd -u 1000 -c "Support User" -m -d /export/home/support -e "" -g support -G root,adm -s /usr/bin/bash support
User creation commands

Linux Zone

In order to be able to install Oracle Database 9i inside the Solaris box you have to create a container, that is a box inside the box which will have the compatible linux libraries and files needed for the database to run smoothly.

So the next step is to create the Linux Zone.  For this purpose we will need an ISO or CD/DVD of a compatible linux image (RHEL or CentOS 3.5 to 3.8).  As for this point there’s a little problem: Up to 3.8, CentOS ISOs ARE ON HELL OF A GHOST!!!  It’s very HARD TO FIND.  I hope, truly, deeply that when the time comes and you’re reading this guide, you can still find it out there, or at least be able to tell your client to go jump off the roof or something.  Of course, the client could use the common sense (the least common of all senses) and UPGRADE THE GODDAMNED database system!

Once the flames have been thrown, let’s continue.  :)

Another way around is to give it a shot to another RHEL 3 free version, Whitebox Linux 3

Zone creation commands
mkdir -p /export/zones

mkdir -p /export/zones/linux

chmod 700 /export/zones/linux

zonecfg -z linux

linux: No such zone configured
Use 'create' to begin configuring a new zone.

zonecfg:linux> create -t SUNWlx
zonecfg:linux> add net
zonecfg:linux:net> set physical=e1000g0
zonecfg:linux:net> set address=10.10.10.13
zonecfg:linux:net> end
zonecfg:linux> add fs
zonecfg:linux:fs> set dir=/cdrom
zonecfg:linux:fs> set special=/cdrom
zonecfg:linux:fs> set type=lofs
zonecfg:linux:fs> add options=[ro,nodevices]
zonecfg:linux:fs> end
zonecfg:linux> set zonepath=/export/zones/linux
zonecfg:linux> set autoboot=true
zonecfg:linux> verify
zonecfg:linux> commit
zonecfg:linux> exit

zoneadm -z linux install
Zone creation commands

At this point you should have the linux image CD/DVD/ISO available in the selected media so that the installation of the zone goes as painless as it can go.

Once the DVD ISO was in place, I excecuted the command

FAILED Install attempt
# zoneadm -z linux install

Installing cluster 'desktop'

Would you like the system to eject the final install CD when
  installation of 'linux' is complete? ([y]/n)

The final install CD WILL be ejected.

You will need CDs 1 - 3 (or the equivalent DVD) to
install CentOS 3.8.
Installing miniroot for zone 'linux'.
Attempting to locate 30 packages...

Installing 30 miniroot packages...

Setting up the initial lx brand environment.
System configuration modifications complete.
Duplicating miniroot; this may take a few minutes...
Booting zone miniroot...
Miniroot zone setup complete.

Performing full install for zone 'linux'.
Attempting to locate 669 packages...

Installing zone 'linux' from
  CentOS 3.8, CD 1.


Installing 433 packages; this may take several minutes...

Please insert CentOS 3.8, CD 2, or a
  CentOS 3.8 DVD in the removable media
  drive and press <RETURN>.

Install of zone 'linux' from
  CentOS 3.8, CD 2 FAILED.

Attempt to eject '' failed.
Please eject the disc manually.

Installation of CentOS 3.8 to zone
  'linux' FAILED Fri Jun  3 12:10:16 VET 2011.

Cleaning up after failed install...

Installation of zone 'linux' FAILED.

See the log file:
  '/export/zones/linux/root/var/log/linux.install.3986.log'
for details.
 
FAILED Install attempt

Maybe you didn’t notice it, but the installation process doesn’t have any interactivity, so it would be only a matter of guessing when to switch the Images/CDs/DVDs.  But not al hope is lost.  The installation of the zone can be done with the –d <path_to_ISOs> option which will look in that path not for the files but for the ISO images.  It will mount the images as needed and copy all that needs to be copied.

So, after issuing a new  # zoneadm –z linux uninstall command to have the zone once more in the “configured” state, I issued the new and improved version of my installation command.

SUCCESSFUL Install attempt
# zoneadm -z linux install -d /export/CentOS
Installing distribution 'CentOS 3.8'...
Installing cluster 'desktop'
Installing miniroot for zone 'linux'.
Attempting to locate 30 packages...

Installing 30 miniroot packages...

Setting up the initial lx brand environment.
System configuration modifications complete.
Duplicating miniroot; this may take a few minutes...
Booting zone miniroot...
Miniroot zone setup complete.

Performing full install for zone 'linux'.
Attempting to locate 669 packages...

Installing zone 'linux' from
  ISO "/export/CentOS/CentOS-3.8-i386-bin1of3.iso".


Installing 433 packages; this may take several minutes...

Attempting to locate 236 packages...

Installing zone 'linux' from
  ISO "/export/CentOS/CentOS-3.8-i386-bin2of3.iso".


Installing 134 packages; this may take several minutes...

Attempting to locate 102 packages...

Installing zone 'linux' from
  ISO "/export/CentOS/CentOS-3.8-i386-bin3of3.iso".


Installing 102 packages; this may take several minutes...

Completing installation; this may take a few minutes.
Setting up the initial lx brand environment.
System configuration modifications complete.
Installation of CentOS 3.8 to zone
  'linux' completed Fri Jun  3 14:01:17 VET 2011.

Installation of zone 'linux' completed successfully.

Details saved to log file:
    "/export/zones/linux/root/var/log/linux.install.8971.log"
 
SUCCESSFUL Install attempt

After the installation is ready, the Zone will be at a ready state.  And we can proceed to boot it so it get running.

Soon, the Oracle Installation Process over the Linux (CentOS 3.8) Zone

Last words and Special Thanks

I hope that this guide made your experience installing Oracle 9i over a Solaris box one with a lot less pain that it normally is.

A word of advice for Oracle.  Guys, you really REALLY have to make these processes easier.  Or, at least, publish some good guides to help people throughout the whole thing.  We all understand that goes against your high paying support service, but it will give you a lot more customers and maybe bring some from MySQL and PostgreSQL.

Special thanks must go to First Alternative and their excellent tutorials and informative pages.

No comments:

Post a Comment