Oracle 10g release 1 (10.1.0.2) on Fedora core 3 (FC3)
Please note that Oracle Database 10g is not certified to run on Fedora Linux, therefore you should not use this combination on a production server. You can examine the Oracle certification matrix on Metalink.
Downloading and unpacking installation files
Download Oracle Database 10g from Oracle Technology Network. Four files are available:
- ship.ccd.cpio.gz - Oracle 10g Companion CD
- ship.client.cpio.gz - Oracle 10g Client
- ship.crs.cpio.gz - Oracle 10g Cluster Ready Services
- ship.db.cpio.gz - Oracle 10g Database
Only ship.db.cpio.gz is required in order to install the database. Once you downloaded the file, unpack it:
gunzip ship.db.cpio.gz cpio -idmv<ship.db.cpio
All four installation files unpack to directory named "Disk1", so rename directory before you eventually unpack another file.
Preparing your system
Steps to perform as root user
Install following fedora packages using rpm -Uvh package_name:
setarch-1.6-1 openmotif-2.2.3-6 compat-gcc-8-126.96.36.199 compat-libstdc++-8-188.8.131.52 compat-libstdc++-devel-8-184.108.40.206 compat-gcc-c++-8-220.127.116.11
Oracle installer thinks that we have one of the supported distributions (redhat-3), so we don't need to modify /etc/redhat-release.
Change kernel parameters by adding the following lines in /etc/sysctl.conf:
kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 32768 65000
Update kernel configuration:
[root@denisnb ~]# sysctl -e -p /etc/sysctl.conf
Add the following lines to /etc/security/limits.conf file:
* soft nproc 2047 * hard nproc 16384 * soft nofile 1024 * hard nofile 65536
Add the following line to the /etc/pam.d/login file, if it does not already exist:
session required /lib/security/pam_limits.so
Create user and groups that will own oracle installation. In this exaple the username will be oracle:
[root@denisnb ~]# groupadd oinstall [root@denisnb ~]# groupadd dba [root@denisnb ~]# useradd -g oinstall -G dba oracle [root@denisnb ~]# passwd oracle
Running the installer
If you have Oracle 10g Database CD, login as root and mount it:
[root@denisnb ~]# mount /media/cdrom
Oracle installer needs to be run from Xwindows, so start Xwindows and login as user oracle.
Start the installer:
[oracle@denisnb ~]$ /media/cdrom/runInstaller
Now the installer should be up and running. Remember ORACLE_SID and path to ORACLE_HOME that you set at the installer file locations prompt, you'll need this later on.
During the 'Product-specific Prerequisite Checks' phase a warning is raised because gcc-2.96 is missing. Ignore this and continue with the installation.
Setting up environment
Login as user oracle and add the following variables in .bash_profile:
echo "export ORACLE_HOME=/home/oracle/product/10.1.0/db_1" >>$HOME/.bash_profile echo "export PATH=\$PATH:\$ORACLE_HOME/bin">>$HOME/.bash_profile echo "export ORACLE_SID=ora10" >>$HOME/.bash_profile
Change the values of ORACLE_SID and ORACLE_HOME, if necessary. Modify the /etc/oratab file in order to use database startup and shutdown scripts provided by oracle. Find the line in /etc/oratab that looks similar to this:
Entries are of the form:
Change the last field (N) to Y, and you will be able to start the database using dbstart utility.
Starting database services
Note: If you just installed Oracle, the database, TNS listener and enterprise manager are already running.
Start TNS Listener:
[oracle@denisnb ~]$ lsnrctl start
You can start the database via dbstart utility:
[oracle@denisnb ~]$ dbstart
or via SQL*Plus:
[oracle@denisnb ~]$ sqlplus / as sysdba SQL*Plus: Release 10.1.0.2.0 - Production on Fri Nov 12 17:13:01 2004 Copyright (c) 1982, 2004, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 188743680 bytes Fixed Size 778036 bytes Variable Size 162537676 bytes Database Buffers 25165824 bytes Redo Buffers 262144 bytes Database mounted. Database opened. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production With the Partitioning, OLAP and Data Mining options [oracle@denisnb ~]$
Start Enterprise manager server (optional):
[oracle@denisnb ~]$ emctl start dbconsole
Stopping database services
Stop Enterprise manager server:
[oracle@denisnb ~]$ emctl stop dbconsole
You can stop the database via dbshut utility:
[oracle@denisnb ~]$ dbshut
or via SQL*Plus:
[oracle@denisnb ~]$ sqlplus / as sysdba SQL*Plus: Release 10.1.0.2.0 - Production on Fri Nov 12 17:21:32 2004 Copyright (c) 1982, 2004, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production With the Partitioning, OLAP and Data Mining options SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production With the Partitioning, OLAP and Data Mining options [oracle@denisnb ~]$
Stop TNS listener:
[oracle@denisnb ~]$ lsnrctl stop
Automating oracle startup and shutdown
To automatically start/shut oracle database during system startup/shutdown you need to write a script in /etc/rc.d/init.d directory. You can view or Download an example script.
Copy the script to /etc/rc.d/init.d as root user, edit environment variables to match your settings and modify its permissions:
[root@denisnb ~]# chown root.root /etc/rc.d/init.d/ora10 [root@denisnb ~]# chmod 755 /etc/rc.d/init.d/ora10
This startup/shutdown script uses chkconfig utility to simplify service management. It is configured to start oracle services in runlevels 3 and 5,with start priority 95 and stop priority 1.
Initialize new service:
[root@denisnb ~]# chkconfig ora10 reset [root@denisnb ~]# chkconfig --list ora10 ora10 0:off 1:off 2:off 3:on 4:off 5:on 6:off
Now oracle services will be automatically started when entering runlevels 3 and 5, and shut down when entering any other runlevel. For more information on chkconfig utility refer to its man page.
To manually start/stop oracle services you can use
[root@denisnb ~]# service ora10 start
[root@denisnb ~]# service ora10 stop
Republished with permission from Denis Klaric. Original URL: http://staff.in2.hr/denis/oracle/10g1install_fedora3_en.html