Você está na página 1de 72

Emmanuel's Blog

An Oracle database blog

Installing Oracle Database 11g R2 on Oracle Linux 6.3 with ASM (ENG)
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.

Once the anaconda installer loads up, click next to begin

1
Select your preferred language and keyboard

2
3
Select your type for storage and continue

4
5
Setup your hostname and network interfaces and continue

6
Choose your time zone

7
Choose your root password

8
Select your type of installation and continue.

9
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.

10
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

11
Once you’re done with the packages, click next to begin the installation

12
13
14
Click reboot to finish

15
When the operating system reboots, you will need to complete the setup as follows

16
17
18
You could create the grid user here. I prefer to do it later, click Forward to continue

19
Select your time to continue

20
Click Finnish

21
Now you will need to login using the root user. This is because the oracle user created by
theOracle Preinstall package does not have password. Log on and set it up

22
23
Disable the firewall. Go System/Administration/Firewall

24
Depending on your environment edit your network interface as follows.

25
26
Edit your hosts file hosts file with your hostname and ip.

27
Reload your network as follows

28
Install your virtual box guest additions. This will not be necessary if you’re on a physical server or
VmWare.

Create the necessary directories and the grid user.

Set the necessary permissions

29
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

30
Shutdown your system and add the necessary disks to be used as ASM disks. In this case I’ll
created 3 disks

Startup you system and configure you ASM driver as the root user

31
Check if your disks are available

It’s 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 you’ll have to follow.
1. fdisk /dev/sdb
2. n,p,1,1,w
3. fdisk /dev/sdc
4. n,p,1,1,w
5. fdisk /dev/sdd

32
6. n,p,1,1,w
Here is how it looks like:

Let’s check again our disks. You will notice that 3 more devices appear, those are the partition we
created.

33
Next let’s disable SELinux as follows ‘vi /etc/selinux/config’

Create your ASM disks as follows

oracleam createdisk ‘DISK1′ /dev/sdb1

oracleam createdisk ‘DISK2′ /dev/sdc1

oracleam createdisk ‘DISK3′ /dev/sdd1

34
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 who’s
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

Skip the software updates

35
Select the option for a standalone server as shown in the picture

36
Select you languages

Create one diskgroup called DATA with disks ( DISK1, DISK2 ) with external redundancy a shown.

37
Specify a password for sys and asmsnmp accounts

38
Leave the default groups and continue

Choose the paths to de ORACLE_BASE and ORACLE_HOME

39
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

40
Specify for inventory

41
Next the installer will perform a check on your server as shown

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

42
Once ready continue with the installation

43
During the installation you will prompted to run two scripts a root user, run them to continue

44
After the installation ends click close to finnish

To verify the installation just execute the command “crsctl status resource –t” as grid user

And with sqlplus

45
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

You’ll have a folder called “database” let’s get inside and ejecute the oracle installer with
“./runInstaller”

46
If you have toy Oracle Support credencials put them in place and continue.

Skip Sofware updates if you want and continue

47
Select install software only and continue

48
Select Single instance Database installation and continue

Select your language and continue

49
Select enterprise Edition or the one you prefer and continue

50
Choose your ORACLE_BASE and ORACLE_HOME

Review your installation and click install to proceed

51
As the installation goes on, you will need to execute a script as the root user

52
At the end of the installation you will see something like this.

53
Now let’s create our database with dbca. As the oracle user execute the dbca

Select create a database

54
Select your template, this time we’re going to select general purpose

Write your Global database name and sid

55
Choose to configure the enterprise manager

Write in the passwords for the administrative users

56
Choose the storage for your database. Select ASM and write the name of your diskgroup.

Specify your asm credentials

57
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.

Adjust your memory settings as you want or leave the defaults

58
Next review your database storage. You don’t really need yo modify anything here.

On the summary screen click “OK” to begin the creation of the database

59
60
At the end you will see a summary of the database you just created

Let’s verify

