In sweet memories of my ever loving brother "kutty thambi " ARUN KUMAR

Thursday, May 7, 2009

Installing Oracle10g in Linux (RHEL4 )

Part I: Installing Linux
RHEL4
Oracle Database 10g Release 2 is certified to run the base release of RHEL4
1. Boot the server using the first CD.
* 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.
* Select Enter to continue with a graphical install on the console. (For other installation methods and options, refer to the Red Hat Installation Guide.)
* The installer scans your hardware, briefly displays the Red Hat splash screen, and then begins a series of screen prompts.
3. Language Selection
* Accept the default.
4. Keyboard Configuration
* Accept the default.
5. Welcome Screen
* Click on Next.
6. Disk Partitioning Setup
* 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
- swap partition—Set this to at least twice the amount of RAM in the system but to no more than 2GB.
-root partition—This partition will be used for everything,
-/u01 partition-This partition will be used for oracle software installation.
-/tmp partition-This partition will be as same as the size of swap partition.
7. Boot Loader Configuration
* Accept the default.
8. Network Configuration
* It is usually best to configure database servers with a static IP address. Select Manual configuration.
9. Firewall Configuration
* For the purposes of this walk-through, no firewall is configured. Select No firewall
* Select Disabled on the "Enable SELinux" drop down list.
* Click on Proceed when the "Warning - No Firewall" window appears.
10. Additional Language Support
* Accept the default.
11. Time Zone Selection
* 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
* Enter a password for root, and enter it again to confirm.(eg:redhat)
13. Package Installation Defaults
* Select Customize software packages to be installed.
14. Package Group Selection
* Select only the package sets shown here and leave all others unselected.
* Desktop
o X Window System
o Gnome
* Applications
o Graphical Internet (optional)
* Servers
o Do not select anything in this group.
* Development
o Development Tools
* System
o Administration Tools
o 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.
* Miscellaneous
o Do not select anything in this group.
* Click on Next to proceed.
15. Installing Packages
* Software will be copied to the hard disk and installed. Change disks as prompted.
16. Congratulations
* Remove the installation media from the system, and click on Reboot .
17. The system automatically reboots and presents a new welcome screen.
* Click on Next.
18. License Agreement
* 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
* Set the Date and Time.
* If you want to use an NTP server (recommended), select Enable Network Time Protocol and enter the name of the NTP server.
20. Display
* Accept the defaults or change as required.
21. Red Hat Login
* Enter your Red Hat Network login and password or create a new one.
22. System User
* Create an account for yourself.
* Do not create an account for oracle at this time. Creating the oracle account is covered later in this section.
23. Additional CDs
* Click on Next.
24. Finish Setup
* Click on Next.
25. A graphical login screen appears.
26. Congratulations! Your RHEL4 software is now installed.

packages required for oracle 10g installation.
rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \
gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21

Ex:
# rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \
> gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21
binutils-2.15.92.0.2-15
compat-db-4.1.25-9
control-center-2.8.0-12.rhel4.2
gcc-3.4.4-2
gcc-c++-3.4.4-2
glibc-2.3.4-2.13
glibc-common-2.3.4-2.13
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.4-2
libstdc++-devel-3.4.4-2
make-3.80-5
pdksh-5.2.14-30.3
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.9
libaio-0.3.103-3

Part II: Configuring Linux for Oracle

Now that the Linux software is installed, you need to configure it for Oracle. This section walks through the steps required to configure Linux for Oracle Database 10g Release 2.

Create the Oracle Groups and User Account:
Create the Linux groups and user account that will be used to install and maintain the Oracle Database 10g Release 2 software. The user account will be called oracle, and the groups will be oinstall and dba. Execute the following commands as root:

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -m -g oinstall -G dba oracle
id oracle

Ex:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -m -g oinstall -G dba oracle
# id oracle
uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)

Set the password on the oracle account:

passwd oracle

Ex:
# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

Create Directories:
Now create directories to store the Oracle Database 10g Release 2 software and the database files.
Issue the following commands as root:

mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle

Ex:
# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/app/oracle

Configuring the Linux Kernel Parameters:

The Linux kernel is a wonderful thing. Unlike most other *NIX systems, Linux allows modification of most kernel parameters while the system is up and running. There's no need to reboot the system after making kernel parameter changes. Oracle Database 10g Release 2 requires the kernel parameter settings shown below. The values given are minimums, so if your system uses a larger value, don't change it.


#vi /etc/sysctl.conf file add the lines to the end of the sysctl.conf file

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
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.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144

Run the following command to change the current kernel parameters.

/sbin/sysctl -p

Login as the oracle user and add the following lines at the end of the .bash_profile file.

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

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=RAC1; 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

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
Part III: Installing Oracle

Oracle Database 10g Release 2 can be downloaded from OTN. Oracle offers a development and testing license free of charge. However, no support is provided and the license does not permit production use. A full description of the license agreement is available on OTN.

The easiest way to make the Oracle Database 10g Release 2 distribution media available on your server is to download them directly to the server.

Use the graphical login to log in as oracle.

Create a directory to contain the Oracle Database 10g Release 2 distribution:

mkdir 10gR2_db

To download Oracle Database 10g Release 2 from OTN, point your browser (Firefox works well) to http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201linuxsoft.html
please copy and paste the above url and try it, if it is not directly connected.
Fill out the Eligibility Export Restrictions page, and read the OTN License agreement. If you agree with the restrictions and the license agreement, click on I Accept.

Click on the 10201_database_linux32.zip link, and save the file in the directory you created for this purpose (10gR2_db)—if you have not already logged in to OTN, you may be prompted to do so at this point.
Link
Unzip and extract the file:

cd 10gR2_db
unzip 10201_database_linux32.zip

Install the Software and Create a Database

Log in using the oracle account.
Change directory to the location where you extracted the Oracle Database 10g Release 2 software.

Ex:
$ cd $HOME/10gR2_db

Change directory to Disk1.

Ex:
$ cd database

Start the Oracle Universal Installer.

$ ./runInstaller

1.Select Installation Method
Enter the required fields and click Next button

2.Specify Inventory Directory and Credentials
Enter the required fields and click Next button.
click Next button to proceed, if any error or warning occurs correct it and proceed.
click Install button.




connect as root, currently you are in oracle user.
so open terminal
[oracle@localhost ~]$ su -
Password:
[root@localhost ~]# cd /u01/app/oracle/oraInventory/
[root@localhost oraInventory]# ./orainstRoot.sh

[oracle@localhost ~]$ su -
Password:
[root@localhost ~]# cd /u01/app/oracle/product/10.2.0/db_1/
[root@localhost db_1]# ./root.sh


now you can connect and work with oracle database using SQL*Plus or oem.

Regards,
Rajeshkumar

1 comment:

free counters
 
Share/Bookmark