RHEL6 ASM installation of Oracle 11g R2 tutorial directory:
I. Preparations before installation
Ii. Install the grid infrastructure
3. Install database software
4. Create a listener
5. Create a database instance
I. Preparations before installation
1.1 determine the Operating System Environment
# Cat/etc/RedHat-release
Red Hat Enterprise Linux Server release 6.2 (Santiago)
Kernel \ r on an \ m
# Free-m
Total used free shared buffers cached
Mem: 2008 1309 699 0 62 875
-/+ Buffers/cache: 371 1637
Swap: 509 0 509
# Fdisk-l
Disk/dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1*1 5 40131 83 Linux
/Dev/sda2 6 2172 17406427 + 8e Linux LVM
/Dev/sda3 2173 2237 522112 + 82 Linux swap/Solaris
/Dev/sda4 2238 3916 13486567 + 5 Extended
/Dev/sda5 2238 2542 2449881 83 Linux
/Dev/sda6 2543 2847 2449881 83 Linux
/Dev/sda7 2848 3152 2449881 83 Linux
/Dev/sda8 3153 3457 2449881 83 Linux
/Dev/sda9 3458 3765 3077120 83 Linux
# Df-h
Filesystem Size Used Avail Use % Mounted on
/Dev/mapper/Vol0-root
7.6 GB 3.2G 4.1G 41%/
/Dev/mapper/Vol0-oracle
8.6G 101 M 747 M 1%/u01
/Dev/sda1 38 M 16 M 21 M 42%/boot
Tmpfs 1005 M 0 1005 M 0%/dev/shm
If the 1 GB memory requirement is not met, the installation will not be very affected, but a "friendly warning" message will be received before the installation starts.
The general law of the relationship between Swap zone size and physical memory size is as follows:
- If the physical memory is between 1 GB and 2 GB, we recommend that the Swap allocate 1.5 times the physical memory size;
- If the physical memory is between 2 GB and 16 GB, we recommend that the Swap be consistent with the physical memory size;
- If the physical memory is more than 16 GB, it is recommended that the Swap size be 16 GB.
This method is only used for testing. Therefore, only MB of swap space is allocated. Warnings can be ignored.
In Oracle 11gR2, ASM must install Grid Infrastructure separately. In addition, with the installation of database software, the required disk size generally does not exceed 8 GB, therefore, ensure that the available space of the file system in the/u01 directory is more than 8 GB.
The database files will be stored in the ASM mode. Here we use four raw partitions of GB for the active database files + the ASM disk of DATA, one 3g raw partition is used for the ASM disk group in the Flash recovery zone + FRA.
During the installation process, some data is written to the "/tmp" directory. We recommend that the file system space of this directory be smaller than 1 GB.
1.2 configure network parameters
# Cat/etc/sysconfig/network
NETWORKING = yes
NETWORKING_IPV6 = no
HOSTNAME = ora11g.vnimos.org
# Service NetworkManager stop
# Chkconfig NetworkManager off
# Cat/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = eth0
BOOTPROTO = static
HWADDR = 00: 0C: 29: 32: C3: 9C
IPADDR = 192.168.0.90
NETMASK = 255.255.255.0
ONBOOT = yes
# Cat/etc/hosts
127.0.0.1 localhost. localdomain localhost
192.168.0.90 ora11g.vnimos.org ora11g
// It must contain at least two or three columns (long and short IP addresses). Otherwise, the "Oracle Net Configuration Assistant failed" error will occur during installation.
1.3 configure oracle user environment variables and System Parameters
# Groupadd oinstall
# Groupadd dba
# Useradd-g oinstall-G dba, root oracle
# Echo "oracle" | passwd -- stdin oracle
# Mkdir-p/u01/app/{oracle, oraInventory}
# Chown oracle: oinstall/u01/app/oracle
# Chown oracle: oinstall/u01/app/oraInventory
# Vi/home/oracle/. bash_profile
Export ORACLE_BASE =/u01/app/oracle
Export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/dbhome_1
Export ORACLE_SID = orcl
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib
Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/lib:/usr/X11R6/lib
Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: $ ORACLE_HOME/rdbms/lib
Export CLASS_PATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib
Export CLASS_PATH = $ CLASS_PATH: $ ORACLE_HOME/rdbms/jlib
Export CLASS_PATH = $ CLASS_PATH: $ ORACLE_HOME/network/jlib
Export TNS_ADMIN = $ ORACLE_HOME/network/admin
Export NLS_LANG = american_america.AL32UTF8
Export ORACLE_TERM = xterm
Export EDITOR = vi
Export PATH = $ ORACLE_HOME/bin: $ PATH
Export LANG = en_US
# Vi/etc/sysctl. conf
Kernel. shmmax = 1073741824 // half of the physical memory (bytes)
# Sysctl-p
1.4 bind a bare device (used to create an ASM disk group. For more information, see :)
# Fdisk-l
Disk/dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1*1 5 40131 83 Linux
/Dev/sda2 6 2172 17406427 + 8e Linux LVM
/Dev/sda3 2173 2237 522112 + 82 Linux swap/Solaris
/Dev/sda4 2238 3916 13486567 + 5 Extended
/Dev/sda5 2238 2542 2449881 83 Linux
/Dev/sda6 2543 2847 2449881 83 Linux
/Dev/sda7 2848 3152 2449881 83 Linux
/Dev/sda8 3153 3457 2449881 83 Linux
/Dev/sda9 3458 3916 3686886 83 Linux
# Vi/etc/sysconfig/rawdevices
/Dev/raw/raw5/dev/sda5
/Dev/raw/raw6/dev/sda6
/Dev/raw/raw7/dev/sda7
/Dev/raw/raw8/dev/sda8
/Dev/raw/raw9/dev/sda9
# Chmod + x/etc/rc. d/init. d/rawdevices
# Chkconfig -- add rawdevices
# Chkconfig rawdevices on
# Service rawdevices start
Assigning devices:
/Dev/raw/raw5 -->/dev/sda5
/Dev/raw/raw5: bound to major 8, minor 5
/Dev/raw/raw6 -->/dev/sda6
/Dev/raw/raw6: bound to major 8, minor 6
/Dev/raw/raw7 -->/dev/sda7
/Dev/raw/raw7: bound to major 8, minor 7
/Dev/raw/raw8 -->/dev/sda8
/Dev/raw/raw8: bound to major 8, minor 8
/Dev/raw/raw9 -->/dev/sda9
/Dev/raw/raw9: bound to major 8, minor 9
Done
# Raw-qa
/Dev/raw/raw5: bound to major 8, minor 5
/Dev/raw/raw6: bound to major 8, minor 6
/Dev/raw/raw7: bound to major 8, minor 7
/Dev/raw/raw8: bound to major 8, minor 8
/Dev/raw/raw9: bound to major 8, minor 9