Steps to Install Oracle 10g Server in Redhat Linux
Oracle Database 10gRelease 2 is certified to run the base release of RHEL4
Required kernel version: 2.6.5-7.97 (or later)
Check your kernel version by running the following command: uname -r
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.24 libstdc++-devel-3.3.3-43.24 make-3.80-184.1 pdksh-5.2.14-780.1 sysstat-5.0.1-35.1 xscreensaver-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 make \ pdksh sysstat xscreensaver libaio
Configuring Linux for Oracle
Verifying 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
Filesystem Size Used Avail Use% Mounted on /dev/sda3 6.8G 1.3G 5.2G 20% / /dev/sda1 99M 17M 77M 18% /boot
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 oracleSet the password on the oracle account:passwd oracleChanging password for user oracle.New password:Retype new password:passwd: all authentication tokens updated successfully.
Now create directories to store the Oracle Database 10gRelease 2 software and the database files.
The following assumes that the directories are being created in the root filesystem. This is done for the sake of simplicity and is not recommended as a general practice.
These 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
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.
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=262144
If you're following along and have just installed Linux, the kernel parameters will all be at their default values and you can just cut and paste the following commands while logged in as root.
cat >> /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 = 262144Run 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 65536EOF
cat >> /etc/pam.d/login <session required /lib/security/pam_limits.soEOFFor RHEL4, use the following:cat >> /etc/profile <if [ \$USER = "oracle" ]; thenif [ \$SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fiumask 022fiEOF
cat >> /etc/csh.login <if ( \$USER == "oracle" ) thenlimit maxproc 16384limit descriptors 65536umask 022endifEOF
Steps for 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 Here
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.
Unzip and extract the file:
cd 10gR2_dbunzip 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_dbChange directory to Disk1.Ex:$ cd databaseStart the Oracle Universal Installer.$ ./runInstaller
1.Select Installation Method
Select Basic Installation
Oracle Home Location: /u01/app/oracle/product/10.2.0/db_1
Installation Type: Enterprise Edition (1.3GB)
UNIX DBA Group: oinstall
Make sure Create Starter Database is checked
Global Database Name: demo1
Enter the Database Password and Confirm Password
Click on Next
Specify Inventory Directory and Credentials
Inventory Directory: /u01/app/oracle/oraInventory
Operating System group name: oinstall
Click on Next
Product-specific Prerequisite Checks
If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
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.
End of Installation
Make note of the URLs presented in the summary, and click on Exit when ready.
- Congratulations! Your new Oracle Database 10g Release 2 database is up and ready for use.
Accessing the Database Using iSQL*Plus
iSQL*Plus is a Web-based version of the venerable SQL*Plus interactive tool for accessing databases. To use iSQL*Plus, click on the iSQL*Plus link in the Related Links section of the OEM console or point your browser to the iSQL*Plus URL provided during installation.
iSQL*Plus is a Web-based version of the venerable SQL*Plus interactive tool for accessing databases. To use iSQL*Plus, click on the iSQL*Plus link in the Related Links section of the OEM console or point your browser to the iSQL*Plus URL provided during installation.
Ex:
http://ds1.orademo.org:5560/isqlplus (You may have to use the IP address instead of the host name if your database server not configured in your DNS.)
http://ds1.orademo.org:5560/isqlplus (You may have to use the IP address instead of the host name if your database server not configured in your DNS.)
User Name: SYSTEM
Password:
Password:
Click on .
Enter SQL commands in the Workspace box, and click on Execute
Starting and Stopping iSQL*Plus:$ isqlplusctl start$ isqlplusctl stopStarting 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> exitShutdown:$ sqlplusSQL*Plus: Release 10.2.0.1.0 - Production on Sun Nov 27 15:40:29 2005Copyright (c) 1982, 2005, Oracle. All rights reserved.Enter user-name: / as sysdbaConnected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionWith the Partitioning, OLAP and Data Mining optionsSQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> exit
0 comments:
Post a Comment