61
62
Done! We now have a fully functional single database instance using ASM for storage over Oracle
Linux 6.

Good Luck!

Emmanuel
Share this:

 Twitter
 Facebook2

Related
Installing Oracle 11g R2 (11.2.0) on Oracle Linux 5.4 (ENG)In "Database 11g"
Installing Oracle RAC 10g R2 on Oracle Linux 5.6 x86_64 using Virtual Box (ENG)In
"Database 10g"
Moving an Oracle database from filesystem to ASM (ENG)In "Database 11g"

Categories:Database 11g, Installation GuidesTags:ASM, oracle database 11g

Comments (30) Trackbacks (0) Leave a commentTrackback

63
1.

p3p3

September 10, 2012 at 7:13 am


Reply

The Oracle Database 11g Software (11.2.0.3) isn’t free, you will need the support license to
download.

o
Emmanuel
September 10, 2012 at 11:02 am
Reply

You are right. If you dont have a support licence you can use the 11.2.0.1(2)

2.
Pierre Boizot
October 25, 2012 at 8:29 am
Reply
Hi Emmanuel,
Why don’t have used asmlib ?
with the discovering path “ORCL:*”
Pierre

o
Emmanuel
October 25, 2012 at 11:57 am
Reply

Hi Pierre,

You can use orcl:* in the discovery path as well. I just like to use the default path where
ASMLIB create the disks.

Regards.

3.
Pierre Boizot
October 25, 2012 at 8:30 am
Reply
Have you try to use ADVM/ACFS ?
Pierre

o
Emmanuel
October 25, 2012 at 12:05 pm
Reply

Yes,

In order to prepare for the 1z0-058 you must have a good understanding of ADVM and ACFS.
By the way, i’m working in a tutorial to make a cold failover single instance database. We’ll
make use of some of that.

Regards.

64
4.

dingga fatih bahtera dp

February 28, 2013 at 12:19 am


Reply

Hi emmanuel,
I’ve finished istalled ASM (11.2.0.3), but when I tried installing oracle database, I can’t install the
oracle database 11g R2, here is the output:
===========
[oracle@bahteralab ~]$ cd database/
[oracle@bahteralab database]$ ./runInstaller
You do not have sufficient permissions to access the inventory ‘/u01/app/oraInventory’. Installation
cannot continue. It is required that the primary group of the install user is same as the inventory
owner group. Make sure that the install user is part of the inventory owner group and restart the
installer.: Permission denied
[oracle@bahteralab database]$
=========
any impact to ASM if I change the owner “/u01/app/oraInventory” from to owner grid to be owner
oracle?
I need your help to resolve this error.

Many Thanks,

o
Emmanuel
February 28, 2013 at 4:41 pm
Reply

Hi Dingga

Changing the owner of the inventory will not cause any problems to the existing installation.
you could do it with chown oracle:oinstall. Before doing that make sure that oracle is part of
the dba/oinstall group. It’s strange that you are facing that issue if you changed the
ownership to grid:oinstall when installing the clusterware.

Regards.

dingga

March 1, 2013 at 4:12 am

Hi Emmanuel,
The problem has been solved after I executed the command usermod -g oinstall -G
dba,asmdba,oper oracle.
Installation oracle database 11g has been finished.
but I found the new issue after I execute command
create SPFILE from PFILE, below is the output:
====
SQL> create SPFILE from PFILE=’/u01/app/oracle/product/11.0.3/db1/dbs/init.ora';

File created.

65
SQL> startup nomount
ORA-48108: invalid value given for the diagnostic_destinit.ora parameter
ORA-48140: the specified ADR Base directory does not exist
[/u01/app/oracle/product/11.0.3/db1/dbs/]
ORA-48187: specified directory does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 1
==========
could you please help me to resolve the issue?

Thanks.

5.

dingga

March 1, 2013 at 4:57 am


Reply

