Oracle-ASM installation tutorial

Source: Internet
Author: User

Oracle-ASM installation tutorial

The steps for installing the ASM database are a lot different from those for installing RAC. Therefore, we have successfully installed the database based on the ASM management by modifying the installation document of RAC. The installation environment is CentOS6.5 _ 64-bit, and the database to be installed is version 11gr2.

The installation steps are as follows:
1. Create an operating system group and user

Groupadd-g 501 oinstall
Groupadd-g 502 dba
Groupadd-g 504 asmadmin
Groupadd-g 506 asmdba
Groupadd-g 507 asmoper

Useradd-u 501-g oinstall-G dba, asmadmin, asmdba, asmoper grid
Useradd-u 502-g oinstall-G dba, asmdba Oracle

Change User Password
Passwd grid
Passwd oracle

2. edit the file in vim/etc/hosts.
192.168.62.102 asm

3. Configure Kernel Parameters and resource limits for oracle and grid users
Vim/etc/sysctl. conf
 
Fs. aio-max-nr = 1048576
Fs. file-max = 6815744
Kernel. shmall = 2097152
Kernel. shmmax = 4294967295
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Net. ipv4.ip _ local_port_range = 9000 65500
Net. core. rmem_default = 262144
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 1048576

/Sbin/sysctl-p

Vim/etc/security/limits. conf
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Grid soft nproc 2047
Grid hard nproc 16384
Grid soft nofile 1024
Grid hard nofile 65536

Vim/etc/pam. d/login
Session required pam_limits.so

Vim/etc/profile

If [$ USER = "oracle"] | [$ USER = "grid"]; then
If [$ SHELL = "/bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Umask 022
Fi

4. Disable SELINUX.
Vim/etc/selinux/config
SELINUX = disabled
Restart the system
[/Etc/init. d/oracleasm createdisk DATA1/dev/sdb1]

4. Create related paths for GI database software
# Creating an Inventory path
Mkdir-p/u01/app/oraInventory
Chown-R grid: oinstall/u01/app/oraInventory
Chmod-R 775/u01/app/oraInventory

# Create a GI main directory
Mkdir-p/u01/app/grid
Chown-R grid: oinstall/u01/app/grid
Chmod-R 775/u01/app/grid

# Create a database home directory
Mkdir-p/u01/app/oracle
Mkdir/u01/app/oracle/export toollogs
Chown-R oracle: oinstall/u01/app/oracle
Chmod-R 775/u01/app/oracle

# Switch to the corresponding user operation
# Vim ~ /. Bash_profile
# Grid Add
Export ORACLE_SID = + ASM
Export ORACLE_BASE =/u01/app/grid
Export ORACLE_HOME =/u01/app/11.2.0/grid
Export PATH = $ ORACLE_HOME/bin: $ PATH

# OracleAdd
Export ORACLE_SID = orcl
Export ORACLE_UNQNAME = orcl
Export ORACLE_BASE =/u01/app/oracle
Export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/db_1
Export PATH = $ ORACLE_HOME/bin: $ PATH

5. Confirm the following OS packages for Installation
Sh yum. sh
Yum install binutils *-y
Yum install compat *-y
Yum install elfutils *-y
Yum install gcc *-y
Yum install glibc *-y
Yum install kernel *-y
Yum install ksh *-y
Yum install libaio *-y
Yum install libgcc *-y
Yum install libgomp *-y
Yum install libstdc *-y
Yum install make *-y
Yum install sysstat *-y
Yum install unixODBC *-y
Yum install libcap *-y
Yum install-y compat-libcap1 *
Yum install-y compat-libstdc *

6. Use fdisk/dev/sdb to allocate disk space and allocate 10 Gb space to three disks:/dev/sdb1,/dev/sdb2, And/dev/sdb.
N p w
Device Boot Start End Blocks Id System
/Dev/sdb1 1 393 3156741 83 Linux
/Dev/sdb2 394 786 3156772 + 83 Linux
/Dev/sdb3 787 1179 3156772 + 83 Linux

7. Disable the Firewall
/Etc/init. d/iptables stop;
Chkconfig iptables off;

8. Install asmlib and create an ASM Disk
Download oracleasm and find the corresponding version in the address below. Download:
Http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html

Yum-y install kmod-oracleasm.x86_64
Rpm-ivh oracleasmlib-2.0.4-1.el6.x86_64.rpm
Rpm-ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm

9. Create an ASM Hard Disk
/Etc/init. d/oracleasm configure
Default user to own the driver interface [oracle]: grid
Default group to own the driver interface [oinstall]:
Start Oracle ASM library driver on boot (y/n) [y]:
Scan for Oracle ASM disks on boot (y/n) [y]:

/Etc/init. d/oracleasm enable

/Etc/init. d/oracleasm createdisk DATA1/dev/sdb1
/Etc/init. d/oracleasm createdisk DATA2/dev/sdb2
/Etc/init. d/oracleasm createdisk DATA3/dev/sdb3

/Etc/init. d/oracleasm listdisks

10. Install GI
Switch to the grid user:
Exprot LANG = en_US
Go to the software package folder and execute./runInstaller. Next, perform operations on the interface. Follow the interface prompts to go down step by step.
When the Adding daemon to inittab is displayed when the root. sh script is executed, run the following command in another window using root (otherwise, the root. sh script fails to be executed ):
/Bin/dd if =/var/tmp/. oracle/npohasd of =/dev/nullbs = 1024 count = 1,
Until it gets stuck.

11. Install database software
Switch to oracle user
Exprot LANG = en_US
Go to the database folder and run./runInstaller. Follow the prompts to go down step by step.

12. Create an instance using dbca
When creating an instance, select ASM for storage type, and select other options as normal installation.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.