oracle 11g 必须安装asm吗
发布网友
发布时间:2022-04-25 14:08
我来回答
共2个回答
热心网友
时间:2022-05-04 00:07
Oracle 11g R2 要使用ASM需要安装Grid InfrastructureOracle 11g R2 要使用ASM需要安装Grid Infrastructure,本文就如何安装Grid Infrastructure以及通过asm建库进行简单的文本记录1、安装操作系统 RHEL5U4
[root@dbabc ~]# uname -r
2.6.18-164.el5
[root@dbabc ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)2、检查并安装必须的安装包
rpm -q –qf ‘%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})n’ binutilscompat-libstdc++-33
elfutils-libelf
elfutils-libelf-devel
gcc
gcc-c++
glibc
glibc-common
glibc-devel
glibc-headers
ksh
lio
lio-devel
libgcc
libstdc++
libstdc++-devel
make
sysstat
unixODBC
unixODBC-devel
需要以下安装包,当然也可以加grep 直接查看未安装的包rpm -q –qf ‘%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})n’ binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-commonglibc-devel glibc-headers ksh lio lio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel | grep not* binutils-2.17.50.0.6
* compat-libstdc++-33-3.2.3
* compat-libstdc++-33-3.2.3(32 位)
* elfutils-libelf-0.125
* elfutils-libelf-devel-0.125
* elfutils-libelf-devel-static-0.125
* gcc-4.1.2
* gcc-c++-4.1.2
* glibc-2.5-24
* glibc-2.5-24(32 位)
* glibc-common-2.5
* glibc-devel-2.5
* glibc-devel-2.5(32 位)
* glibc-headers-2.5
* ksh-20060214
* lio-0.3.106
* lio-0.3.106(32 位)
* lio-devel-0.3.106
* lio-devel-0.3.106(32 位)
* libgcc-4.1.2
* libgcc-4.1.2(32 位)
* libstdc++-4.1.2
* libstdc++-4.1.2(32 位)
* libstdc++-devel 4.1.2
* make-3.81
* sysstat-7.0.2
* unixODBC-2.2.11
* unixODBC-2.2.11(32 位)
* unixODBC-devel-2.2.11
* unixODBC-devel-2.2.11(32 位)
挂载iso
[root@dbabc ~]# mount -o loop /u01/packages/linux_iso/RedHat 5.0_U4_64.iso /mnt/temp/通过rpm -ivh进行安装需要的软件包
通常情况下会缺少如下几个安装包
[root@dbabc Server]# rpm -ivh elfutils-libelf-devel-*warning: elfutils-libelf-devel-0.137-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186Preparing… ########################################### [100%]
package elfutils-libelf-devel-static-0.137-3.el5.x86_64 is already installedpackage elfutils-libelf-devel-0.137-3.el5.x86_64 is already installed[root@dbabc Server]# rpm -q –qf ‘%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})n’ binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++glibc glibc-common glibc-devel glibc-headers ksh lio lio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel | grep notpackage lio-devel is not installed
package sysstat is not installed
package unixODBC is not installed
package unixODBC-devel is not installed
[root@dbabc Server]# rpm -ivh lio-devel-0.3.106-3.2.*warning: lio-devel-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186Preparing… ########################################### [100%]
1:lio-devel ########################################### [ 50%]
2:lio-devel ########################################### [100%]
[root@dbabc Server]# rpm -ivh sysstat-7.0.2-3.el5.x86_64.rpmwarning: sysstat-7.0.2-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186Preparing… ########################################### [100%]
1:sysstat ########################################### [100%]
[root@dbabc Server]# rpm -ivh unixODBC-2.2.11-7.1.*warning: unixODBC-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186Preparing… ########################################### [100%]
1:unixODBC ########################################### [ 50%]
2:unixODBC ########################################### [100%]
[root@dbabc Server]# rpm -ivh unixODBC-devel-2.2.11-7.1.*warning: unixODBC-devel-2.2.11-7.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186Preparing… ########################################### [100%]
1:unixODBC-devel ########################################### [ 50%]
2:unixODBC-devel ########################################### [100%]
3、创建用户以及目录
/usr/sbin/groupadd -g 500 oinstall
/usr/sbin/groupadd -g 501 dba
/usr/sbin/groupadd -g 502 oper
/usr/sbin/groupadd -g 600 asmadmin
/usr/sbin/groupadd -g 601 asmoper
/usr/sbin/groupadd -g 602 asmdba
/usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,dba gridmkdir -p /u01/proct/grid -p
mkdir -p /u01/proct/db -p
chown -R grid:oinstall /u01
chown -R oracle:oinstall /u01/proct/db
chmod -R 775 /u01
passwd oracle
passwd grid
创建grid用户的登录脚本
在/home/grid/.bash_profile中添加一下信息
ORACLE_SID=+ASM; export ORACLE_SID
ORACLE_BASE=/u01/proct; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/grid; export ORACLE_HOMEORACLE_TERM=xterm; export ORACLE_TERM
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
PATH=$PATH:$HOME/bin
PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin:$PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH创建Oracle用户的登录脚本
4、配置Linux服务器
配置内核参数
cat /etc/sysctl.conf <> /etc/security/limits.conf <> /etc/pam.d/login <> /etc/profile <<EOFif [ $USER = "oracle" ] || [ $USER = "grid" ]; thenif [ $SHELL = "/bin/ksh" ]; thenulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF
5、安装并配置 ASMLib 2.0
根据操作系统获得安装包 http://www.oracle.com/technology/software/tech/linux/asmlib/rhel5.html[root@dbabc asm]# uname -r
2.6.18-164.el5
[root@dbabc asm]# ll
total 252
-rw-r–r– 1 root root 136910 Sep 29 19:33 oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm-rw-r–r– 1 root root 14176 Sep 29 19:33 oracleasmlib-2.0.4-1.el5.x86_64.rpm-rw-r–r– 1 root root 90444 Sep 29 19:33 oracleasm-support-2.1.3-1.el5.x86_64.rpm[root@dbabc asm]# rpm -ivh oracleasm-support-2.1.3-1.el5.x86_64.rpmwarning: oracleasm-support-2.1.3-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159Preparing… ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@dbabc asm]# rpm -ivh oracleasm-
oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm oracleasm-support-2.1.3-1.el5.x86_64.rpm[root@dbabc asm]# rpm -ivh oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpmwarning: oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159Preparing… ########################################### [100%]
1:oracleasm-2.6.18-164.el########################################### [100%]
[root@dbabc asm]# rpm -ivh oracleasmlib-2.0.4-1.el5.x86_64.rpmwarning: oracleasmlib-2.0.4-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159Preparing… ########################################### [100%]
1:oracleasmlib ########################################### [100%]
验证
[root@dbabc asm]# rpm -qa –queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})n"| grep oracleasm | sortoracleasm-2.6.18-164.el5-2.0.5-1.el5 (x86_64)oracleasmlib-2.0.4-1.el5 (x86_64)
oracleasm-support-2.1.3-1.el5 (x86_64)
配置 ASMLib
查看ASMlib配置
[root@dbabc ~]# oracleasm configure
ORACLEASM_ENABLED=false
ORACLEASM_UID=
ORACLEASM_GID=
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""
配置ASMlib
[root@dbabc ~]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM librarydriver. The following questions will determine whether the driver isloaded on boot and what permissions it will have. The current valueswill be shown in brackets ('[]'). Hitting without typing ananswer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: gridDefault group to own the driver interface []: asmadminStart Oracle ASM library driver on boot (y/n) [n]: yScan for Oracle ASM disks on boot (y/n) [y]: yWriting Oracle ASM library driver configuration: done该脚本完成以下任务:
* 创建 /etc/sysconfig/oracleasm 配置文件
热心网友
时间:2022-05-04 01:25
不是必须的,一般选的是文件系统。