Steps for installing 11gR2 ASM single instance and 11gr2asm instance

Source: Internet
Author: User

Steps for installing 11gR2 ASM single instance and 11gr2asm instance
Environment: Platform: VisualBox 4.3.12OS: Oracle Linux 5.8 Grid Infrastructure: 11.2.0.3Database: 11.2.0.3
1. Install the Operating System (omitted)
2. Configure the software installation environment

-- After installation, configure a local yum
Cd/etc/yum. repos. d/touch yum_oel5.repovi yum_oel5.repo
Add the following content: [oel5] name = Oracle Linux 5.8 x86_64 DVD baseurl = file: // media/Servergpgcheck = 0 enabled = 1
For detailed usage of repo settings, see: http://docs.oracle.com/cd/E37670_01/E37355/html/ol_create_repo.html

-- Necessary packages and Kernel Parameter settings for installing Oracle software
Yum install oracle-validated

Note:
Yum install oracle-rdbms-server-11gR2-preinstall-1.0-6.el6

Some related yum commands: yum clean all
Yum repolistyum list
Install "Desktop", "X Window System", and "Chinese Support" with yum in OEL6"
Yum -- disablerepo = * -- enablerepo = oel6 groupinstall "Desktop"
Yum -- disablerepo = * -- enablerepo = oel6 groupinstall "X Window System" yum -- disablerepo = * -- enablerepo = oel6 groupinstall "Chinese Support"

If you are using Oracle Linux, this package will be available. After installation, the kernel parameters, users, user groups, and software packages required for installing the Oracle software will be automatically configured, which is very convenient, we strongly recommend that you use Oracle Linux to build a test environment.
-- Mount a disk
Mount-t iso9660/dev/cdrom/media
-- Add users and groups (non-Oracle Linux environment configuration)
Groupadd-g 501 oinstallgroupadd-g 502 dbagroupadd-g 503 opergroupadd-g 504 asmadmingroupadd-g 505 asmdbagroupadd-g 506 asmoper
Useradd-u 500-g oinstall-G dba, asmdba, asmadmin, oper oracleuseradd-u 507-g oinstall-G asmadmin, asmdba, asmoper, role, dba grid
Note: The region group is not required. dba, asmdba, and asmadmin must have
-- Change the password of the grid and oracle users
Passwd oraclepasswd grid
-- Configure Environment Variables
Grid:

Export ORACLE_SID = + ASMexport ORACLE_BASE =/u01/app/gridexport ORACLE_HOME =/u01/app/11.2.0/gridexport PATH = $ ORACLE_HOME/bin: $ PATH: /usr/local/bin /:. export TEMP =/tmpexport TMP =/tmp export TMPDIR =/tmpumask 022
Oracle:
ORACLE_SID = zlm; export ORACLE_SIDORACLE_BASE =/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOMEGRID_HOME =/u01/app/11.2.0/grid; export GRID_HOMENLS_DATE_FORMAT = "YYYY: MM: DD HH24: MI: SS "; export NLS_DATE_FORMAT
NLS_LANG = american_america.ZHS16GBK; export NLS_LANGPATH =. :. {PATH }:$ HOME/bin: $ ORACLE_HOME/bin: $ GRID_HOME/bin export PATHexport TEMP =/tmp
Export TMPDIR =/tmpumask 022
It is mainly used to configure several environment variables in the red font (required)
-- Add a shared disk using the vbox command line
VBoxManage createhd -- filename asm01.vdi -- size 3072 -- format VDI -- variant Fixed
VBoxManage createhd -- filename asm02.vdi -- size 3072 -- format VDI -- variant FixedVBoxManage createhd -- filename asm03.vdi -- size 3072 -- format VDI -- variant Fixed
-- Set the disk as a shared Disk
VBoxManage storageattach asm11g -- storagectl "SATA" -- port 1 -- device 0 -- type hdd -- medium disks -- mtype used ablevboxmanage storageattach asm11g -- storagectl "SATA" -- port 2 -- device 0 -- type hdd -- medium asm02.vdi -- mtype incluablevboxmanage storageattach asm11g -- storagectl "SATA" -- port 3 -- device 0 -- type hdd -- medium asm03.vdi -- mtype retriable
Note: VBoxManage.exe is executed in the cmd command line of the local window (first to the root directory of the installation of the vbox software). You can also add a shared disk by clicking the mouse. The principle is the same.
-- Use udev to bind a disk
For Linux 6.x
For I in B c d; doecho "KERNEL = \" sd * \ ", BUS = \" scsi \", PROGRAM = \ "/sbin/scsi_id-g-u/dev/\ $ name \", RESULT = \ "'/sbin/scsi_id-g-u/dev/sd $ I' \", NAME = \ "asm-disk $ I \", OWNER = \ "grid \", GROUP = \ "asmadmin \", MODE = \ "0660 \" "done
For Linux 5.xFor I in B c d; doecho "KERNEL = \" sd * \ ", BUS = \" scsi \", PROGRAM = \ "/sbin/scsi_id-g-u-s % p \", RESULT = \ "'scsi _ id-g-u-s/block/sd $ I '\", NAME = \ "asm-disk $ I \", OWNER = \ "grid \", GROUP = \ "asmadmin \", MODE = \ "0660 \" "done
Note the differences between scripts in different versions. Otherwise, the disk scsi_id cannot be obtained.
-- Create a rule File
Touch/etc/udev/rules. d/99-oracle-asmdevices.rules
-- Restart udev to make the configuration take effect.
/Sbin/start_udev