Hi Emmanuel,
The issue start up has been solved, but I can’t create the database,
========================
SQL> oracle@bahteralab ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Mar 1 15:54:05 2013

Copyright (c) 1982, 2011, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> startup nomount
ORACLE instance started.
Total System Global Area 567869440 bytes
Fixed Size 2230392 bytes
Variable Size 171968392 bytes
Database Buffers 390070272 bytes
Redo Buffers 3600384 bytes
SQL>
SQL> CREATE DATABASE orcl;
CREATE DATABASE orcl
*
ERROR at line 1:
ORA-01501: CREATE DATABASE failed
ORA-00200: control file could not be created
ORA-00202: control file: ‘+DATA/orcl/controlfile/current.260.808585161′
ORA-17502: ksfdcre:4 Failed to create file
+DATA/orcl/controlfile/current.260.808585161
ORA-15046: ASM file name ‘+DATA/orcl/controlfile/current.260.808585161′ is not
in single-file creation form
SQL>
===========

could you please help me?

Thanks,

66
o
Emmanuel
March 1, 2013 at 7:33 am
Reply
Hi
You could be missing something in the create database command. Why dont you use dbca to
create de database.?

6.

Formiga

March 11, 2013 at 8:20 am


Reply
Hi.
Very good this post.
One important question: I need GRID CONTROL. But you are showing DATABASE CONTROL. But in
PART II – Installing Oracle Grid Infrastructure 11.2.0.3 and ASM, you talk about GRID. I done all
listed here. But , at the end, I have DATABASE CONTROL running. How to change this to GRID
CONTROL ?
Thanks.
Formiga

o
Emmanuel
March 11, 2013 at 1:31 pm
Reply

Oracle Grid Control is a different product that needs to be installed on its own. It is ease to
confuse it with database control because the interface is very similar ( versions 10g & 11g )
but is not the same thing.
You should check it out here:http://www.oracle.com/technetwork/oem/grid-
control/downloads/index.html

DBAs usually call GRID, CRS and Clusterware to the ASM + Clusterware component of the
database server. Another thing common is to create a grid user to be the owner of those
components as well.

Regards.

7.
Emmanuel
June 13, 2013 at 6:50 pm
Reply

That seems to be some missing packages. Did you installed the oracle preinstall package as shown
in the tutorial?

Dev

June 13, 2013 at 11:26 pm


Reply

67
I missed that step since i had already installed the OS and was looking for document to install
ASM and found your forum and started installing directly. Can we install the package now ?
What is the exact name of package


Emmanuel
June 14, 2013 at 10:47 am
The name is: oracle-rdbms-server-11gR2-preinstall
you could find more info:http://www.oracle.com/technetwork/articles/servers-
storage-admin/ginnydbinstallonlinux6-1845247.html

dev

June 17, 2013 at 3:44 pm


HI Emmanuel
I installed the package referred by you but still i see the same error. Could you
please let me know what to do next.

8.

Dev

June 13, 2013 at 10:57 pm


Reply

Hi Emmanuel
Thanks for the detailed document. It is very helpful.
I am stuck at a point while installing database. When i select the storage type as ASM and enter
the disk name as +DATA and hit next it giving me an error as below.
can not use ASM for database storage due to following reason: could not connect to asm due to
following error ora-01031: insufficient privilege.
Could you please help me out of this.

o
Emmanuel
June 14, 2013 at 10:45 am
Reply

Did you installed ASM with another user?

dev

June 17, 2013 at 3:43 pm


HI Emmanuel
Sorry for the late reply.
I Installed GRID and ASM i.e. PART II in the above steps as grid user and the oracle
software as oracle user.

9.

68
Dev

June 13, 2013 at 11:15 pm


Reply

I missed that step since i had already installed the OS and was looking for document to install ASM
and found your forum and started installing directly. Can we install the package now ? What is the
exact name of package

10.

lonelymoon

June 14, 2013 at 7:28 pm


