Sunday, December 2, 2007

How I installed Oracle9i on CentOS4 under VMware (part 2).

Today I will continue the article "How I installed Oracle 9i on CentOS4 under VMware".

The next step is the creating OS oracle account.

# groupadd dba
# groupadd oinstall
# useradd -g oinstall -G dba oracle
# passwd oracle

Then I connected to the cent4 from the host computer using WinSCP client by oracle account and downloaded .cpio archives into the /home/oracle/distribute directory on it.
The .cpio archives had been downloaded on the host computer from the Oracle web site.

Then the following commands were launched under the /home/oracle/distribute directory:

$ gunzip *.gz
$ cpio -idmv < ship_9204_linux_disk1.cpio
$ cpio -idmv < ship_9204_linux_disk2.cpio
$ cpio -idmv < ship_9204_linux_disk3.cpio

The output of these commands are 1288238, 1263504, 585396 blocks accordingly.

Then .cpio files could be deleted:

$ rm ship_9204_linux_disk?.cpio

Accordingly to the Oracle documentation the following packages are required.
Using the "rpm -aq" command we are able to figure out that the packages marked by "Ok" already had been installed on our system:

Ok compat-db-4.1.25-9

Ok compat-gcc-32-3.2.3-47.3
Ok compat-gcc-32-c++-3.2.3-47.3
  compat-oracle-rhel4-1.0-3
  compat-libcwait-2.0-1
Ok compat-libgcc-296-2.96-132.7.2
Ok compat-libstdc++-296-2.96-132.7.2
Ok compat-libstdc++-33-3.2.3-47.3
Ok gnome-libs-1.4.1.2.90-44
  gnome-libs-devel-1.4.1.2.90-44
  libaio-devel-0.3.102-1
  libaio-0.3.102-1
Ok make-3.80-5
  openmotif21-2.1.30-11
Ok xorg-x11-deprecated-libs-devel-6.8.1-23.EL
Ok xorg-x11-deprecated-libs-6.8.1-23.EL

So, we need to install only unmarked packages.
To do it we have to navigate into the /media/cdrom/CentOS/RPMS directory
and use the "rpm -ihv " command:

# rpm -ihv libaio-0.3.105-2.i386.rpm
# rpm -ihv libaio-devel-0.3.105-2.i386.rpm


For the gnome-libs-devel-1.4.1.2.90-44.1.i386.rpm we have to install

glib-devel,
ORBit-devel,
gtk+-devel,
imlib-devel packages.

# rpm -ihv glib-devel-1.2.10-15.i386.rpm
# rpm -ihv ORBit-devel-0.5.17-14.i386.rpm
# rpm -ihv gtk+-devel-1.2.10-33.i386.rpm
# rpm -ihv imlib-devel-1.9.13-23.i386.rpm

# rpm -ihv gnome-libs-devel-1.4.1.2.90-44.1.i386.rpm
# rpm -ihv openmotif21-2.1.30-11.RHEL4.6.i386.rpm


The compat-oracle-rhel4-1.0-3 and compat-libcwait-2.0-1
can be downloaded from the Oracle web site (Patch 4198954)

So I downloaded the patch into the /root/ora_patch and installed it.
# unzip p4198954_40_LINUX.zip
# rpm -ihv compat-oracle-rhel4-1.0-5.i386.rpm
# rpm -ihv compat-libcwait-2.1-1.i386.rpm

Preparing... ###################################### [100%]
cat: /etc/ld.so.preload: No such file or directory

1:compat-libcwait ###################################### [100%]


The warning about /etc/ld.so.preload doesn't impact on installation.

Then we have to check some OS kernel parameters.
Using the "/sbin/sysctl -a | grep ... " command
I figured out that some parameters have proper values and marked them as Ok.

Ok kernel.hostname = cent4.ssldom ain.com
  kernel.domainname = ssldomain fs.file-max = 32 7 679
  kernel.sem = 250 32000 100 128
  kernel.shmall = 2097152
  kernel.shmmax = 4294967295
Ok kernel.shmmni = 4096
  net.ipv4.ip_local_port_range = 1024 65000
  kernel.sysrq = 1

For kernel.sem we have semmsl, semmns, semopm, semmni values accordingly.
To modify other parameters we have to insert/modify their values
in the /etc/sysctl.conf file as root.

The kernel.sysrq parameter was modified, because it already existed in the file.
And the following parameters were inserted:

### Parameters for Oracle ###
kernel.domainname = ssldomain
fs.file-max = 327679
kernel.sem = 250 32000 100 128
kernel.shmall = 2097152

kernel.shmmax = 4294967295

net.ipv4.ip_local_port_range = 1024 65000


If you install oracle 10.2 you have to add the following parameters:

net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144

And for activating new parameters the "/sbin/sysctl -p" command is used.

# /sbin/sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 1

kernel.core_uses_pid = 1
kernel.domainname = ssldomain

fs.file-max = 327679
kernel.sem = 250 32000 100 128
kernel.shmall = 2097152
kernel.shmmax = 4294967295
net.ipv4.ip_local_port_range = 1024 65000


For oracle software I created the following directories:

[root@cent4 ~]# mkdir -p /oracle/product/9.2.0
[root@cent4 ~]# chown -R oracle.oinstall /oracle


