Anda di halaman 1dari 42

ASM Installation on LINUX

March 2009

Automatic Storage Management Industry's first and only database file system

Author: Esteban Bernal

ASM Installation On LINUX


General Architecture

Automatic Storage Management is part of the database kernel. One portion of the Automatic Storage Management code allows for the startup of a special instance called an ASM instance. ASM instances do not mount databases, but instead manage the metadata needed to make ASM files available to ordinary database instances. Both ASM instances and database instances have access to a common set of disks called disk groups. Database instances access the contents of ASM files directly, communicating with an ASM instance only to obtain information about the layout of these files. .

Author: Esteban Bernal

ASM Installation On LINUX


Oracle Database 11g Installation: Changes
During an Oracle Database 11g installation, you will notice several changes to the installation process. These changes include standard database out-of-box memory calculations, character set determination, support for the new SYSASM role, and a corresponding operating system privileges group (OSASM) that is intended to secure privileges to perform ASM administration tasks. .

Author: Esteban Bernal

ASM Installation On LINUX


1) Downloading the 11g RDBMS Software.
You need either the DVDs or a downloaded version of the DVDs. You can download the Oracle Software from:
http://www.oracle.com/technology/software/products/database/index.html

Author: Esteban Bernal

ASM Installation On LINUX


2) Decompressing the Oracle Software.
After the software is downloaded you will need to decompress it as follow: .

Author: Esteban Bernal

ASM Installation On LINUX


3) Checking the Hardware Requirements.
1) At least 1 GB of RAM 2) Swap Area needs to be set as follow:
If RAM = 1024MB to 2048Mb then 1.5 times RAM elseif RAM > 2048MB and < 8192MB then match RAM else RAM > 8192MB then .75 times RAM

. 3) Between 150 and 200 MB of disk space in the /tmp directory

Author: Esteban Bernal

ASM Installation On LINUX


4) Disk Space Requirements: Enterprise Edition 3.47 GB Standard Edition 3.22 GB Custom 3.45 GB

Author: Esteban Bernal

ASM Installation On LINUX


4) Checking the Software Requirements.
1) Operating Systems:
Asianux 2.0 Asianux 3.0 Oracle Enterprise Linux 4.0 Oracle Enterprise Linux 5.0 Red Hat Enterprise Linux 4.0 Red Hat Enterprise Linux 5.0 SUSE Linux Enterprise Server 10.0

2) Kernel Requirements:
On Asianux 2.0, Oracle Enterprise Linux 4.0, and Red Hat Enterprise Linux 4.0: 2.6.9 On Asianux 3.0, Oracle Enterprise Linux 5.0, and Red Hat Enterprise Linux 5.0: 2.6.18 On SUSE Linux Enterprise Server 10: 2.6.16.21 Author: Esteban Bernal 8

ASM Installation On LINUX

Author: Esteban Bernal

ASM Installation On LINUX


3) Package Requirements:
http://download.oracle.com/docs/cd/B28359_01/install.111/b32002/pre_install.htm#i1011296 http://download.oracle.com/docs/cd/B28359_01/install.111/b32002/pre_install.htm#i1011296

Author: Esteban Bernal

10

ASM Installation On LINUX


4) Oracle Installation Owner Shell Limits: Add the following lines to /etc/profile to set shell limits for the user oracle:
umask 022 if [ \$USER = "oracle" ]; then if [ \$SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536

Author: Esteban Bernal

11

ASM Installation On LINUX


6) Kernel Parameters: a) Edit the /etc/sysctl.conf and add the next kernel parameters:
fs.file-max = 512 * PROCESSES kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 4194304 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 262144 net.ipv4.tcp_wmem = 262144 262144 262144 net.ipv4.tcp_rmem = 4194304 4194304 4194304

Author: Esteban Bernal

12

ASM Installation On LINUX


6) Kernel Parameters: b) Reboot the Linux box or enter the following command to apply the changes for the kernel parameters:
# /sbin/sysctl -p

c) Then verify the new values:


# /sbin/sysctl -a

Author: Esteban Bernal

13

ASM Installation On LINUX


7) Shell Limits for the oracle User: a) Add the following lines to the /etc/security/limits.conf file:
oracle oracle oracle oracle soft nproc 2047 hard nproc 16384 soft nofile 1024 hard nofile 65536

b) Add or edit the following line in the /etc/pam.d/login file:


session required pam_limits.so

Author: Esteban Bernal

14

ASM Installation On LINUX


7) Shell Limits for the oracle User: c) Make the following changes to the default shell start-up file:
c1) For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file:
if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi

Author: Esteban Bernal

15

ASM Installation On LINUX


7) Shell Limits for the oracle User:
c2) For the C shell, add the following lines to the /etc/csh.login file:
( $USER == "oracle" ) then limit maxproc 16384 limit descriptors 65536 endif

Author: Esteban Bernal

16

ASM Installation On LINUX


8) Creating Operating System Groups and Users:
The following operating system groups and user are required if you are installing Oracle Database:
The OSDBA group (dba dba): You must create this group the first time you install Oracle dba Database software on the system. It identifies operating system user accounts that have database administrative privileges (the SYSDBA privilege). The default name for this group is dba. Oracle Universal Installer prompts you to specify this group name. If software owner is a member of the group dba, then Oracle Universal Installer defaults the OSDBA setting to dba. However, you can also choose a different operating system group if required. The OSOPER group (oper oper): This is an optional group. Create this group if you want a oper separate group of operating system users to have a limited set of database administrative privileges (the SYSOPER privilege). By default, members of the OSDBA group also have the SYSOPER privilege. In this case, Oracle Universal Installer prompts you to specify the name of this group. The usual name chosen for this group is oper.

