Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

HCL Infosystem Limited, Noida

INSTALLATION DOCCUMENT

Operating System Database

: :

Linux Oracle 11g R2_64 Bit

CONTENT AT A GLANCE

STEP
1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

TOPIC
DOWNLOAD ORACLE SETUP DOWNLOAD AND INSTALLL THE REQUIRED PACKAGES CONFIGURING KERNEL PARAMETERS SETTING SHELL LIMITS FOR THE ORACLE USER CREATING REQUIRED OS GROUPS AND USERS CREATING REQUIRED DIRECTORIES CONFIGURING THE ORACLE USERS ENVIRONMENT INSTALLING ORACLE DATABASE CREATING AN ORACLE DATABASE VERIFICATION AND QUERIES TO RUN

PAGE 3 3 4 5 5 6 7 7 14 25

Oracle Database 11g Release 2 (11.2) for Linux


OS: RHEL_5.6 x86_64 Oracle Database: 11g Release 2(11.2.0.1),64 bit

Step 1: DOWNLOAD ORACLE SETUP.


Download the oracle 11g release 2 software from Oracle website (note down cksum) and Unzip both downloaded zip files within same directory. # 11.2.0.1 unzip linux.x64_11gR2_database_1of2.zip /u01/software_dump/ unzip linux.x64_11gR2_database_2of2.zip /u01/software_dump/ Note: - You should now have a single directory called "software_dump " containing installation files.

STEP 2: DOWNLOAD AND INSTALLL THE REQUIRED PACKAGES


# From Oracle Linux 5 DVD Location of packages cd /media/cdrom/Server you can find all RPMs Some additional packages are required for successful installation of oracle software. To check whether required packages are installed on your operating system use the following command. As a root user

1.rpm qa 2.rpm q (package_ name) 3.rpm -Uvh (package _name) 4.rmp Ivh(package_ name)

: : : :

for query all RPM package for query an RPM package. for updating the package for installing the package

The following are the list of packages required for Oracle Database 11g Release 2 (11.2):

binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 compat-libstdc++-33-3.2.3 (32 bit) elfutils-libelf-0.125 elfutils-libelf-devel-0.125 gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-2.5-24 (32 bit) glibc-common-2.5 glibc-devel-2.5 glibc-devel-2.5 (32 bit) glibc-headers-2.5
3

ksh-20060214 libaio-0.3.106 libaio-0.3.106 (32 bit) libaio-devel-0.3.106 libaio-devel-0.3.106 (32 bit) libgcc-4.1.2 libgcc-4.1.2 (32 bit) libstdc++-4.1.2 libstdc++-4.1.2 (32 bit) libstdc++-devel 4.1.2 make-3.81 sysstat-7.0.2 unixODBC-2.2.11 unixODBC-2.2.11 (32 bit) unixODBC-devel-2.2.11 unixODBC-devel-2.2.11 (32 bit)

STEP 3:- CONFIGURING KERNEL PARAMETERS


Setting the parameters as root user.

1. Edit the /etc/sysctl.conf and add following lines: # Vi /etc/sysctl.conf


Oracle recommend the following minimum parameter settings.

fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586
Note: The minimum value required for shmmax is 0.5 GB. However,Oracle recommends that you set the value of shmmax to 2.0 GB for optimum performance of the system.

2 . Enter the following command to change the current values of the kernel parameters: # /sbin/sysctl p Review the output from this command to verify that the values are correct. If the values are
incorrect, edit the /etc/sysctl.conf file, then enter this command again.

# /sbin/sysctl -a to confirm that the values are set correctly.

STEP 4:- SETTING SHELL LIMITS FOR THE ORACLE USER


To improve the performance of the software, you must increase the following shell limits for the oracle user:

# vi /etc/security/limits.conf
Add the following lines in the /etc/security/limits.conf file:

Oracle Oracle Oracle oracle

soft hard soft hard

nproc nproc nofile nofile

2047 16384 1024 65536

# /etc/pam.d/login
Add the following line to the /etc/pam.d/login file, if it does not already exist:

Session

required

pam_limits.so

STEP 5: CREATING REQUIRED OS GROUPS AND USERS.


Login as a root create a oracle user which belong to oinstall(primary group),dba(secondary group) groups. The following local operating system groups and users are required if you are installing Oracle Database: 1. To determine whether the oinstall group exists, enter the following command:

# grep oinstall /etc/group


Output:oinstall:x:500: If the output of this command shows the oinstall group name, then the group already exists.

# more /etc/oraInst.loc
If the oraInst.loc file exists, then the output from this command is similar to the following:

inventory_loc=/u01/app/oraInventory inst_group=oinstall
5

2. To determine whether the dba group exists, enter the following command: # grep dba /etc/group
Output:dba:x:501: If the output from this commands shows the dba group name, then the group already exists. 3. If group not created already then put the following commands

# groupadd oinstall for creating oinstall group. # groupadd dba for creating dba group.
4. If the oracle user exists, but its primary group is not oinstall or it is not a member of the dba group, then enter the following command:

# usermod -g oinstall -G dba oracle


5. If the oracle user does not exist, enter the following command to create it:

# useradd -g oinstall -G dba oracle


Where g-> primary Group G-> secondary Group 6. Enter the following command to set the password of the oracle user:

# passwd oracle

STEP 6: CREATING REQUIRED DIRECTORIES


Enter commands similar to the following to create the recommended subdirectories in the mount point directory that you identified and set the appropriate owner, group, and permissions on them: Login as root user and create the directories in which the Oracle software will be installed.

# mkdir -p /u01/app/oracle/product/11.2.0/db_1 # chown -R oracle:oinstall /u01 # chmod -R 775 /u01


