Saturday, September 22, 2007

Installing Sun Java Development Kits

Since the Oracle software makes use of Sun's JDK, and because I thought it would be prudent to have a few versions of it, I decided to download and install the following versions of the Java 2 Standard Edition (J2SE):
  • J2SDK/J2RE - 1.4
  • JDK/JRE - 5.0
  • JDK 6 Update 2
To download the latest version (currently version 6 update 2), go to the following link:

http://java.sun.com/javase/downloads/index.jsp

Then, click on the "Download" button next to "JDK 6 Update 2". On the next page, click on the radio button next to "Accept License Agreement" and then look for the appropriate platform (eg., "Linux Platform - Java(TM) SE Development Kit 6 Update 2"). I downloaded the jdk-6u2-linux-i586-rpm.bin file.

To download the other versions, go to the following link:

http://java.sun.com/products/archive/

Then, scroll down the page until you first find the "JDK/JRE - 5.0". Notice the drop-down listbox next to this. At the time of this writing, the highest version of 5.0 in the listbox was "5.0 Update 11". Then, click on the "Go" button, and then on the next page click on the "Download JDK" link. This gave me a file named jdk-1_5_0_11-linux-i586-rpm.bin.

Next, going back to the archive page, search for the string, "J2SDK/J2RE - 1.4". Next to this, there is again a drop-down listbox where the most recent version is labeled as "1.4.2_14". Again, click on the "Go" button next to this, and when the next page loads, click on the " Download J2SDK" link. This gave me a file called j2sdk-1_4_2_15-linux-i586-rpm.bin.

So, now having these files, I transferred the files to my servers and ran the following commands to install them. The commands are run as root, and it is important to install them in this order:

$ su - root
# chmod +x j2sdk-1_4_2_15-linux-i586-rpm.bin
# ./j2sdk-1_4_2_15-linux-i586-rpm.bin
# rpm -Uvh j2sdk-1_4_2_15-linux-i586-rpm
# chmod +x jdk-1_5_0_11-linux-i586-rpm.bin
# ./jdk-1_5_0_11-linux-i586-rpm.bin
# chmod +x jdk-6u2-linux-i586-rpm.bin
# ./jdk-6u2-linux-i586-rpm.bin

Simply scroll through the license agreements when they are shown, and reply with "yes" when asked if you agree. There is no need to run the RPM command for the 1.5 and 1.6 versions, as they are automatically run for you.

# ls -l /usr/java

default
j2sdk1.4.2_15
jdk1.5.0_11
jdk1.6.0_02
latest

The default file is actually a symbolic link that points to the latest file, which is also a symbolic link that points to the jdk1.6.0_02 directory.

That's it! Easy as pie!

Sunday, September 16, 2007

Installing Oracle Enterprise Linux

Installation

The first step in installing Oracle Enterprise Linux was to download the .zip files from the Oracle E-Delivery web site, unzipping the files and burning the .ISO files onto disks.

Downloading the files was pretty simple. You just follow the prompts on the Oracle E-Delivery website and it presents you with the various versions available. I chose the "Enterprise Linux 4 Update 5 Media Pack for x86 (32 bit)" version and downloaded the following files (onto my Windows XP desktop cmoputer):
  • Enterprise Linux 4 Update 5 for x86 (Part 1 of 4)
  • Enterprise Linux 4 Update 5 for x86 (Part 2 of 4)
  • Enterprise Linux 4 Update 5 for x86 (Part 3 of 4)
  • Enterprise Linux 4 Update 5 for x86 (Part 4 of 4)
I didn't see an immediate need to download the four source zip files, so I only downloaded these four. Once downloaded, I unzipped the .ISO files from the .ZIP files, and used WinISO 5.3 (downloaded from tucows.com) to burn the .ISO files onto disks.

After they were burnt onto disk, I began the process of installing the OS onto my five machines that I had (one for grid control, two for a database cluster, and two for an application server cluster).

I won't go into the monotonous details of the installation process; it's pretty simple. The only things that were maybe different from a run-of-the-mill installation was what I had specified when prompted for the Network Configuration. I disabled DHCP because I had already determined the network IP address and subnet for each of the machines:

Also, because the database and application server computers have a 10/100Mb network interface card (NIC), as well as a Gigabit NIC, I had to specify both card's IP addresses. Finally, I specified my router's IP address as the gateway and primary dns.

One deficiency that I noticed in the installation process was that while the network configuration showed me the two NIC, it did not perform any type of discovery to determine the hardware name of the card, or the bandwidth available. But, I figured it wouldn't be too hard to change these later, if I had mixed up the public (10/100) and private (gigabit) network addresses, so I just guessed.

