Step-by-step teaching you to install Oracle 11g Grid + database under Redhat Linux

Source: Internet
Author: User
Tags dba

For beginners who want to learn Oracle, see the veteran.


Operating System Information:


VBox virtual machine software version:

Install the required software:

Required Software:
Http://pan.baidu.com/s/1mgl8kzu

Specific installation steps:
A. Create a new virtual machine and install the redhat5.4 operating system (64-bit)




Note: This is the smallest 2G memory.


Since I am a virtual machine doing experiments, store us here to choose dynamic Allocation. If the virtual machine is likely to be used frequently in the future, you can change the virtual hard disk allocation mode to a fixed size, which makes performance better.


we've allocated 50G of storage space here.

mount the operating system image

When done, as shown:

To start a virtual machine:


Skip the CD media test directly


next go to the installation screen:

We choose to install the English operating system

No serial number we choose to skip

the new virtual hard disk has no data at all, let him empty it, we choose Yes.


we select its default partitioning method.

the network configuration here first regardless of him, jump over.

Time Zone We choose Asia/Shanghai

The root password is set to Oracle

Required packages, we tick software development, and tick customize now, so you can save some energy when you pack the system in the back.

remember the operating system on the Chinese support hook, or you will have to use later to install, save trouble later.

Then quietly wait for the installation.

Restart the virtual machine after installation is complete

simple configuration for first boot


to facilitate future learning, we shut down the firewall and SELinux. Then the next step is the default.

and let you register, we do not have a serial number, or can only skip.

log in to the operating system with the root user

we'll find that the resolution is quite a crash. So we need to install the VBox enhancement tool.


We then copy the files in the image to our Desktop folder and install the enhancements with the root user.

Execute the installation script and reboot when you are done. Let's shut down the machine first, and don't worry about the start.



The machine is turned off, and then we add a virtual disk, 3G, which is used when the grid is installed behind.




will be created soon.


then set the network card type from NAT to host only, do not know why please Baidu Virtual Machine network card type between the difference.
When you are finished, start the virtual machine again.
Next to set up the IP of the virtual machine, we have changed the network card type to host only, so we want to change the virtual machine IP to the host of our physical machine only virtual network card in the same segment.

the IP of our physical machine is 192.168.56.1, so we set the virtual machine IP to 192.168.56.10

set the IP of the virtual machine

then we found that the IP was set to complete.

The physical machine ping virtual machine can be the same, no problem.
Next, we have just added a small virtual hard disk to divide the area.


then we can see the new partition.




Second, upload the installation media to the virtual machine.

Remote channel virtual machine via Xshell SSH


IP to populate virtual machine IP

Enter the user name password to

We then use the Xftp tool to upload the installation media to the virtual machine.

(Xshell xftp installation package in my shared folder, Windows under the Fool installation, here is not repeat)


We create a new u01 folder under the root directory, and then place the installation media under the folder.


Then wait patiently for the upload.

Iii. adding users and operating system groups
We do not modify the operating system parameters here, and do not patch the operating system, this will be resolved during the installation process.


Change permissions for the U01 folder


Four, install the grid 11g
ASM disk groups need to be created when the grid is installed, we can create ASM disk groups with Oracle users by changing the owner to the bare device, or you can create an ASM disk with the Asmlib provided by Oracle, and then create an ASM disk group with the ASM disk. We use asmlib here, because even if the owner of the bare device is changed to an Oracle user, and the owner becomes root after the OS restarts, we take a asmlib approach to avoid unnecessary hassles.
First, you need to install Asmlib with the root user

Locate the Asmlib rpm package that we uploaded, and install it with the root user.

Installation Asmlib Complete
The asmlib then needs to be configured.

Configuration complete, then load the Asmlib module

Create the ASM disk using the partition we had previously, and then listdisks see the ASM Disk we built, called ASM1


Then log off the root user and log in to the operating system with an Oracle user

Run the installation file.

We choose to install only the software.


Select all language Support.

The standard installation requires OSDBA Osoper OSASM operating system groups, and we use the DBA group for convenience, without any impact on the learning behind us.

