How To Install Oracle 10g on RedHat Enterprise 3

So you’ve got Oracle 10G and you want to install it on your RedHat Enterprise 3 server. Well, since Oracle can’t manage to create tar files like everyone else in the world, you have to find a way of dealing with the .cpio they send you. Here’s how to get it extracted:

cpio -idmv < /path/to/ship-version.cpio

This extracts everything nicely into a Disk1 directory.

Now, before flying off and running the installer, you have a couple of things to do first. To start, you have to tweak your kernel a bit. There are a number of ways to do this, but I like to use the /etc/sysctl.conf file.

Edit /etc/sysctl.conf and add the following lines:

kernel.shmall = 134217728
kernel.shmmax = 2147483648
kernel.semopn = 100
semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

Next you have to add an oracle user and a dba group. Run the following commands as root:

groupadd dba
useradd -d /path/to/oracle/user/directory -g dba -c ‘Oracle User’ -s /path/to/fovorite/shell oracle
chown oracle:dba /path/to/oracle/user/directory
passwd oracle (set new password)

Add the following environmental settings to your oracle user’s .bashrc file. Feel free to change them if you are using a C-Type shell.

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.1.0/Db_1; export ORACLE_HOME
ORACLE_SID=YOUR_SID; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

That should just about do it. Restart the system, log in as the oracle user and run the oracle installer (/path/to/Disk1/runInstaller). Check to make sure that all the settings from your .bashrc file are picked up by the oracle installer and have fun.

In some cases, the installer may complain about not having the required packages. If it does this, make sure that the following packages are installed:

setarch-1.3-1.i386.rpm
openmotif-2.2.2-16.i386.rpm
compat-libstdc++-7.3-2.96.122.i386.rpm
compat-libstdc++-devel-7.3-2.96.122.i386.rpm
compat-db-4.0.14-5.i386.rpm
compat-gcc-7.3-2.96.122.i386.rpm
compat-gcc-c++-7.3-2.96.122.i386.rpm

Solaris Useradd Syntax

This morning I’ve been installing a new Sun Fire V240, and like always, I couldn’t remember the syntax to add a user to the system. Unlike other flavors of UNIX, Solaris does not have a command like adduser which walks you through the process step-by-step, so you have to remember the four flags useradd requires, and in what order it expects to receive them. Since I don’t manually add users unless I’m installing a new server, I don’t run the command enough to remember the syntax.

Anyhow, so I always know where to find the syntax, and in the hopes of helping others who might find themselves forgetting it, here it is:

useradd -g group -c ‘User Name’ -d /path/to/home/directory -s /path/to/shell username

Should you need to create a new group, it’s easy:

groupadd groupname