Reply
Hi,
Yes i have already install it and still get the same error :( :(

please can you test the installation with oracle 6.4 to see the error that i get?

please i really need your help

o
Emmanuel
June 14, 2013 at 7:40 pm
Reply

It should install pretty well if you follow the steps from the beginning. I believe there are
mayor changes in 6.3. I’ll try it. And let you know.

11.

lonelymoon

June 14, 2013 at 8:55 pm


Reply
Thank you so much for your time…ill be very happy if it works for me :)

Please,note also the customes packages that you will choose when installing oracle 6.4 .as so ill do
the some steps like you.
Thank you (and sorry for my english ;)

o
Emmanuel
June 15, 2013 at 12:45 am
Reply

Honestly, I did not understand. Do you mean If I know that package name?

12.

lonelymoon

June 15, 2013 at 2:02 am


Reply

sorry… what i mean thats when u’ll install oracle 6.,let me know what exactly you gonna choose in
“costumes package” in order to do like you

69
13.

Rob Sandier

June 26, 2013 at 11:35 am


Reply

Hello Emmanuel,

First, thank you for creating such a fine and very helpful blog. This is truly a Godsend for people
like my wife and myself who are Oracle newbies and wondering how to get started. We are both
enrolled in Oracle classroom taught classes and are working our way through this and recognized
early on that the only way we are going to truly be able to learn Oracle db and get certified so that
we can work in the field is to install oracle on a home PC so that we can work all of the labs and
classroom exercises. I do have a couple of questions that I am hoping you can help me with. You
said up above at the beginning:

“In order to setup the environment you will need:


The Oracle Database 11g Software (11.2.0.3). LINK
The Oracle Grid Infrastructure 11g Software (11.2.0.3). LINK
The Oracle Linux 6.3 x86_64 installation CD/ISO. LINK
A Virtual Machine/ Server with x86_64 support”

We do not have a virtual machine. Instead, we bought a new PC and we plan on installing Oracle
Linux 6.4 on it. My question is this: Will we be able to do this (install Oracle linux 6.4 on a new PC
using the guidelines you outline for version 6.3?) Thank you so much for reading this and I do look
forward to your reply!

Rob

o
Emmanuel
June 26, 2013 at 12:24 pm
Reply

Yes you can. Just follow the same steps and avoid the part of creating the vm. Remember
that a vm is just like a pc or server but with virtual hardware.

14.

wxsia

October 23, 2013 at 3:34 pm


Reply

million thanks & appreciate for sharing such a good article/tutorial =)

15.
more info
March 9, 2014 at 11:35 pm
Reply
Usually I do not learn afticle on blogs, but I would like to say that this write-up very pressured me
to
try and doo so! Your writing style has been surprised me.
Thanks, quite nice article.

Leave a Reply

70
Moving an Oracle database from filesystem to ASM (ENG)How to resolve Error 1418 SqlServer
2005 database mirroring (ENG)
RSS feed








Recent Posts
 The twelve DBA rule of thumb.
 Oaktable World 2013
 11.2.0.4 patch set
 Becoming OCM
 Oracle database 12c OCP Upgrade Exam Topics
Categories
 Certification (5)
 Database 10g (1)
 Database 11g (9)
 Database 9i (1)
 Dataguard (1)
 Installation Guides (5)
 Linux (9)
 RAC (3)
 SqlServer (1)
 Uncategorized (3)
 VirtualBox (1)
 VMware (1)

ASM Certification Database upgrade Dataguard Error 1418 LinuxOracle


Database oracle database
oracle database 10g

11g Oracle database 12c Oracle RAC Oracle Linux Oracle MMA OWW13 Solaris Suse
LinuxVirtualBox VMware Webcast
Archives
 February 2014
 October 2013
 August 2013
 July 2013
 June 2013
 March 2013
 February 2013
 October 2012
 September 2012
 August 2012
 July 2012

71
Join 128 other followers

Sign me up

Build a website with WordPress.com

72

Você também pode gostar