[root@localhost etc]# uname -a
Linux localhost.localdomain 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost etc]#
1.
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -g oinstall -G dba grid
2.修改参数文件/etc/security/limits.conf,添加如下内容:
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
3.修改/etc/sysctl.conf,添加如下内容:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
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
4.因为是准备安装单实例11gasm数据库,所以选择第二个就行了
5.多选一种语言,汉语
】
6.oracle11g可以支持裸设备:
先安装asm对应的三个包分别是
oracleasm-2.6.18-308.el5-2.0.5-1.el5.x86_64.rpm
oracleasmlib-2.0.4-1.el5.x86_64.rpm
oracleasm-support-2.1.8-1.el5.x86_64.rpm
用root用户通过/etc/init.d/oracleasm configure
然后/etc/init.d/oracleasm createdisk VOL1 /dev/sda1创建asm磁盘组
其中这个/dev/sda1是直接分区不用建pv,
{至于裸设备创建,先需要通过fdisk -l对硬盘进行先分区分出
/dev/sdc1
然后修改/etc/sysconfig/rawdevices文件,建立映射关系
/dev/raw/raw1 /dev/sdc1
然后重启服务
service rawdevices restart
是配置文件/etc/sysconfig/rawdevices生效
然后找到/etc/sdc1,对其更改权限
chmod 660 sdc1
然后对其修改属主
chown grid:oinstall raw1
这样在grid窗口界面里面识别这个裸设备了}但是我们这时暂不使用裸设备,所以选择如下如下图
7.对grid实例用户sys和sysasm配置密码
8.对用户进行分组
9.选择ORACLE软件的预安装目录和grid软件的安装目录,这里面特别注意的就是目录的属主必须是grid,不然后面建实例的时候,会有问题
10.检查缺哪些包,哪些参数配置不对,如果一切OK,就会显示如下画面:
11.在安装过程中,会弹出以下窗口,用root用户执行以下脚本:
12.执行脚本
[root@localhost ~]# sh /oracle11/app/oraInventory/orainstRoot.sh
Changing permissions of /oracle11/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /oracle11/app/oraInventory to oinstall.
The execution of the script is complete.
[root@localhost ~]# sh /oracle11/app/grid/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /oracle11/app/grid/product/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 by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2014-03-13 02:41:16: Checking for super user privileges
2014-03-13 02:41:16: User has super user privileges
2014-03-13 02:41:16: Parsing the host name
Using configuration parameter file: /oracle11/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node localhost successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
localhost 2014/03/13 02:41:57 /oracle11/app/grid/product/11.2.0/grid/cdata/localhost/backup_20140313_024157.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 9919 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /oracle11/app/oraInventory
'UpdateNodeList' was successful.
[root@localhost ~]#
13.查看安装是否成功:
[grid@localhost ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE localhost
ora....ER.lsnr ora....er.type ONLINE ONLINE localhost
ora.asm ora.asm.type ONLINE ONLINE localhost
ora.cssd ora.cssd.type ONLINE ONLINE localhost
ora.diskmon ora....on.type ONLINE ONLINE localhost
[grid@localhost ~]$
安装OK