Also, I disabled the SELinux and Firewall. At some time in the future, I think I would like to enable SELinux and the Firewall, and see what it breaks, and come up with an iptables definition that is more secure than leaving these disabled. If anyone reading this has done this already, I'd appreciate any info to avoid reinventing the wheel.

The following screen shot shows all of the entries in my hosts files on all machines (I'm not using anything like DNS):


One point that I will mention is that I removed the hostname from the "localhost" line in the /etc/hosts file. For example, instead of this:

127.0.0.1 db1 localhost.localdomain localhost

I had the following:

127.0.0.1 localhost.localdomain localhost

I'm not sure it will make a difference for the application servers or grid control server, but it will mess up the clusterware on the RAC servers.

The /etc/resolv.conf file looks like this:

$ cat /etc/resolv.conf
search us.oracle.com

nameserver 192.168.1.1

And the hostname resolution is setup to use /etc/hosts and then the primary dns:

$ grep ^hosts /etc/nsswitch.conf
hosts: files dns


Post Installation

After installing the OS, the next step was to register the machine on the Oracle "Unbreakable Linux Network". This allowed me to run the up2date program to download updates to certain RPMs. I ran the following commands after installing the Oracle Enterprise Linux version of the up2date RPMs.

Note that all of the commands are being run as the root user, unless otherwise specified.

$ up2date --nox --register

I then modified the /etc/sysconfig/rhn/sources file and uncommented out the following 3 lines:

yum el4_$ARCH_latest http://uln-internal.oracle.com/yum/EnterpriseLinux/EL4/latest/$ARCH/
yum el4_$ARCH_addons http://uln-internal.oracle.com/yum/EnterpriseLinux/EL4/addons/$ARCH/
yum el4_$ARCH_oracle http://uln-internal.oracle.com/yum/EnterpriseLinux/EL4/oracle/$ARCH/

Now, when I run up2date, it will be looking for RPMs in the following channels:

$ up2date --show-channels
el4_i386_latest
el4_i386_addons
el4_i386_oracle

I then ran the following command to update the up2date program:

$ up2date-nox -u

This update took quite a while! And then the following commands to install the oracle-validated package:

$ up2date --install oracle-validated

The oracle-validated package is very nice. It makes all of the kernel parameter changes that Oracle recommends (modifying the /etc/sysctl.conf file for you), as well as the OS limits (number of files, number of processes, etc.) and adds the hangcheck_timer options to the /etc/modprobe.conf file. And the Oracle ASM and OCFS RPMs are already installed, as well. For these reasons, I think it is a great distro!

There were a few other things that I did, post-installation, to configure my servers.

The first thing was to disable unnecessary services. I ran this script on every linux server:

#!/bin/sh
for SERVICE in acpid anacron apmd arpwatch atd autofs bluetooth canna cpuspeed cups cups-config-daemon gpm hpoj irda isdn kuzdu named pcmcia rhnsd sendmail
do
service ${SERVICE} stop
chkconfig --del ${SERVICE}
done


Pardon the formatting here. Note that all of the services should be on the same line.

Also, I decided to disable X on all of the servers. So, I edited the /etc/inittab file and change d the following line:

id:5:initdefault:

to read:

id:3:initdefault:

This would make the machine, upon reboot, boot up into multi-user mode without the X services. Since I had planned to

The only exception was the Grid Control server, where I wanted to use the sendmail service, so I re-enabled this:

$ chkconfig --level 2345 sendmail on
$ chkconfig --list sendmail

Next, I wanted to keep groups and users similar on all nodes (even if they weren't being used). So, I greated the following groups:

$ /usr/sbin/groupadd -g 500 dba
$ /usr/sbin/groupadd -g 501 oinstall
$ /usr/sbin/groupadd -g 502 oper
$ /usr/sbin/groupadd -g 503 crs
$ /usr/sbin/groupadd -g 504 asm
$ /usr/sbin/groupadd -g 505 asmdba

And the following users:

$ /usr/sbin/useradd -u 500 -g 501 -d /home/oracle -s /bin/bash -G 500,501,502 oracle
$ /usr/sbin/useradd -u 501 -g 501 -d /home/crs -s /bin/bash -G 503 crs
$ /usr/sbin/useradd -u 502 -g 501 -d /home/asm -s /bin/bash -G 504 asm

And then set the password for the users:

$ passwd oracle
$ passwd crs
$ passwd asm

I also created the directory for what would be the ORACLE_BASE for all software:

$ mkdir /u01/app/oracle
$ chown -R oracle:oinstall /u01

In my next few articles, before I delve into my experiences installing Grid Control, OpenFiler, RAC and the Application Server, I will go through the steps of installing the Sun Java Development kits on the server, using PuTTY and XMing software to connect to these servers, configuring the Network Time Protocol and Sendmail.

Saturday, September 15, 2007

Planning the Sandbox

I decided that I would try to be as smart as possible (emphasis on the try :) in setting up this sandbox. So, I started off by planning what my requirements would be.

In quick summary, I wanted to have the following software installed in my sandbox:
  • Oracle Database 10g R2
  • Oracle Database 11g
  • Oracle Application Server
  • Oracle Grid Control
I want to be able to create RAC databases as well as single-instance databases, so I needed some sort of shared disk setup. I found a superb note online titled, "Build your own Oracle RAC Cluster on Oracle Enterprise Linux and iSCSI", written by Jeffrey Hunter. This note goes into great detail about how to create a homemade SAN (as well as creating a 10gR2 RAC database).

Also, I wanted to be able to create an application server cluster, so I can practice creating different HA topologies and studying for the Application Server OCP exam. So, now I'm up to 2 database servers, 2 application servers, and a SAN server. I thought it would be good to have a dedicated grid control server as well.

I planned out the network, choose subnets and IP addresses, and proceeded to create a network diagram with the details of the network:



As part of the planning process, I also enumerated all of the software that I would need to download:
  • Sun Java Development Kit 1.4.2
  • Sun Java Development Kit 1.5
  • Sun Java Development Kit 1.6
The latest version of the SUN JDK can be downloaded from the the sun website here. Older versions can be downloaded here.

My plan of action was to:
  1. Create the OpenFiler SAN.
  2. Install the Oracle Enterprise Linux OS on all of the servers.
  3. Configure all of the servers.
  4. Install the Grid Control Software
  5. Install the Oracle 11g CRS, ASM, and database software.
  6. Install the Oracle 10gR2 Database software.*
  7. Install the Oracle 10gR2 Application Server software.
* The reason I'm installing 11g before 10gR2 is so that I won't have to upgrade the 10gR2 ASM and CRS.

In my next few posts, I'll go over the installation of the Openfiler server and the installation of the Oracle Enterprise Linux operating system, and configuration of these servers.

Certifications

I have several certifications, including:
  • Oracle PL/SQL Developer Certified Associate
  • Oracle 9i Database Administrator Certified Professional
    • Special Accreditation: Managing Oracle9i on Linux
  • Oracle Database 10g Administrator Certified Professional
  • Oracle Application Server 10g Administrator Certified Associate
  • Foundation Certificate in IT-Service Management
It's not necessary for my job to have these certifications, but they're nice to have, mostly for my own satisfaction, but they also add a level of confidence with my customers. And they are not too expensive if you write the beta exams ($50USD versus $125USD). Also, I find the beta exams force you to know more, since they generally have more questions than the production exams.

Once every few years, I'll go on a splurge of writing certification exams. I've just recently written the beta exams for:
  • 1Z1-047 Oracle Database SQL Expert
  • 1Z1-046 Oracle Database 10g: Managing Oracle on Linux for DBAs
These are part of the Oracle Expert Program. I won't know for a few months whether or not I passed, but I am pretty confidant that I was successful.

I am also currently planning to write the following exams:
  • 1Z1-048 Oracle Database 10g R2: Administering Real Application Clusters (RAC)
  • 1Z1-050 Oracle Database 11g New Features *
  • 1Z1-312 Oracle Application Server 10g: Administration II
* Oracle recently announced this exam as the upgrade path from 10g DBA OCP to 11g DBA OCP. It seems that it will be available in October, 2007.

I think for now, I'll concentrate on the RAC exam, once I finish installing 11g and 10g on my test system. Then, write the upgrade to 11g DBA OCP, and finally (probably early next year, I'll plan to take the AS10g exam, since this will upgrade my OCA certification to OCP for the application server.

I had plans to write the "Oracle Forms Developer Certified Professional" (it would be nice to have the bragging rights to have obtained the "triumvirate" of the OCP certifications :) but I simply haven't found the time to dedicate to learning forms in such detail.

Phew! And I thought I was done with exams after high school! :)

Introduction

My name is Kevin Miles and I work for Oracle Advanced Customer Services, where I provide support for the Oracle Database, Application Server, and Development tools (Forms, Reports, etc.). I've been working with Oracle products for over 10 years now (since Oracle 7.3.4), mostly on Unix platforms.

I found a need to have my own test systems so that I could reproduce customer test cases, go through the process of applying patches, and generally having "real-world" experience with the products instead of just "book smarts". I am also keen on pursuing certifications and I want to have a test system where I can practice thoroughly before writing the exams. I also plan to install the Oracle E-Business Suite R12 and the Oracle Secure Enterprise Search products in this system at a later date.

I created this blog because I am hoping to be able to document the creation of this test system to have as a reference to myself, share with others, and hopefully receive feedback. This is probably one of hundreds of blogs on Oracle, and to be honest, I am not sure there will be anything unique or ground-breaking, but let's just see...

Please feel free to comment on anything you read herein.