Wednesday, March 28, 2007

Installing Oracle 9i on Red Hat Enterprise Linux 4 64-bit

These are my notes on installing Oracle 9i on RHEL4 64-bit

After install, get a list of installed RPMS:
rpm -qa | sort > rpmList.txt
rpm -qa --queryformat %-{name}-%{version}-%{release}-%{arch}"\n" | sort > rpmListWithArch.txt

After copying the Oracle install files to /u02 extract them using the following:
zcat amd64_db_9204_Disk1.cpio.gz | cpio -idmv
zcat amd64_db_9204_Disk2.cpio.gz | cpio -idmv
zcat amd64_db_9204_Disk3.cpio.gz | cpio -idmv

Verify that the hosts file looks correct:
nano /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
216.125.228.45 db.svcc.edu db

Adjust the kernel parameters:
nano /etc/sysctl.conf
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 256 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Put the changes into effect:
sysctl -p

Add this to the end of the limits.conf file:
nano /etc/security/limits.conf
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384

Add the Oracle Groups and User:
groupadd dba
groupadd oinstall
useradd -c "Oracle software owner" -g oinstall -G dba oracle
passwd oracle

Create the directories needed for Oracle, and give Oracle ownership:
mkdir -p /u01/app/oracle/product/9.2.0
chown -R oracle.oinstall /u01

Add the exclusions needed for VNC and Oracle Access:
nano /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 7777 -j ACCEPT

Put the changes into effect:
service iptables restart

Setup two users accounts to be accessed through VNC:
nano /etc/sysconfig/vncservers
VNCSERVERS="1:root 2:oracle"

Setup passwords for both users:
vncpasswd
su - oracle
vncpasswd
exit

Set VNC to run on startup, and start the service
chkconfig vncserver on
service vncserver start

Setup the Oracle user with the environment settings it needs:
nano /home/oracle/.bash_profile
# Set the LD_ASSUME_KERNEL environment variable only for Red Hat 9,
# RHEL AS 3, and RHEL AS 4 !!
# Use the "Linuxthreads with floating stacks" implementation instead of NPTL:
#export LD_ASSUME_KERNEL=2.4.1 # for RH 9 and RHEL AS 3
export LD_ASSUME_KERNEL=2.4.19 # for RHEL AS 4

# Oracle Environment
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
export ORACLE_SID=TESTSID
export ORACLE_TERM=xterm
# export TNS_ADMIN= Set if sqlnet.ora, tnsnames.ora, etc. are not in $ORACLE_HOME/network/admin
export NLS_LANG=AMERICAN;
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH

# Set shell search paths
export PATH=$PATH:$ORACLE_HOME/bin

Oracle 9i requires older compilers, make backups first, then replace it with the older versions:
mv /usr/bin/gcc /usr/bin/gcc344
mv /usr/bin/g++ /usr/bin/g++344
ln -s /usr/bin/gcc32 /usr/bin/gcc
ln -s /usr/bin/g++32 /usr/bin/g++

Start the install through VNC:
cd /u02/Disk1
./runInstaller

Sunday, February 18, 2007

More G5 Upgrades

Well I had a successful upgrade for the second time for my PowerMac G5. The first was just a simple optical drive upgrade.

I had been looking at getting a replacement primary drive for awhile. The original drive was a 250GB Maxtor that was starting to slow down, and have errors copying files around. Wiping the drive clean did no good, and Spinrite reported that the drive was slowly failing.

I had always held back due to stories on the net about some model Western Digital drives not being compatible with my Dual G5 2.7 GHz. I ended up ordering a WD3200KS from NewEgg, 320GB, 16 MB Cache, 7200 RPM all the good stuff.

Installation was easy, and the G5 saw the drive without a problem. The drive was very quiet, and was quite speedy compared to the failing Maxtor.

Hardware specs of the system:
Machine Name: Power Mac G5
Machine Model: PowerMac7,3
CPU Type: PowerPC G5 (3.1)
Number Of CPUs: 2
CPU Speed: 2.7 GHz
L2 Cache (per CPU): 512 KB
Memory: 1 GB
Bus Speed: 1.35 GHz
Boot ROM Version: 5.2.4f1

Hardware specs of the drive that was installed:
WDC WD3200KS-00PFB0:
Capacity: 298.09 GB
Model: WDC WD3200KS-00PFB0
Revision: 21.00M21
Removable Media: No
Detachable Drive: No
BSD Name: disk0
Protocol: ata
Unit Number: 0
Socket Type: Serial-ATA
Bay Name: "A (upper)"
OS9 Drivers: No
S.M.A.R.T. status: Verified