Then as oracle I added the following parameters into the .bash_profile file.


export LD_ASSUME_KERNEL=2.4.19
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
export ORACLE_TERM=xterm
export ORACLE_SID=test1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export PATH=$PATH:$ORACLE_HOME/bin

Then we need to reconnect to oracle session to activate these new parameters.

Now we are ready to execute runInstaller program
from the /home/oracle/distribute/Disk1 directory.

I executed the
runInstaller from the X-Windows system.
To do it I started Cygwin session on my host computer,
launched startx command from it,
and then executed "xhost +" from the xterm window which appeared when startx was started.
Then added a line about my host computer into the /etc/hosts file of cent4 as root.
For example:


192.168.1.67 host-comp.ssldomain.com host-comp

Then as oracle ran the following command:

[oracle@cent4 Disk1]$ export DISPLAY=host-comp:0.0

Launched the ./runInstaller command.


[oracle@cent4 Disk1]$ ./runInstaller


Clicked "Next" in the first window,
then clicked "Ok" in the "Inventory Location" window.


The oinstall in the oracle group name.


Executed the orainstRoot.sh script from the /tmp directory.


[root@cent4 tmp]# ./orainstRoot.sh
Creating Oracle Inventory pointer file (/etc/oraInst.loc)
Changing groupname of /oracle/oraInventory to oinstall.

In the "File Locations" window I pressed "Next"
Then selected "Oracle9i Database 9.2.0.4.0" in the "Available Products" window,
the "Enterprise Edition" and "Next" in the "Installation Types" window,
the "Software Only" and "Next" in the "Database Configuration" window,
and "Install" in the "Summary" window.

After a few minutes the window about the running /oracle/product/9.2.0/root.sh
appeared.


And I executed it:

[root@cent4 9.2.0]# ./root.sh
Running Oracle9 root.sh script...
\nThe following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/product/9.2.0

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...

\nCreating /etc/oratab file...
Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.

Then the "End of Installation" window with the following information appeared:

The following information is available in:
/oracle/product/9.2.0/Apache/Apache/setupinfo.txt
-----------------------------------------
The HTTP Server can be accessed using the following URLs:

Non SSL Mode:
http://cent4:7777

SSL mode (executed at install time):
http://cent4:7778
https://cent4:4443

Then the button "Exit" was pressed...


In the next posting we will create an oracle database.


Have fun!
Sergey.

Sunday, November 25, 2007

How I installed Oracle9i on CentOS4 under VMware (part 1).

Hi, Everyone!

In this posting I will emphasize only, in my opinion, more important things of the installation.

1. First of all I installed SetnOS 4 under VMware.

To do it I just started VMware and pressed Ctrl+N.
Then in the installation master the following items were chosen:

(Next>),
Virtual machine configuration: Typical (Next>),
Guest operation system: Linux,
Version: Red Hat Enterprise Linux 4 (Next>),
Virtual machine name: cent4,
Location: D:\vm\cent4\ (In my case) (Next>),
Network connection: Use bridged networking (Next>),
Disk size (GB): 12 (Just in case, and this is a happy number by the way...),
Allocate all disk space now: Yes. (OS should work faster with preallocated disk space.) (Finish).

For oracle 10.2 we have to set up minimum 922Mb memory.

Then I removed Floppy and Sound adapter from the the "Virtual Machine Settings" window by choosing these devices and pushing Remove button. We definitely don't need them for Oracle.


Then I set up the path of CentOS4 iso image file into the "Use ISO image" field in the "Virtual Machine Settings" window.


Powered on this virtual machine and started installation the operation system on it.


2. Installing CentOS4.

I chose "Custom" in the "Installation Type" window.
Then "Automatically partition"in the "Disk Partitioning Setup" window.
Then "Next" till the "Network Configuration" where the following settings were chosen:
Configure using DHCP: No,
IP Address: 192.168.1.79,
Netmask: 255.255.255.0.


cent4.ssldomain.com for the host name,
192.168.1.254 for Gateway and Primary DNS IPs in the "Miscellaneous Settings" area.


In the "Firewall Configuration" window "No firewall" and "Enable SELinux?: Disabled" were set up.
In the "Package Group Selection" window the following packages were chosen:
"X Window System",
"GNOME Desktop Environment",
"Graphical Internet",
"Office/Productivity",
"Development Tools",
"X Software Development",
"GNOME Software Development",
"Legacy Software Development",
"Administration Tools",
"System Tools".

And in a few minutes installation had been done...

Then after rebooting I connected as root and chose
"VM"-->"Install VMware tools"-->"Install" from the VMware main menu.

Double clicked on CD-ROM Drive and then double clicked on VMwareTools rpm file.


As result the VMwareTools package had been installed.
Then using a terminal window as root I executed the vmware-config-tools.pl script, where I chose the 1024x768 resolution.

After that mouse changes took effect but resolution was still as before.
But after restarting the server the resolution took effect too...

I hope this posting is useful.
And in the next one I am going to continue describing installation Oracle 9i on CentOS4.
And then we will upgrade Oracle 9i to 10g and then to 11g.


Stay tuned and thanks!

Sergey.