Author: Esteban Bernal

17

ASM Installation On LINUX


8) Creating Operating System Groups and Users:
The OSASM group (asmadmin): This feature introduces a new SYSASM privilege that is specifically intended for performing Automatic Storage Management administration tasks. Using the SYSASM privilege instead of the SYSDBA privilege provides a clearer division of responsibility between Automatic Storage Management administration and database administration. OSASM is a new operating system group that is used exclusively for Automatic Storage Management. Members of the OSASM group can connect as SYSASM using operating system authentication and have full access to Automatic Storage Management. The usual name chosen for this group is asmadmin. The Oracle Inventory group (oinstall): You must have a group whose members are given access to write to the Oracle Central Inventory (oraInventory). The Central Inventory contains the following: =)> A registry of the Oracle home directories ( Oracle Database, and Automatic Storage Management) on the system. =)> Installation logs and trace files from installations of Oracle software. These files are also copied to the respective Oracle homes for future reference.

Author: Esteban Bernal

18

ASM Installation On LINUX


8) Creating Operating System Groups and Users:
The Oracle software owner user (oracle): You must create this user the first time you install Oracle software on the system. This user owns all of the software installed during the installation. This user must have the Oracle Inventory group as its primary group (oinstall). It must also have the OSDBA and OSOPER groups as secondary groups.

Author: Esteban Bernal

19

ASM Installation On LINUX


Creating the Oracle Inventory Group
# /usr/sbin/groupadd oinstall

Creating the Oracle OSDBA Group


# /usr/sbin/groupadd dba

Creating the Oracle OSASM Group


# /usr/sbin/groupadd asmadmin

Creating the Oracle OSOPER Group


# /usr/sbin/groupadd oper

Creating the Oracle Database Software Owner


#/usr/sbin/useradd -g oinstall -G dba,oper,asmadmin oracle

Creating the Oracle ASM Software Owner


#/usr/sbin/useradd -g oinstall -G dba,oper,asmadmin osasm
Author: Esteban Bernal 20

ASM Installation On LINUX

Author: Esteban Bernal

21

ASM Installation On LINUX


9) Creating the Oracle Base Directory: To create the Oracle base directory and specify the correct owner, group, and permissions for it, enter the following commands:
# mkdir -p /mount_point/app # chown -R oracle:oinstall /mount_point/app # chmod -R 775 /mount_point/app/ Example: #mkdir -p /u01/app/oracle #chown -R oracle:oinstall /u01/app/oracle #chmod -R 775 /u01/app/oracle

Author: Esteban Bernal

22

ASM Installation On LINUX


10) Creating the Oracle ASM Home Directory: To create the Oracle ASM Home directory and specify the correct owner, group, and permissions for it, enter the following commands:
#mkdir -p /u01/app/oracle/11.1/asm #chown -R osasm:oinstall /u01/app/oracle/11.1/asm #chmod -R 775 /u01/app/oracle/11.1/asm

11) Creating the Oracle Database Home Directory: To create the Oracle Database Home directory and specify the correct owner, group, and permissions for it, enter the following commands:
#mkdir -p /u01/app/oracle/11.1/db #chown -R oracle:oinstall /u01/app/oracle/11.1/db #chmod -R 775 /u01/app/oracle/11.1/db

Author: Esteban Bernal

23

ASM Installation On LINUX

Author: Esteban Bernal

24

ASM Installation On LINUX


12) Setting the environment variables for the ASM OS user:
export ORACLE_SID=+ASM export ORACLE_HOME=/u01/app/oracle/11.1/asm export ORACLE_BASE=/u01/app/oracle export PATH=$ORACLE_HOME/bin:.:$PATH:$HOME/sh

13) Setting the environment variables for the DB OS user :


export ORACLE_SID=DBASM export ORACLE_HOME=/u01/app/oracle/11.1/db export ORACLE_BASE=/u01/app/oracle export PATH=$ORACLE_HOME/bin:.:$PATH:$HOME/sh

Author: Esteban Bernal

25

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
a) Change directory to the database directory and enter the following
command to execute the Oracle Universal Installer OUI:

Author: Esteban Bernal

26

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
b) Select Advanced Installation, then press Next button:

Author: Esteban Bernal

27

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
c) Specify the Oracle Inventory location and OS group , then press
Next button:

Author: Esteban Bernal

28

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
d) Select the installation type: Enterprise Edition, then press Next
button:

Author: Esteban Bernal

29

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
e) Verify the Install Location, then press Next button:

Author: Esteban Bernal

30

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
f) Verify the Pre requisites, then press Next button:

Author: Esteban Bernal

31

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
g) Select Configuration Option Configure ASM, then press Next
button:

Author: Esteban Bernal

32

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
h) Specify Diskgroups characteristics, then press Next button:

Author: Esteban Bernal

33

ASM Installation On LINUX


5) Installing the ASM Oracle Home.

Author: Esteban Bernal

34

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
i) Finally press Install button:

Author: Esteban Bernal

35

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
j) Monitor the installation progress:

Author: Esteban Bernal

36

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
k) Running the orainstRoot.sh & root.sh scripts:

Author: Esteban Bernal

37

ASM Installation On LINUX


5) Installing the ASM Oracle Home.

Author: Esteban Bernal

38

ASM Installation On LINUX


5) Installing the ASM Oracle Home.

Author: Esteban Bernal

39

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
l) Configuration Assistance (NETCA & DBCA):

Author: Esteban Bernal

40

ASM Installation On LINUX


5) Installing the ASM Oracle Home.
m) Installation has been completed:

Author: Esteban Bernal

41

ASM ON LINUX

Questions

Author: Esteban Bernal

42

Anda mungkin juga menyukai