Installing Oracle 10g on Linux

Hi all, heres a guide i found to install oracle 10g on linux … i tried myself and it worked … thnx ….

Downloading Oracle10g Software and Burning Oracle10g CDs
Download Oracle 10g (32-bit and 64-bit) for Linux from OTN to install linux 10g oracle:
http://otn.oracle.com/software/products/database/oracle10g/index.html

Compute a cyclic redundancy check (CRC) checksum for the downloaded files and compare the checksum numbers against the numbers posted on OTN’s website. For example:
cksum ship.db.lnx32.cpio.gz
Uncompress the downloaded file(s):
gunzip ship.db.lnx32.cpio.gz

Unpack ship.db.lnx32.cpio:
$ cpio -idmv < ship.db.lnx32.cpio
Disk1/stage/Components/oracle.server/10.1.0.3.0/1
Disk1/stage/Components/oracle.server/10.1.0.3.0
Disk1/stage/Components/oracle.server
Disk1/stage/Components/oracle.tg/10.1.0.3.0/1/DataFiles
Disk1/stage/Components/oracle.tg/10.1.0.3.0/1
Disk1/stage/Components/oracle.tg/10.1.0.3.0
Disk1/stage/Components/oracle.tg

Disk1/stage/Components/oracle.assistants.dbca/..
../10.1.0.3.0/1/DataFiles/doc.3.1.jar
Disk1/stage/Components/oracle.assistants.dbca/..
../10.1.0.3.0/1/DataFiles/class.jar

To check the size of physical memory, execute:
grep MemTotal /proc/meminfo
2. To check the size of swap space, execute:
grep SwapTotal /proc/meminfo

You also can add temporary swap space to your system by creating a temporary swap
file instead of using a raw device. Here is the procedure:
su – root
dd if=/dev/zero of=tmpswap bs=1k count=900000
chmod 600 tmpswap
mkswap tmpswap
swapon tmpswap

To disable the temporary swap space execute the following commands:
su – root
swapoff tmpswap
rm tmpswap

Checking /tmp Space
According to Oracle’s documentation, the Oracle Universal Installer (OUI) requires up to 400 MB of free space in the /tmp directory. But OUI checks if /tmp is only greater than 80 MB.

To check the space in /tmp, run:
$ df /tmp

If you do not have enough space in the /tmp filesystem, you can temporarily create a tmp directory in another filesystem. Here is how you can do this:
su – root
mkdir //tmp
chown root.root //tmp
chmod 1777 //tmp
export TEMP=/ # used by Oracle
export TMPDIR=/ # used by Linux programs like the linker “ld”
When you are done with the Oracle installation, shutdown Oracle and remove the temporary /tmp directory:
su – root
rmdir //tmp
unset TEMP
unset TMPDIR

Checking Software Packages (RPMs)
General

Before you install an Oracle Database 10g you need to check the system for required RPMs. On my systems I usually install a minimum list of RPMs which usually requires the installation of additional packages for Oracle databases. Always ensure to use the latest RPMs and kernels!

For 10g R2 (64-bit) on RHEL 4 x86_64, the document Oracle Database Installation Guide 10g Release 2 (10.2) for Linux x86-64 lists the following required package versions or higher:
binutils-2.15.92.0.2-10.EL4
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-9.EL4
libstdc++-devel-3.4.3-9.EL4
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
Also ensure to install the libaio-0.3.96 RPM or a newer version! Otherwise the OUI prerequisite check will fail.

To check if you are running the x86_64 kernel on a x86_64 platform, run:
# uname -mi
x86_64 x86_64
To check the RPMs, run:
rpm -q –qf ‘%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n’ \
binutils compat-db control-center gcc gcc-c++ glibc glibc-common gnome-libs \
libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio

Checking Kernel Parameters
To see all kernel parameters, execute:
su – root
sysctl -a

For Oracle10g, the following kernel parameters have to be set to values greater than or equal to the recommended values which can be changed in the proc filesystem:
shmmax = 2147483648 (To verify, execute: cat /proc/sys/kernel/shmmax)
shmmni = 4096 (To verify, execute: cat /proc/sys/kernel/shmmni)
shmall = 2097152 (To verify, execute: cat /proc/sys/kernel/shmall) (for 10g R1)
shmmin = 1 (To verify, execute: ipcs -lm |grep “min seg size”)
shmseg = 10 (It’s hardcoded in the kernel – the default is much higher)

