Installing the 11GR2 ASM Single-Instance step

Source: Internet
Author: User
Tags least privilege

Environment Description: Platform:visualbox 4.3.12os:oracle Linux 5.8Grid infrastructure:11.2.0.3database:11.2.0.3
First, install the operating system (slightly)
Second, configure the software installation environment

-- Configure a local yum before installing
cd/etc/yum.repos.d/Touch Yum_oel5.repovi Yum_oel5.repo
Add the following: [Oel5]name=oracle Linux 5.8x86_64DVDBaseurl=file:///media/servergpgcheck=0enabled=1
For detailed usage of repo settings, refer to: http://docs.oracle.com/cd/E37670_01/E37355/html/ol_create_repo.html

--Install the necessary package and kernel parameter settings for Oracle software
Yum Installoracle-validated

Note that the Oracle Linux 6.x is used in:
Yum Installoracle-rdbms-server-11gr2-preinstall-1.0-6.el6

Some of the related Yum commands:Yum Clean All
YumrepolistYumList
Installing with Yum in OEL6"Desktop","X window System","Chinese support"
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, there will be a package that will automatically configure the kernel parameters, users, user groups, packages, etc. required to install Oracle software after installation, so it is highly recommended to build a test environment using Oracle Linux
--Mount 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 --G oinstall-gDba,asmdba,asmadmin,operOracleuseradd-u507-G oinstall-gASMADMIN,ASMDBA,ASMOPER,OPER,DBAGrid
Note that the Oper group is not required and dba,asmdba,asmadmin must have
--Modify grid and Oracle user passwords
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_sid oracle_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/gridnls_date_format= "YYYY:MM:DD HH24:MI:SS"; Export Nls_date_format
Nls_lang=american_america. ZHS16GBK; Export Nls_lang Path=.:${path}: $HOME/bin: $ORACLE _home/bin: $GRID _home/bin export PATH Export Temp=/tmp
Export Tmpdir=/tmpumask 022
mainly configure several environment variables for red fonts (required)
--Add shared disk as 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 drive
Vboxmanage storageattach asm11g--storagectl "SATA"--port 1--device 0--type HDD--medium asm01.vdi--mtype shareableVBo Xmanage storageattach asm11g--storagectl "SATA"--port 2--device 0--type HDD--medium asm02.vdi--mtype shareableVBoxMa Nage storageattach asm11g--storagectl "SATA"--port 3--device 0--type HDD--medium asm03.vdi--mtype shareable
Note: The VBoxManage.exe is executed in the cmd command line of the native window (first to the installation root of the VBox software) and the shared disk can be added by mouse click, the same principle
--using Udev to bind disks
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
When using, pay attention to the differences between scripts on different versions, otherwise you will not get the scsi_id of the disk.
--Create a rule file
touch/etc/udev/rules.d/99-oracle-asmdevices.rules
--Restart Udev for the configuration to take effect
/sbin/Start_udev

--Shut down the firewall (if you have chosen to shut down when installing the OS, skip this step)
Temporary shutdown:
Service iptables Statusservice iptables stop
permanently closed:Chkconfig--listiptablesChkconfig [--level] iptables off
PS: You can also permanently shut down the SendMail service, otherwise the system will start for a long time
--Create the required related directory (the directory that is configured in the environment variable)
Mkdir-p/u01/app/gridMkdir-p/u01/app/11.2.0/gridChown-r Grid:oinstall/u01Mkdir-p/u01/app/oracle/product/11.2.0/db_1Chown-r Oracle:oinstall/u01/app/oracleChmod-r 775/u01
--Close selinux (option to close when OS is installed)
Cat >>/etc/Selinux/config<<eofselinux=disabledEof
--Set Login 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 16384ulimit-n 65536Elseulimit-u 16384-n 65536fiumask 022fiEof
--Modify the Hosts file
cat/etc/hosts127.0.0.1 localhost asm11g
Third, install the GI software (slightly)
-After the 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 the CRS resources will not be started, and can not perform crsctl and other related GI commands
IV. installation of Oracle database software
--After installing the database software, the grid user executes the ASMCA and adds the disk group
--Before creating the database, the Oracle user executes the netmgr, creating a listener
v. DBCA Construction of the library
During the build, to select the database disk group here encountered an error, promptingUnable to identify disk groupThe workaround is simple, give the Oracle file a 6751 permission, and the root user can perform each:chmod 6751/u01/app/11.2.0/grid/oraclechmod 6751/u01/app/oracle/product/11.2.0/db_1/oracle
6751 respectively established the Ugoa permissions:
The first digit 6 for U (owner) has read, write permission, no execute permission second bit 7 for G (Group) have read, write, execute permission third 5 for O (other user) have read, execute permission fourth bit 1 for a (owner, group, other user) has Execute permission four bit 6751 if three bit means 675, The fourth bit inherits the value of Umask
Oracle users belong to the group DBA, Oinstall executable code requires the least privilege is 110 that is the owner and the group has execute permissions,in order to maintain convenience generally give 775 that is, the owner and the group has read, write, execute permissions, other users have Execute permissions

Installing the 11GR2 ASM Single-Instance step

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.