Installing Oracle Database 11g R2 On Oracle Linux 6
Installing Oracle Database 11g R2 On Oracle Linux 6
3 with ASM
How to install a single instance Oracle Database 11g release 2 with ASM using Oracle Enterprise Linux 6 x86_64 and role separation. In order to setup the environment you will need: The Oracle Database 11g Software (11.2.0.3). The Oracle Grid Infrastructure 11g Software (11.2.0.3). The Oracle Linux 6.3 x86_64 installation CD/ISO. A Virtual Machine/ Server with x86_64 support Here are the details for the VM. Name: oralab1 RAM: 3.5 GB Hostname: oralab1.localdomain Ip: 192.168.10.151/255.255.255.0 gw 192.168.10.1 Nics: 1 bridged adapter Disks: 1 * 54 GB, 3 * 9 GB We are going to make the installation in the following order.
1. Installing and configuring the Operating system. 2. Installing Oracle Grid Infrastructure and ASM. 3. Installing the Database Software and creating the Database. Lets Begin PART I Installing and configuring Oracle Enterprise Linux 6 x86_64 Once you create your VM/Server and downloaded your Linux media, boot your VM/Server to begin the installation.
Next you will be prompted to choose which type of server installation you want. Here I prefer to select a custom installation to select only the packages that i need.
In the next screen select all the required packages that you need, at least include:
Desktop Environment X Server Administration tools Oracle 11g Preinstall package and the AsmLib driver
Once youre done with the packages, click next to begin the installation
When the operating system reboots, you will need to complete the setup as follows
You could create the grid user here. I prefer to do it later, click Forward to continue
Click Finnish
Now you will need to login using the root user. This is because the oracle user created by the Oracle Preinstall package does not have password. Log on and set it up
Edit your hosts file hosts file with your hostname and ip.
Install your virtual box guest additions. This will not be necessary if youre on a physical server or VmWare.
Edit the file /home/grid/.bash_profile and add the following lines to set up the grid user environment
Edit the file /home/oracle/.bash_profile and add the following lines to set up the oracle user environment
Shutdown your system and add the necessary disks to be used as ASM disks. In this case Ill created 3 disks
Startup you system and configure you ASM driver as the root user
1. 2. 3. 4. 5. 6.
Its time to setup the disks. As you saw in the previous screenshot, i have three additional disks named ( /dev/sdb, /dev/sdc, /dev/sdd ) we need to partition each disks in order to make them available for ASM. We will use fdisk to partition them, here is the order youll have to follow. fdisk /dev/sdb n,p,1,1,w fdisk /dev/sdc n,p,1,1,w fdisk /dev/sdd n,p,1,1,w
Lets check again our disks. You will notice that 3 more devices appear, those are the partition we created.
Create your ASM disks as follows oracleam createdisk DISK1 /dev/sdb1 oracleam createdisk DISK2 /dev/sdc1 oracleam createdisk DISK3 /dev/sdd1
At this point we will have our server ready for the grid infrastructure installation.
PART II Installing Oracle Grid Infrastructure 11.2.0.3 and ASM In this installation we will use role separation of duties; we will proceed as the grid user whos going to be the GRID_HOME owner If you have downloaded all the files required, unzip the file p10404530_112030_Linux-x86-64_3of7.zip as follows
After unzipping the file, you will have a folder called grid. Start the installer with ./runInstaler
Create one diskgroup called DATA with disks ( DISK1, DISK2 ) with external redundancy a shown.
Note: 11.0.3 in the path, should be 11.2.3 if you follow OFA or you can choose whatever you want in your ORACLE_HOME path Specify for inventory
If the installer finds that something is not right with your server, it will tell you to run some fixup scripts. Run them as root until your good
During the installation you will prompted to run two scripts a root user, run them to continue
To verify the installation just execute the command crsctl status resource t as grid user
At this point we have our Oracle Restart and ASM in place. PART III Installing the Database Software and creating the Database Now we are going to install the database software as the oracle user. Unzip all the files required as follows
unzip p10404530_112030_Linux-x86-64_1of7.zip
unzip p10404530_112030_Linux-x86-64_2of7.zip
Youll have a folder called database lets get inside and ejecute the oracle installer with ./runInstaller
If you have toy Oracle Support credencials put them in place and continue.
As the installation goes on, you will need to execute a script as the root user
At the end of the installation you will see something like this.
Now lets create our database with dbca. As the oracle user execute the dbca
Select your template, this time were going to select general purpose
Choose the storage for your database. Select ASM and write the name of your diskgroup.
Choose to enable or not archiving and the FRA for you database. This time we are not going to set it up. NOT RECOMMENDED IN PRODUCCTION SYSTEM.
Next review your database storage. You dont really need yo modify anything here.
At the end you will see a summary of the database you just created
Lets verify
Done! We now have a fully functional single database instance using ASM for storage over Oracle Linux 6.