The directory is just the default one.

Then install the pre-test
Here the installer detects non-compliant operating system parameters and missing RPM packages. We click fix & Check Again

We use the root user to execute this script, then all the operating system parameters are changed, and we do not need to manually modify.
Then follow the prompts to hit the missing RPM packages.

We mount the operating system image

[[email protected] server]# pwd/media/rhel_5.4 x86_64 dvd/server[[email protected] Server]# RPM-IVH Libaio-devel-0.3.106-3.2.x86_64.rpmwarning:libaio-devel-0.3.106-3.2.x86_64.rpm:header V3 DSA Signature:nokey, key ID 37017186Preparing ... ########################################### [100%] 1:libaio-devel ##### ###################################### [100%][[email protected] server]# RPM-IVH Libaio-devel-0.3.106-3.2.i386.rpmwarning:libaio-devel-0.3.106-3.2.i386.rpm:header V3 DSA Signature:nokey, key ID 37017186Preparing ... ########################################### [100%] 1:libaio-devel ######## ################################### [100%][[email protected] server]# RPM-IVH sysstat-7.0.2-3.el5.x86_64. Rpmwarning:sysstat-7.0.2-3.el5.x86_64.rpm:header V3 DSA Signature:nokey, key ID 37017186Preparing ... # # # ######################################## [100%] 1:sysstat ########################################### [100%] [[email protected] server]# RPM-IVH Unixodbc-2.2.11-7.1.i386.rpmwarning:unix Odbc-2.2.11-7.1.i386.rpm:header V3 DSA Signature:nokey, key ID 37017186Preparing ... ##################### ###################### [100%] 1:unixodbc ########################################### [100%][[EMAIL PR Otected] server]# rpm-ivh unixodbc-2.2.11-7.1.x86_64.rpmwarning:unixodbc-2.2.11-7.1.x86_64.rpm:header V3 DSA Signature:nokey, key ID 37017186Preparing ... ########################################### [100%] 1:unixod BC ########################################### [100%][[email protected] server]# RPM-IVH unixODBC-deve L-2.2.11-7.1.x86_64.rpmwarning:unixodbc-devel-2.2.11-7.1.x86_64.rpm:header V3 DSA Signature:nokey, key ID 37017186Preparing ... ########################################### [100%] 1:unixodbc-devel ######## ################################### [100%][[emaIl protected] server]# RPM-IVH unixodbc-devel-2.2.11-7.1.i386.rpmwarning:unixodbc-devel-2.2.11-7.1.i386.rpm: Header V3 DSA Signature:nokey, key ID 37017186Preparing ... ########################################### [10 0%] 1:unixodbc-devel ########################################### [100%]

then there's only one question left, click Ignore.
Then start the installation

At the end of the installation, you will be prompted to execute two scripts:

Execute the two scripts again with the root user.
Note: When the second script executes, it depends on the information returned.

[[email protected] ~]#/u01/app/11.2.0/grid/root.shrunning Oracle 11g root.sh script ... The following environment variables is set as:oracle_owner= ORACLE oracle_home=/u01/app/11.2.0/gridenter the ful   L pathname of the Local bin directory: [/usr/local/bin]: Copying dbhome to/usr/local/bin ...   Copying oraenv To/usr/local/bin ... Copying coraenv To/usr/local/bin ... Creating/etc/oratab file ... Entries'll be added to The/etc/oratab file as needed bydatabase Configuration Assistant when a database is Createdfinis Hed running generic part of root.sh script. Now product-specific root actions would be performed. To configure Grid Infrastructure for a stand-alone Server run the following command as the root User:/u01/app/11.2.0/grid/ Perl/bin/perl-i/u01/app/11.2.0/grid/perl/lib-i/u01/app/11.2.0/grid/crs/install/u01/app/11.2.0/grid/crs/install /roothas.plto Configure Grid Infrastructure for a Cluster perform the following steps:1. Provide values for Grid Infrastructure configuration parameters in the file-/u01/app/11.2.0/grid/crs/install/crsconfig_params. For details on how to does this, see the Installation Guide. 2. Run the following command as the root user:/u01/app/11.2.0/grid/perl/bin/perl-i/u01/app/11.2.0/grid/perl/lib-i/u01/ App/11.2.0/grid/crs/install/u01/app/11.2.0/grid/crs/install/rootcrs.plto Update inventory Properties for grid Infrastructure, perform the followingsteps. If a pre-11.2 home is already configured, execute the Following:11.2_home/oui/bin/runinstaller-updatenodelist-silent-lo Cal Crs=false Oracle_home=pre-11.2_homealways Execute the following to register the current home:11.2_home/oui/bin/ Runinstaller-updatenodelist-silent-local crs=true Oracle_home=11.2_home.if Either HOME is shared, provide the Additiona L ARGUMENT-CFS.