-- Disable the firewall (skip this step if you have selected to disable the firewall when installing the OS)
Temporarily close:
Service iptables statusservice iptables stop
Permanently close:Chkconfig -- list iptables chkconfig [-- level 35] iptables off
PS: You can disable the sendmail service permanently. Otherwise, the system will be started for a long time.
-- Create related directories (directories configured in environment variables)
Mkdir-p/u01/app/gridmkdir-p/u01/app/11.2.0/gridchown-R grid: oinstall/u01 mkdir-p/u01/app/oracle/product/11.2.0/db_1chown-R oracle: oinstall/u01/app/oraclechmod-R 775/u01
-- Disable selinux (you can choose to disable it when installing the OS)
Cat>/etc/selinux/config <EOFSELINUX = DISABLEDEOF
-- Set Logon Restrictions
Cat>/etc/pam. d/login <EOFsession required pam_limits.soEOF
-- Set profile (optional)
Cat>/etc/profile <EOFif [/$ USER = "oracle"] | [/$ USER = "grid"]; thenif [/$ SHELL = "/bin/ksh"]; thenulimit-p 16384 ulimit-n 65536 elseulimit-u 16384-n 65536 fiumask 022 fiEOF
-- Modify the hosts file
Cat/etc/hosts127.0.0.1 localhost asm11g
Iii. Install GI software (omitted)
-- After GI software is installed, the root user executes a single-node script

/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
This step must be done. Otherwise, crs resources will not be started and crsctl and other related GI commands cannot be executed.
4. Install ORACLE database software
-- After the database software is installed, the grid user executes asmca to add a disk group
-- Before creating a database, the oracle user executes netmgr and creates a listener.
V. dbca database creation
An error occurred while selecting the database disk group during database creation. It is very easy to identify the solution to the disk group. Just give the oracle file a 6751 permission and run the following commands as the root user: chmod 6751/u01/app/11.2.0/grid/bin/oraclechmod 6751/u01/app/oracle/product/11.2.0/db_1/bin/oracle
6751 permissions for ugoa are set respectively:
The first six represents that u (owner) has read and write permissions, and the second six represents that g (Group) has read, write, and execution permissions. The third five represents o (other users) the fourth digit indicates that a (owner, group, and other users) has the execution permission. The fourth digit inherits the umask value.
If an oracle user belongs to the dba group and the oinstall executable code, the minimum permission is 110. That is, the owner and the group have the execution permission, for maintenance convenience, 775 is generally granted to the owner and the group with the read, write, and execution permissions. Other users have the execution permission.

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.