ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 11g单机使用asm

11g单机使用asm

原创 Linux操作系统 作者:安佰胜 时间:2012-01-04 16:40:34 0 删除 编辑
 
11g单机使用asm
 
=========================
 
和10g不同,11g中如果要单机使用asm需要安装grid frastructure组件
安装软件就在grid包中,安装时选择第二个选项就能进入这个组件的安装
具体安装步骤如下:
10g单机使用asm的方法可以参考
http://space.itpub.net/13177610/viewspace-713292
 
-------------------------------
 
--安装依赖的rpm包
--rpms
 
oracleasm-support-2.1.7-1.el5.i386.rpm
oracleasmlib-2.0.4-1.el5.i386.rpm
oracleasm-2.6.18-194.el5xen-2.0.5-1.el5.i686.rpm
 
--asm对应的磁盘
--sdb,大小5g
--对sdb只进行fdisk,不创建文件系统

fdisk -l
fdisk /dev/sdb
--config asmdisks
oracleasm configure
oracleasm createdisk DATA /dev/sdb1
oracleasm scandisks
oracleasm listdisks
-----------------
--create groups and users
groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
groupadd -g 504 asmadmin
groupadd -g 505 asmoper
groupadd -g 506 asmdba
useradd -g oinstall -G dba,asmdba,oper oracle
useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
 
mkdir -p /oracle/app/oracle/product/11.2.0/dbhome
mkdir -p /oracle/app/grid/product/11.2.0/grid
chown -R oracle:oinstall /oracle/app/
chown -R grid:oinstall /oracle/app/grid
chmod -R 775 /oracle/
passwd grid
passwd oracle
# vi /etc/security/limits.conf
#ORACLE SETTING
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
# vi /etc/pam.d/login
#ORACLE SETTING
session    required     pam_limits.so
# vi /etc/sysctl.conf
#ORACLE SETTING
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 = 1048586

gird时间同步所需要的设置
Network Time Protocol Setting
/sbin/service ntpd stop
chkconfig ntpd off
rm /etc/ntp.conf

-----------------
--envs
#grid
ORACLE_SID=+ASM; export ORACLE_SID
ORACLE_BASE=/oracle/app/grid; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/grid; export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LANG=C; export LANG
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
 
#oracle
ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome; export ORACLE_HOME
ORACLE_SID=DB11; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
LANG=C; export LANG
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

---------------------
--install grid infrstruncture
--安装没什么可说的
--不过安装完软件执行root.sh脚本报错,如下
--这个报错会导致集群不能正确配置
--最终导致安装失败
--在网上查了下,是个bug
--处理方法是执行root.sh脚本后到/var/tmp/.oracle中等着
--当出现文件npohasd后执行如下命令
--dd if=/var/tmp/.oracle/npohasd f=/dev/null bs=1024 count=1
--之后就不会报错
--错误如下
[root@localhost grid]# sh root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /oracle/app/grid/product/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   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.
2012-01-04 11:57:57: Checking for super user privileges
2012-01-04 11:57:57: User has super user privileges
2012-01-04 11:57:57: Parsing the host name
Using configuration parameter file: /oracle/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-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
ohasd failed to start: Inappropriate ioctl for device
ohasd failed to start: Inappropriate ioctl for device at /oracle/app/grid/product/11.2.0/grid/crs/install/roothas.pl line 296.
 
--其他没什么好说的
--图形界面点而已
--之后安装数据库软件、创建数据库
--参考了下面的内容
--比较详细
http://www.itpub.net/thread-1214806-1-1.html
 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13177610/viewspace-714416/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-08-26

  • 博文量
    215
  • 访问量
    607530