Steps to install Oracle 10g Client for Redhat Linux
Oracle Database 10g Release 2 is certified to run the base release of RHEL4 (Advanced Server and Enterprise Server) without updates.
Verifying Your Installation
Required kernel version: 2.6.5-7.97 (or later)
Check your kernel version by running the following command: uname -r
Other required package versions (or later):
binutils-2.15.90.0.1.1-32.5gcc-3.3.3-43.24gcc-c++-3.3.3-43.24glibc-2.3.3-98.28gnome-libs-1.4.1.7-671.1libstdc++-3.3.3-43.24libstdc++-devel-3.3.3-43.24make-3.80-184.1pdksh-5.2.14-780.1sysstat-5.0.1-35.1xscreensaver-4.16-2.6libaio-0.3.98
Run the following command as root:
rpm -q binutils gcc gcc-c++ glibc gnome-libs libstdc++ libstdc++-devel makepdksh sysstat xscreensaver libaio
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.
System Requirements
To check the amount of RAM and swap space available, run this:
grep MemTotal /proc/meminfogrep SwapTotal /proc/meminfo
The minimum RAM required is 1024MB, and the minimum required swap space is 1GB. Swap space should be twice the amount of RAM for systems with 2GB of RAM or less and between one and two times the amount of RAM for systems with more than 2GB.
You also need 2.5GB of available disk space for the Oracle Database 10g Release 2 software and another 1.2GB for the database. The /tmp directory needs at least 400MB of free space. To check the available disk space on your system, run the following command:
df -h
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 oracleid oracle
Set the password on the oracle account:
passwd oracleChanging password for user oracle.New password:Retype new password:
Create directories to store the Oracle Database 10g software and the database files.
Directories would normally be created as separate filesystems. Issue the following commands as root:
mkdir -p /u01/app/oraclechown -R oracle:oinstall /u01/app/oraclechmod -R 775 /u01/app/oracle
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 10gRelease 2 requires the kernel parameter settings shown below.
kernel.shmall = 2097152kernel.shmmax = 536870912kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default=262144net.core.wmem_default=262144net.core.rmem_max=262144net.core.wmem_max=262144cat >> /etc/sysctl.conf <kernel.shmall = 2097152kernel.shmmax = 536870912kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default=262144net.core.wmem_default=262144net.core.rmem_max=262144net.core.wmem_max=262144EOF# /sbin/sysctl -pnet.ipv4.ip_forward = 0net.ipv4.conf.default.rp_filter = 1net.ipv4.conf.default.accept_source_route = 0kernel.sysrq = 0kernel.core_uses_pid = 1kernel.shmall = 2097152kernel.shmmax = 536870912kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default = 262144net.core.wmem_default = 262144net.core.rmem_max = 262144net.core.wmem_max = 262144
Run the following commands as root to verify your settings:
/sbin/sysctl -a | grep shm/sbin/sysctl -a | grep sem/sbin/sysctl -a | grep file-max/sbin/sysctl -a | grep ip_local_port_range/sbin/sysctl -a | grep rmem_default/sbin/sysctl -a | grep rmem_max/sbin/sysctl -a | grep wmem_default/sbin/sysctl -a | grep wmem_max
Setting Shell Limits for the oracle User
Oracle recommends setting limits on the number of processes and open files each Linux account may use. To make these changes, cut and paste the following commands as root:
cat >> /etc/security/limits.conf <oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536EOFcat >> /etc/pam.d/login <session required /lib/security/pam_limits.soEOF
For RHEL4,use the following:
cat >> /etc/profile <if [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fiumask 022fiEOFcat >> /etc/csh.login <if ( $USER == “oracle” ) thenlimit maxproc 16384limit descriptors 65536umask 022endifEOF
Steps for Installing Oracle:
Oracle Database 10gRelease 2 can be downloaded from OTN. 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 OTNHere
.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.
Unzip and extract the filecd 10gR2_dbunzip 10201_client_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
Select Installation Method
- Oracle Home Location: /u01/app/oracle/product/10.2.0/db_1
- Installation Type: Custom Installation – Select all package to install.
- Global Database Name: Google
- Click on Next
- Specify Inventory Directory and Credentials
- Inventory Directory: /u01/app/oracle/oraInventory
- Operating System group name: oinstall
- Click on Next
- Summary
- A summary of the products being installed is presented.
- Click on Install.
- Configuration Assistants
- The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically
- Execute Configuration Scripts
- At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the indicated scripts.
- Click on OK when finished.
- Congratulations! Your new Oracle Database 10g Release 2 database is up and ready for use.
Steps to Access Server Database through Client
First step is to start lsnrctl listener for accessing server from the client. Start the server database before accessing from the client.
Starting and Stopping the Listener
The listener accepts connection requests from clients and creates connections to the database once the credentials have been authenticated. Before you can use OEM or iSQL*Plus, the listener must be up.
$ lsnrctl start$ lsnrctl stop
Starting and Stopping the Database
The easiest way to start and stop the database is from the OEM Console. To do that from the command line, use SQL*Plus while logged in as oracle, as follows:
Startup:
$ sqlplusSQL*Plus: Release 10.2.0.1.0 – Production on Sun Nov 27 15:39:27 2005Copyright (c) 1982, 2005, Oracle. All rights reserved.Enter user-name: / as sysdbaConnected to an idle instance.SQL> startupORACLE instance started.Total System Global Area 285212672 bytesFixed Size 1218968 bytesVariable Size 96470632 bytesDatabase Buffers 180355072 bytesRedo Buffers 7168000 bytesDatabase mounted.Database opened.SQL> exit
Steps to Connect access Server through Client
/sqlplus username/password@//server_name:1521/database_name
You should be now presented with an SQL prompt where you can execute sql commands to your database:SQL*Plus: Release 10.2.0.2.0 – Production on Tue Jul 18 15:21:53 2006Copyright (c) 1982, 2005, Oracle. All rights reserved.
