Install asm + grid + oracle11gR2 in the redhat5.8x86 _ 64-bit system,
The basic requirements of the system are as follows:
4 GB memory
Swap: 4G
Memory: 2 GB (at least 1.5)
1. System Environment
[Root @ liuxuan ~] # First thing after installing the system: chkconfig sendmail off accelerates startup
[Root @ liuxuan ~] # Chkconfig sendmail off
[Root @ liuxuan ~] # Change the relationship between the Server ip address and the computer name
[Root @ liuxuan ~] # Note that the 127 localhost record must exist and cannot be modified
[Root @ liuxuan ~] # Vi/etc/hosts
# Do notremove the following line, or various programs
# Thatrequire network functionality will fail.
127.0.0.1 liuxuan localhost. localdomainlocalhost
: 1 localhost6.localdomain6 localhost6
# Do notremove the following line, or various programs
# Thatrequire network functionality will fail.
"/Etc/hosts" 5L, 216C written
[Root @ liuxuan ~] # Cat/etc/hosts
# Do notremove the following line, or various programs
# Thatrequire network functionality will fail.
127.0.0.1 localhost. localdomain localhost
: 1 localhost6.localdomain6 localhost6
192.168.1.106 liuxuan
1.2 # Check ssh
[Root @ liuxuan ~] # Rpm-aq | grep ssh
Openssh-4.3p2-82.el5
Openssh-askpass-4.3p2-82.el5
Openssh-clients-4.3p2-82.el5
Openssh-server-4.3p2-82.el5
1.3 # Check swap and storage
[Root @ liuxuan ~] # Free
Total used free shared buffers cached
Mem: 2074968 506180 1568788 0 29764 324860
-/+ Buffers/cache: 151556 1923412
Swap: 4192956 0 4192956
1.4 ### Add: shmfs/dev/shm tmpfs size = 10g 0
[Root @ liuxuan ~] # Vi/etc/fstab
# Check the version
1.5 [root @ liuxuan ~] # Uname-rm
2.6.18-308. el5 i686
1.6 # Check package
Rpm-qa | grep binutils
Rpm-qa | grep compat-libstdc
Rpm-qa | grep elfutils
Rpm-qa | grep ksh
Rpm-qa | grep gcc
Rpm-qa | grep gcc-c ++
.....
Check the system patch packages to be installed in the official website manual.
Binutils-2.17.50.0.6
Compat-libstdc ++-33-3.2.3
Compat-libstdc ++-33-3.2.3 (32 bit)
Elfutils-libelf-0.125
Elfutils-libelf-devel-0.125
Gcc-4.1.2
Gcc-c ++-4.1.2
Glibc-2.5-24
Glibc-2.5-24 (32 bits)
Glibc-common-2.5
Glibc-devel-2.5
Glibc-devel-2.5 (32 bits)
Glibc-headers-2.5
Ksh-20060214
Libaio-0.3.106
Libaio-0.3.106 (32 bits)
Libaio-devel-0.3.106
Libaio-devel-0.3.106 (32 bits)
Libgcc-4.1.2
Libgcc-4.1.2 (32 bits)
Libstdc ++ 4.1.2
Libstdc ++-4.1.2 (32 bit)
Libstdc ++-devel 4.1.2
Make-3.81
Sysstat-7.0.2
UnixODBC-2.2.11 (32 bits) or later
UnixODBC-devel-2.2.11 (64 bits) or later
UnixODBC-2.2.11 (64 bits) or later
It is found that the unixODBC package does not exist. It must be installed using yum or-nodeps forced installation.
Yum-y install unixODBC
Attach an image disc:
# Mount/dev/cdrom/mnt/
# Virhel-debuginfo.repo
Rhel-debuginfo]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-Debug
Baseurl = file: // mnt/Server
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Rhel-debuginfo]
There are six unixODBC packages, but only four packages will be installed during the first execution. So if there are four, execute yum-y install unixODBC again.
You will find that these two packages do not exist. It doesn't matter if you search in the CD image and install rpm-ivh on the server to which they are uploaded.
1.7 install the asm driver package,
These two packages are the asm driver packages. They were originally three, but they were not found on the oracle official website. Baidu did not find any kernel packages corresponding to the current version.
So simply do not install the kernel package, do not create an asm disk, just install the above two. Use the attached disk partition as a raw device:
Step: We recommend that you use asmlib to create an asm disk group. In fact, we recommend that you do not use asmlib because you can recognize bare devices when creating asm in a grid, then why do we have to wear clothes on bare devices.
(1) Partition
View physical hard disk fdisk-l
Fdisk/dev/sdb
N
P
Enter
Enter
W
# Partprobe/dev/sdb takes effect
Repeat each disk. I will use five disks as an example.
(2) Configure/etc/sysconfig/rawdevices. For an example, refer
[Root @ liuxuan ~] # Vi/etc/sysconfig/rawdevices
# Raw device bindings
# Format:
#
# Example:/dev/raw/raw1/dev/sda1
#/Dev/raw/raw2 8 5
# Ocr
/Dev/raw/raw1/dev/sdb
/Dev/raw/raw2/dev/sdc
/Dev/raw/raw3/dev/sdd
/Dev/raw/raw4/dev/sde
/Dev/raw/raw5/dev/sdf
Note: On the 2.6 kernel Red Hat Linux, when the system is restarted, the group information of the bare device will be restored to the default value of the system (root: disk ). To keep bare device group information. d/rc. add the following content to the file:
[Root @ liuxuan ~] # Cat/etc/rc. d/rc. local
#! /Bin/sh
#
# This script will be executed * after * all the other init scripts.
# You can put your own initialization stuff in here if you don't
# Want to do the full Sys V style init stuff.
Touch/var/lock/subsys/local
Chown root: dba/dev/raw/raw1
Chown root: dba/dev/raw/raw2
Chmod 660/dev/raw/raw1
Chmod 660/dev/raw/raw2
Chown oracle: dba/dev/raw/raw5
Chown oracle: dba/dev/raw/raw6
Chown oracle: dba/dev/raw/raw7
Chmod 644/dev/raw/raw5
Chmod 644/dev/raw/raw6
Chmod 644/dev/raw/raw7
(3) configure the/etc/udev/rules. d/60-raw.rules file for reference. The only thing you need to note is to add the following content at the end of the file:
KERNEL = "raw [1-5]", OWNER = "oracle" GROUP = "oinstall", MODE = "0660"
1-5 indicates the number of disks. For example, if I have five disks, the disk size is 1-5.
[Root @ liuxuan ~] # Cat/etc/udev/rules. d/60-raw.rules
# Enter raw device bindings here.
#
# An example wocould be:
# ACTION = "add", KERNEL = "sda", RUN + = "/bin/raw/dev/raw/raw1% N"
# To bind/dev/raw/raw1 to/dev/sda, or
# ACTION = "add", ENV {MAJOR} = "8", ENV {MINOR} = "1 ", RUN + = "/bin/raw/dev/raw/raw2% M % m"
# To bind/dev/raw/raw2 to the device withmajor 8, minor 1.
KERNEL = "raw [1-5]", OWNER = "oracle" GROUP = "oinstall", MODE = "0660"
(4) # chkconfig rawdevices on
(5) restart the rawdevices service.
#/Sbin/service rawdevices restart
(6) # ll-l/dev/raw * check whether the file is oracle: oinstall owner
[Root @ liuxuan ~] # Ll-l/dev/raw *
Crw-rw ---- 1 oracle oinstall 162, 1 Dec 10/dev/raw/raw1
Crw-rw ---- 1 oracle oinstall 162, 2 Dec 10/dev/raw/raw2
Crw-rw ---- 1 oracle oinstall 162, 3 Dec 10/dev/raw/raw3
Crw-rw ---- 1 oracle oinstall 162, 4 Dec 10/dev/raw/raw4
Crw-rw ---- 1 oracle oinstall 162, 5 Dec 10/dev/raw/raw5
2. User Environment Configuration
2.1 create related directories and grant permissions
[Root @ liuxuandisk] # users and groups
/Usr/sbin/groupaddoinstall
/Usr/sbin/groupadd-g 502 dba
/Usr/sbin/groupadd-g 503 bytes
/Usr/sbin/groupadd-g 504 asmadmin
/Usr/sbin/groupadd-g 505 asmdba
/Usr/sbin/groupadd-g 506 asmoper
/Usr/sbin/useradd-u 502-g oinstall-G dba, role, asmdba oracle
/Usr/sbin/useradd-u 503-g oinstall-G asmadmin, asmoper, asmdba, dba grid
# Passwd oracle
# Passwd grid
Create users and groups
First, you must create a group of oinstall
Oracle, owner of database software dba license, must join asmdba
For the grid software asmdba asmadmin asmoper owner grid
Determine whether a user exists
# Id oracle
# Id gird
[Root @ liuxuan/] # mkdir-p/u01/app/oracle
[Root @ liuxuan/] # mkdir-p/u01/app/grid
[Root @ liuxuan/] # chown-R grid: oinstall/u01
[Root @ liuxuan/] # chown-R oracle: oinstall/u01/app/oracle
[Root @ liuxuan/] # chmod-R 775/u01/
2.1 Resource Restriction Configuration
# Vim/etc/security/limits. conf
Add at the end:
# Fororacle
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
# Forgrid
Grid soft nproc 2047
Grid hard nproc 16384
Grid soft nofile 1024
Grid hard nofile 65536
Grid soft stack 10240
# Vim/etc/sysctl. conf
Add at the end:
# For oracle soft
Net. ipv4.icmp _ echo_ignore_broadcasts = 1
Net. ipv4.conf. all. rp_filter = 1
Fs. file-max = 6815744 # set the maximum number of opened files
Fs. aio-max-nr = 1048576
Kernel. shmall = 2097152 # Total shared memory, 8 GB memory: 2097152*4 k/1024/1024
Kernel. shmmax = 2147483648 # maximum shared memory segment size
Kernel. shmmni = 4096 # maximum number of shared memory ends of the entire system
Kernel. sem = 250 32000100 128
Net. ipv4.ip _ local_port_range = 9000 65500 # available IPv4 port range
Net. core. rmem_default = 262144
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 1048576
2.3 configure user environment variables
# Su-oracle
Oracle:
# Cd ~
# Vi. bash_profile
Join:
ExprotORACLE_BASE =/u01/app/oracle
ExprotORACLE_SID = orcl
ExportORACLE_HOME = $ ORACLE_BASE/product/11.1.0/dbhome_1
ExportPATH = $ ORACLE_HOME/bin: $ PATH
# Source. bash_profile takes effect
# Su-grid
# Vi. bash_profile
Join:
ExprotORACLE_BASE =/u01/app/grid
ExportORACLE_SID = + ASM
ExportORACLE_HOME = $ ORACLE_BASE/product/11.2.0/grid
ExportPATH = $ ORACLE_HOME/bin: $ PATH
# Source. bash_profile takes effect
3. Install grid Software
Upload the grid installation package
Unzip p ......
Decompress ....
3.1 graphical interface call
Open xmanager-passive first
# Su-grid
# Export DISPLAY = 192.168.1.106: 0.0 (the ip address is the ip address of the called host)
# Xhost +
# Cd/gird
#./RunInstaller
Run the two scripts under root after installation. The second script needs to be run with a press Enter. Then, click OK.
3.2 Create an asm Database
Graphical interface call as shown above
# Asmca
New:
Disk group name FRA
4. Install oracle software
4.1
Graphical interface call
# Su-oracle
Same as above
# Export DISPLAY = 192.168.1.106: 0.0 (the ip address is the ip address of the called host)
# Xhost +
# Cd/database
#./RunInstaller
Run the script under root after installation, and click OK.
4.2dbaca database creation