This looks like the second script is done, actually.

Another script is being executed here.
We follow the prompts to execute the script that needs to be executed:

[Email protected] ~]#/u01/app/11.2.0/grid/perl/bin/perl-i/u01/app/11.2.0/grid/perl/lib-i/u01/app/11.2.0/grid/ crs/install/u01/app/11.2.0/grid/crs/install/roothas.pl2015-05-04 14:51:10:checking for Super User  privileges2015-05-04 14:51:10:user has super User privileges2015-05-04 14:51:10:parsing the host nameusing configuration Parameter file:/u01/app/11.2.0/grid/crs/install/crsconfig_paramscreating trace directorylocal ADD MODE Creating OCR Keys for user ' Oracle ', Privgrp ' DBA '. Operation successful. Crs-4664:node localhost successfully pinned. Adding Daemon to inittabcrs-4123:oracle high availability Services have been STARTED.OHASD is Startinglocalhost     2015/0 5/04 14:51:29     /u01/app/11.2.0/grid/cdata/localhost/backup_20150504_145129.olrsuccessfully configured Oracle Grid Infrastructure for a Standalone Server

This is the actual installation done.

V. Installation of database software

We do not have a support account so we cancel this hook.

We choose to install only software

Installing the Single Instance database software

Choose to install the Enterprise version, or many features cannot be used

Then wait patiently for the installation.
Also use the root user to execute the script

[[email protected] u01]#/u01/app/oracle/product/11.2.0/dbhome_1/ root.shrunning Oracle 11g root.sh script ... The following environment variables is set as:oracle_owner= ORACLE oracle_home=/u01/app/oracle/product/11.2.0/db Home_1enter the full pathname of the local bin directory: [/usr/local/bin]:the file "Dbhome" already exists in/usr/local/  Bin. Overwrite it? (y/n) [n]: y Copying dbhome to/usr/local/bin ...  The file "Oraenv" already exists in/usr/local/bin. Overwrite it? (y/n) [n]: y Copying oraenv to/usr/local/bin ...  The file "Coraenv" already exists in/usr/local/bin. Overwrite it? (y/n) [n]: y Copying coraenv to/usr/local/bin ... Entries'll be added to The/etc/oratab file as needed bydatabase Configuration Assistant when a database is Createdfinis Hed running generic part of root.sh script. Now product-specific root actions would be performed. Finished product-specific root actions. You have mail in/var/spool/mail/root 

execution is complete.
The DBCA is built in the back, and can be built on file systems, but since we have a grid, it can also be built on ASM disk groups.

Vi. creation of ASM disk groups

We go into the bin directory of the grid and execute the ASMCA command

Then create an ASM disk group

Specifying ASM Disks

Change the path to our ASM disk to sit in the path

Our ASM disk is under this path

The ASM disk is discovered when the modification is complete.

We name the disk group data and the redundancy mode is external.

Then create ASM

Vii. creating a database on an ASM disk group

Execute DBCA in the bin directory of the database software to build the library

Here we can choose the file system, of course, can also choose ASM



Then specify the ASM disk group that we built

There are no differences between the other steps and the single-instance database repository, and we will not repeat them here.

Step-by-step teaching you to install Oracle 11g Grid + database under Redhat Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.