semmsl = 250 (To verify, execute: cat /proc/sys/kernel/sem | awk ‘{print $1}’)
semmns = 32000 (To verify, execute: cat /proc/sys/kernel/sem | awk ‘{print $2}’)
semopm = 100 (To verify, execute: cat /proc/sys/kernel/sem | awk ‘{print $3}’)
semmni = 128 (To verify, execute: cat /proc/sys/kernel/sem | awk ‘{print $4}’)

file-max = 65536 (To verify, execute: cat /proc/sys/fs/file-max)

ip_local_port_range = 1024 65000
(To verify, execute: cat /proc/sys/net/ipv4/ip_local_port_range)

/etc/sysctl.conf

Creating Oracle User Accounts
To create the oracle account and groups, execute the following commands:
su – root
groupadd dba # group of users to be granted SYSDBA system privilege
groupadd oinstall # group owner of Oracle files
useradd -c “Oracle software owner” -g oinstall -G dba oracle
passwd oracle

Creating Oracle Directories
For Oracle10g you only need to create the directory for $ORACLE_BASE:
su – root
mkdir -p /u01/app/oracle
chown oracle.oinstall /u01/app/oracle

But if you want to comply with Oracle’s Optimal Flexible Architecture (OFA), then you don’t want to place the database files in the /u01 directory but in another directory/filesystem/disk like /u02. This is not a requirement but if you want to comply with OFA, then you might want to create the following directories as well:
su – root
mkdir -p /u02/oradata/orcl
chown oracle.oinstall /u02/oradata/orcl
In this example, “orcl” stands for the name of the database which will also be the name of the instance. This is typically the case for single instance databases.

Setting Oracle Environments
Since the Oracle Universal Installer (OUI) “runInstaller” is run from the oracle account, some environment variables must be configured for this account before OUI is started.

Execute the following commands for the Bash shell which is the default shell on Red Hat Linux (to verify your shell run: echo $SHELL):
su – oracle
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=orcl

NOTE: If ORACLE_BASE is used, then Oracle recommends that you don’t set the ORACLE_HOME environment variable but that you choose the default path suggested by the OUI. You can set and use ORACLE_HOME after you finished running OUI.

Also, the environment variables ORACLE_HOME and TNS_ADMIN should not be set. If you’ve already set these environment variables, you can unset them by running the following commands:
unset ORACLE_HOME
unset TNS_ADMIN

To have these environment variables set automatically each time you login as oracle, you can add these environment variables to the ~oracle/.bash_profile file which is the user startup file for the Bash shell on Red Hat Linux. To do this you could simply copy/paste the following commands to make these settings permanent for your oracle’s Bash shell:
su – oracle
cat >> ~oracle/.bash_profile < connect / as sysdba
SQL> startup
To shutdown the database:
oracle$ sqlplus /nolog
SQL> connect / as sysdba
SQL> shutdown
The slash connects you to the schema owned by SYS. In the above example you will be connected to the schema owned by SYS with the privilege SYSDBA. SYSDBA gives you the following privileges:
- sysoper privileges WITH ADMIN OPTION
- create database
- recover database until

Shutdown of other Oracle 10g Background Processes

If you installed a preconfigured database using OUI, then several Oracle background processes are now running on your server. Execute the following command to see the background processes:
ps -ef

To shutdown the Oracle background processes after an Oracle Database 10g installation, you can execute the following commands:
• iSQL*Plus
To stop iSQL*Plus, run:
su – oracle
isqlplusctl stop
• Database Management Processes
During the installation of Oracle 10g, OUI offered two Database Management Options:

If you selected “Database Control for Database Management”, then the Oracle Enterprise Manager Database Control (Database Control) can be shutdown with the following command which stops both the agent and the Oracle Containers for Java (OC4J) management service:
su – oracle
emctl stop dbconsole
If you selected “Grid Control for Database Management” which is used for full “Grid Control” installations, then the Oracle Management Agent (standalone agent) for the Oracle Enterprise Manager Grid Control (Grid Control) can be stopped with the following command:
su – oracle
emctl stop agent
• Oracle Net Listener
To stop the listener, run:
su – oracle
lsnrctl stop
• Cluster Synchronization Services (CSS)
To shutdown Oracle CSS daemon, run:
su – root
/etc/rc.d/init.d/init.cssd stop

Leave a Reply