Professional Documents
Culture Documents
MCS, OCP DBA & Developer (DBA, 11g, 10g, Developer 2008,6,6i)
Cell No: +92-300-6653641
E-Mail : naeemsheeraz@yahoo.com
Deputy Manager IT (DBA), Application Support and Development Team Leader
Feel free for suggestion, comments and notifying errors for making this document more comprehensive.
Note: This document prepared just for informative & learning purposes for beginners and not
warranted to error-free, or subject to any other warranties or conditions for data losses, may not be
reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose,
without prior written permission.
Technical Support :
Zaheer Hussain (DBA – Tameer Micro Finance Bank – Karachi - PK)
Syed Muhammad Nauman (DBA – SNGPL-Lahore-PK)
For 10g R2 (32-bit) on RHEL 4 x86, required following package versions or higher.
The Linux distributions certified for Oracle Database 10g Release 2 are:
• Oracle Enterprise Linux 5 (OEL5)
• Oracle Enterprise Linux 4 (OEL4)
• Red Hat Enterprise Linux 5 (RHEL5)
• Red Hat Enterprise Linux 4 (RHEL4)
• Red Hat Enterprise Linux 3 (RHEL3)
• Novell SUSE Linux Enterprise Server 10 (SLES10)
• Novell SUSE Linux Enterprise Server 9 (SLES9)
• Asianux 2.0
• Asianux 1.0
Your hardware does not have to match this in order to use this guide. All that is necessary for a basic
database install is a single CPU, 1024MB of RAM, and one disk drive (IDE, SCSI, or FireWire) with at
least 7GB of free space.
1. Boot the server using the first CD.
o You may need to change your BIOS settings to allow booting from the CD.
2. The boot screen appears with the boot: prompt at the bottom of the screen.
o Select Enter to continue with a graphical install on the console. (For other installation
methods and options, refer to the Red Hat Installation Guide.)
o The installer scans your hardware, briefly displays the Red Hat splash screen, and
then begins a series of screen prompts.
3. Language Selection
o Accept the default.
4. Keyboard Configuration
o Accept the default.
5. Welcome Screen
o Click on Next.
6. Disk Partitioning Setup
o A thorough treatment of disk partitioning is beyond the scope of this guide, which
assumes that you are familiar with disk partitioning methods.
(WARNING: Improperly partitioning a disk is one of the surest and fastest ways to
wipe out everything on your hard disk. If you are unsure how to proceed, stop
and get help, or you will risk losing data!)
This guide uses the following partitioning scheme, with ext3 for each filesystem:
The 9GB disk on the first controller (/dev/sda) will hold all Linux and Oracle software
and contains the following partitions:
- 100MB /boot partition
-1,500MB swap partition—Set this to at least twice the amount of RAM in the system
but to no more than 2GB. (Thirty-two-bit systems do not support swap files larger
than 2GB.) If you need more than 2GB of swap space, create multiple swap partitions.
-7,150MB root partition—This partition will be used for everything, including /usr,
/tmp, /var, /opt, /home, and more. This approach is purely to simplify installation for
the purposes of this guide. A more robust partitioning scheme would separate these
directories onto separate filesystems.
7. Boot Loader Configuration
o Accept the default.
8. Network Configuration
o It is usually best to configure database servers with a static IP address. To do so, click
on Edit .
o A pop-up window appears. Uncheck the Configure using DHCP box, and enter the IP
Address and Netmask for the server. Be sure that Activate on boot is checked, and
click on OK .
o In the Hostname box, select manually and enter the hostname.
o In the Miscellaneous Settings box, enter the remaining network settings.
9. Firewall Configuration
o For the purposes of this walk-through, no firewall is configured. Select No firewall
o Select Disabled on the "Enable SELinux" drop down list.
o Click on Proceed when the "Warning - No Firewall" window appears.
10. Additional Language Support
o Accept the default.
11. Time Zone Selection
o Choose the time settings that are appropriate for your area. Setting the system clock
to UTC is usually a good practice for servers. To do so, click on System clock uses
UTC.
12. Set Root Password
o Enter a password for root, and enter it again to confirm.
13. Package Installation Defaults
o Select Customize software packages to be installed.
14. Package Group Selection
o Select only the package sets shown here and leave all others unselected.
o Desktop
X Window System
2
Gnome
o Applications
Graphical Internet (optional)
o Servers
Do not select anything in this group.
o Development
Development Tools
o System
Administration Tools
System Tools
Add the package 'sysstat' by clicking on the Details link and selecting
"sysstat - The sar an iostat system monitoring commands." from the
Optional Packages list.
o Miscellaneous
Do not select anything in this group.
o Click on Next to proceed.
15. Installing Packages
o Software will be copied to the hard disk and installed. Change disks as prompted.
16. Congratulations
o Remove the installation media from the system, and click on Reboot .
17. The system automatically reboots and presents a new welcome screen.
o Click on Next.
18. License Agreement
o Read the license agreement. If you agree to the terms, select Yes, I agree to the
License Agreement and click on Next.
19. Date and Time
o Set the Date and Time.
o If you want to use an NTP server (recommended), select Enable Network Time
Protocol and enter the name of the NTP server.
20. Display
o Accept the defaults or change as required.
21. Red Hat Login
o Enter your Red Hat Network login and password or create a new one.
22. System User
o Create an account for yourself.
o Do not create an account for oracle at this time. Creating the oracle account is
covered later in this section.
23. Additional CDs
o Click on Next.
24. Finish Setup
o Click on Next.
25. A graphical login screen appears.
26. Congratulations! Your RHEL4 software is now installed.
uname -r
2.6.9-22.ELsmp
Once you've completed the steps above, all of the packages required for Oracle Database 10g Release
2 will have been installed. Verify this using the example below.
Required package versions (or later):
• 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
3
• 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
• libaio-0.3.96
• openmotif21-2.1.30-11.RHEL4.2 (Required only to install Oracle demos. Installation of Oracle
demos is not covered by this guide.)
To see which versions of these packages are installed on your system, run the following command:
rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \
gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21
1. Applications Æ System Setting Æ Add Remove Application and select appropriate package.
2. Login as “root” user and navigate to /media/cdrecoder/Enterprise/RPMS and install package
3. Login as “root” user and execute package installation command on terminal
$ cd /media/cdrecoder/Enterprise/RPMS
Now Linux Operating system is installed, you need to configure it for Oracle. This section walks through
the steps required to configure Linux OS for Oracle Database 10g Release 2.
1. Edit the /etc/hosts file must contain a fully qualified name for the server:
<IP-address> <fully-qualified-machine-name> <machine-name>
Example: 192.168.1.230 LinuxDB.sadtex.com LinuxDB
2. Login as “root” user and Right Click On Desktop Æ Open Terminal ( or su – root if already open)
3. Execute xhost +
4. Create the Oracle Groups, User Account named “oracle” and set oracle user password
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/groupadd oper
4
6. With an editor open /home/oracle/.bash_profile and add the entries at bottom of file.
umask 022
After editing/saving .bash_profile file check it working properly, showing exact values.
$ su – oracle
$ echo $TMP
$ echo $TMPDIR
$ echo $ORACLE_HOSTNAME
$ echo $ORACLE_BASE
$ echo $ORACLE_HOME
$ echo $ORACLE_SID
$ echo $PATH
Edit file /etc/sysctl.config in any editor and add following lines in bottom of file
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144
The kernel changes made previously take effect with each reboot. Issue this command to set the
kernel parameters:
/sbin/sysctl -p
Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
5
Part III : Installing Oracle Database 10g on Linux
$ su – oracle
$ cd /oradisk/app
$ unzip 10201_database_linux32.zip
$ cd database
Connecting to Database
$ su – oracle
$ cd $ORACLE_HOME
$ sqlplus /nolog