Linux Oracle11g Single Instance + ASM storage installation and deployment Quick Reference

Source: Internet
Author: User
Linux Oracle11g Single Instance + ASM storage installation and deployment Quick Reference

Quick Reference for installation and deployment of Oracle 11G Single Instance + ASM storage on Linux

Operating Environment: Apply for a Linux6.4 host (Template) in the Citrix virtualization environment)
Objective: to create a single-host 11 GB + ASM storage database

1. Host preparation

--------------------------------------------------------------------------------

IP Address:

Host Name: JY-DB

Directory:/u01

Disk: one 50 GB hard disk is allocated from the local disk resources of the host, and three 10 Gb hard disks are allocated from the magnetic array resources.

1.1 check host name and IP address ing: hostname-I

Hostname

Vi/etc/sysconfig/network

Vi/etc/hosts

1.2 The Allocated/u01 directory is the Oracle software installation directory, lv_asm1, lv_asm2, and lv_asm3 are the ASM disks.

Format/dev/xvdb 50G and mount it to the/u01 directory.

/Dev/xvdc/dev/xvde/dev/xvdf each 10 Gb, no formatting required, used for ASM

Pvcreate/dev/xvdc/dev/xvde/dev/xvdf
Vgcreate ora_vg/dev/xvdc/dev/xvde/dev/xvdf
Lvcreate-L 10g-n lv_asm1 ora_vg
Lvcreate-L 10g-n lv_asm2 ora_vg
Vgdisplay ora_vg
Lvcreate-l 2557-n lv_asm3 ora_vg

After creating a grid user, you must change the disk permissions of the lv before creating the ASM.

Chown grid: asmadmin/dev/mapper/ora *

1.3 configure YUM and install the dependency package

Yum configuration reference:

Configure the epel yum Source

RedHat local yum source configuration

Description of yum configuration file

Install yum in RedHat 6.1)

YUM installation and cleaning

Build yum local source on CentOS 6.4

Yum install binutils compat-libstdc ++-33 elfutils-libelf-devel glibc-common glibc-devel gcc-c ++ libaio-devel libaliblibgcc libstdc ++ libstdc ++-devel make sysstat unixODBC-devel pdksh ksh compat-libcap1

If no image is installed on the system, you must install the graphic interface and xterm.

Yum groupinstall "X Window System"

Yum install xterm

1.4 disable system firewall startup

Service iptables stop

Chkconfig iptables off

2. Create ORACLE users and group members

--------------------------------------------------------------------------------

Groupadd oinstall
Groupadd dba
Groupadd rule
Groupadd asmadmin
Groupadd asmdba
Groupadd asmoper

Useradd-g oinstall-G dba, asmdba, and oracle
Useradd-g oinstall-G dba, asmadmin, asmdba, asmoper grid

Specify the passwords of oracle and grid users respectively

Passwd oracle
Passwd grid

3. Create the following directory and grant corresponding Permissions

--------------------------------------------------------------------------------

Mkdir-p/u01/app/11.2.0/grid
Mkdir-p/u01/app/grid
Mkdir-p/u01/app/oracle/product/11.2.0/db_1
Chown-R oracle: oinstall/u01/app
Chmod-R 775/u01/app

4. Set environment variables for oracle and grid users

--------------------------------------------------------------------------------

4.1 oracle user login: vi ~ /. Bash_profile

Export ORACLE_BASE =/u01/app/oracle
Export ORACLE_HOME =/u01/app/oracle/product/11.2.0/db_1
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib :.
Export NLS_LANG = american_america.ZHS16GBK
Export ORACLE_SID = jyzhao
Export PATH = $ PATH: $ ORACLE_HOME/bin :.

4.2 log on to the grid user: vi ~ /. Bash_profile

Export ORACLE_BASE =/u01/app/grid
Export ORACLE_HOME =/u01/app/11.2.0/grid
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib :.
Export NLS_LANG = American_america.ZHS16GBK
Export PATH = $ PATH: $ ORACLE_HOME/bin :.
Export ORACLE_SID = + ASM

5. the root user changes the system parameters.

--------------------------------------------------------------------------------

5.1 vi/etc/sysctl. conf

Fs. aio-max-nr = 1048576
Fs. file-max = 6815744
Kernel. shmall = 2097152
Kernel. shmmax = 4398046511104 // generally, the system memory is set to 75% bytes.
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 = 1048586

Make the settings take effect immediately:/sbin/sysctl-p

5.2 vi/etc/security/limits. conf

Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
Grid soft nproc 2047
Grid hard nproc 16384
Grid soft nofile 1024
Grid hard nofile 65536
Grid soft stack 1024

5.3 vi/etc/pam. d/login

# Oracle

Session required/lib64/security/pam_limits.so

Session required pam_limits.so

6. Upload the Oracle installation media to the/u01/tmp directory.

--------------------------------------------------------------------------------

Mkdir-p/u01/tmp

P13390677_112040_Linux-x86-64_1of7.zip

P13390677_112040_Linux-x86-64_2of7.zip

P13390677_112040_Linux-x86-64_3of7.zip

7. Install the grid component

--------------------------------------------------------------------------------

# Cd/u01/tmp/

# Unzip p10404530_112030_Linux-x86-64_3of7.zip

# Chown-R grid: oinstall grid

Xmanager software logon with grid user

$ Cd/u01/tmp/grid

$./RunInstaller

The GUI is installed. The root user executes two scripts. The screen output of the script is as follows:

#/U01/app/oraInventory/orainstRoot. sh

Changing permissions of/u01/app/oraInventory.

Adding read, write permissions for group.

Removing read, write, execute permissions for world.

Changing groupname of/u01/app/oraInventory to oinstall.

The execution of the script is complete.

#/U01/app/11.2.0/grid/root. sh

Padding Ming root user operation for Oracle 11g

The following environment variables are set:

ORACLE_OWNER = grid

ORACLE_HOME =/u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Copying dbhome to/usr/local/bin...

Copying oraenv to/usr/local/bin...

Copying coraenv to/usr/local/bin...

Creating/etc/oratab file...

Entries will be added to the/etc/oratab file as needed

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be saved med.

To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:

/U01/app/11.2.0/grid/perl/bin/perl-I/u01/app/11.2.0/grid/perl/lib-I/u01/app/11.2.0/grid/crs /install/u01/app/11.2.0/grid/crs/install/roothas. pl

To configure Grid Infrastructure for a Cluster execute the following command:

/U01/app/11.2.0/grid/crs/config. sh

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.