Where R Recursive Operate on file and directories recursively, /U01 is mount point, Chown means file owner ship and, Chmod R 775 read write permission

STEP 7: CONFIGURING THE ORACLE USERS ENVIRONMENT


login as oracle and add the following lines at the end of the ".bash_profile" file, remembering to adjust them for your specific installation. Edit the /home/oracle/.bash_profile

$ vi /.bash_profile the following settin should be set in bash_profile.


ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME ORACLE_SID=DB11G; export ORACLE_SID PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH Save the .bash_profile and execute following commands for load new enviroment

$ . .bash_profile

STEP 8: INSTALLING ORACLE DATABASE


After configuring the oracle users environment, start Oracle Universal Installer andb install Oracle Database as follows:

To start Oracle Universal Installer, enter the following command:

$ /mount_point/db/runInstaller
As a oracle user Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory. Where I have given permission

Example :- u01 $ ./runInstaller


Note : run runInstaller in vnc or any tool which display graphically oracle setup wizard. If you are logged as root, logout and Logins as oracle user

1 Configure Security Updates

You can leave empty email textbox and click on next 2. Select Install Option : select install database software only

3. Node Selection : select single instance database installation

4. Select Install Type : Select Standard or Enterprise Edition

Click Next 5. Create Inventory

Click Next 6. Perform Prerequisite Checks

10

7. Summary

8. Installing Product

11

9. Database Configuration Assistant

10. Database Configuration Assistant: you can set password for Schema from Password Management or Click OK

12

11. Execute Configuration Scripts as root user

12. Click ok after run scripts then Finish and close


13

STEP 9 : CREATING AN ORACLE DATABASE


1. PREREQUISITE
After Installation Of Oracle Software We Have To Create A Database By Database Configuration Assistant (DBCA) And Configure The Listener. With These Commands As Oracle User.

$ netca (listener configuration) $ dbca (database configuration assistant)


Note: if you want create database through .dbt file,then put your .dbt file (Clarity_11g.dbt)in the following directory. /uo1/app/oracle/product/11.2.0/db_home_1/assistants/dbca/templates [oracle@oracle templates]$ ll total 285688 -rw-rw-r-- 1 oracle oracle -rw-r--r-- 1 oracle oracle
14

32768 Mar 15 2011 Clarity_11g.dbt 5106 Aug 13 2009 Data_Warehouse.dbc

-rwxr-xr-x 1 oracle oracle 22536192 Aug 14 2009 example01.dfb -rwxr-xr-x 1 oracle oracle 1179648 Aug 14 2009 example.dmp -rw-r--r-- 1 oracle oracle -rw-r--r-- 1 oracle oracle 4986 Aug 13 2009 General_Purpose.dbc 11492 Feb 25 2009 New_Database.dbt

-rwxr-xr-x 1 oracle oracle 9748480 Aug 13 2009 Seed_Database.ctl -rwxr-xr-x 1 oracle oracle 258711552 Aug 13 2009 Seed_Database.dfb

2. LISTENER
Before start dbca you should Launch the Net Configuration Assistant, The radio button for Listener Configuration will be selected. Click Next three times. If there is a message stating that a listener already exists, you can exit the tool immediately by clicking Cancel and Finish, and proceed to Step 3. Otherwise, click Next another four times to define the default listener, and then Finish to exit the tool.

3 DBCA
Enter the command

$ dbca : then you will get the following screen.

Click on Next.

15

1.

Select Create Database option

and then Click Next .

2.

Selecte Database Template and then Click on Next. Note:In our case we selected Clarity 11g

16

3.

Enter Global Database Name and SID .

and then Click Next

4.

Configure Management Option according to your Requirement.

then Click Next.

17

5.

Create Database Credentials.

and then Click Next

6.

Set Database File Location then Click Netx

18

7.

Configure File Recovery Configurationthen Click Next.

If you click on browse button then you will get following screen and enter the path where you want to selt flash Recovery area..click OK

Then Click Next

19

8. Database Content:

Click Next

9.

Set Initialization parameter .according to your requirement ,Set Memory from following Screen

20

Click on sizzing to set block size and processes:

Click character tab to select database character set.

21

Click connection mode tab to set connection mode.

Then Click Next.

10.Check database storage..and then Click Next

22

11.Creation Option.

12.Click Finish.then youi will get Summary

23

Click ok to start database creation and to open database configuration assistant

After completed 100% processes your database successfully created and then click ok and then close to exit.

10. VERIFICATION AND QUERIES TO RUN


you can check your database status and listener status to run some queries and in sqlplus you can up your database to verify your installation and database creation task.

Starting the Database Listener lsnrctl start [listener] lsnrctl status [listener] Starting and Connecting to Database Control emctl start dbconsole emctl stop dbconsole emctl status dbconsole

To connect to Database Control, use any reasonably up-to-date browser. The URL is

https://hostname:port/em

24

SQLPLUS connect user/pass[@connect_alias] connect user/pass[@connect_alias] as sysdba connect user/pass[@connect_alias] as sysoper connect / as sysdba connect / as sysoper

1. Launch SQL*Plus, using the /nolog switch to prevent an immediate logon prompt: sqlplus /nolog

2. Connect as SYS with operating system authentication: connect / as sysdba 3. Start the instance only: startup nomount; 4. Mount the database: alter database mount; 5. Open the database: alter database open; 6. Confirm that the database is open by querying a data dictionary view: select count(*) from dba_data_files;
7. Confirm that the instance status:

Select instance_name,status from v$instance;


8. Confirm that the open mode of database:

Select open_mode from v$database;

25

You might also like