在 Oracle Linux 64 ORACLE RAC_第1页
在 Oracle Linux 64 ORACLE RAC_第2页
在 Oracle Linux 64 ORACLE RAC_第3页
在 Oracle Linux 64 ORACLE RAC_第4页
在 Oracle Linux 64 ORACLE RAC_第5页
已阅读5页,还剩72页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、在 Oracle Linux 6.4 上装配 Oracle 11gR2 - VMware + ASMwww.MyException.Cn   发布于:2013-10-18 20:53:13   浏览:30次0在 Oracle Linux 6.4 上安装 Oracle 11gR2 - VMware + ASM实验环境:OS: Oracle Linux Server release 6.4 x64Database: Oracle Database 11gR2 x64 (.0)VMware: VMware Workstati

2、on 9.0.0 build-812388实验步骤:1. 添加磁盘1.1. 编辑虚拟机配置1.2. 添加硬件1.3. 添加第一块硬盘1.4. 创建新的虚拟磁盘1.5. 选择磁盘类型1.6. 设置磁盘大小1.7. 完成1.8.添加第二块磁盘:重复步骤 171.9.2. 格式化磁盘磁盘添加完成后,启动虚拟机,作为 root 用户登录系统,格式化新添加的两块磁盘。磁盘格式化完成后,查看所有磁盘情况。3. 配置用户及用户组# groupadd oinstall# groupadd dba# groupadd oper# groupadd asmadmin# groupadd asmoper#

3、 groupadd asmdba# useradd -g oinstall -G dba,asmdba,oper oracle# useradd -g oinstall -G asmadmin,asmdba,asmoper,dba grid# echo oracle | passwd -stdin oracle# echo grid | passwd -stdin grid4. 配置 grid 和 oracle 用户的配置文件# mkdir -p /u01/app/oracle# mkdir -p /u01/app/grid# mkdir -p /u01/app/11.2.0/grid# ch

4、own -R grid:oinstall /u01# chown oracle:oinstall /u01/app/oracle# chmod -R 775 /u01-Oracle User-# export ORACLE_SID=orcl            # export ORACLE_BASE=/u01/app/oracle# export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1# export TMP=/tmp        

5、           # export TMPDIR=$TMP                # export PATH=$PATH:$ORACLE_HOME/bin-Grid User-# export ORACLE_SID=+asm# export ORACLE_BASE=/u01/app/grid# export ORACLE_HOME=/u01/app/11.2.0/grid# export PATH=$PATH:$ORACLE_HOME/bin5

6、. 配置 udev 绑定的 scsi_id注意以下两点:5.1. 不同的操作系统,scsi_id 命令的位置不同。rootlocalhost # cat /etc/issueOracle Linux Server release 6.4Kernel r on an mrootlocalhost # which scsi_id/sbin/scsi_idrootlocalhost #5.2. 编辑 /etc/scsi_id.config 文件,如果该文件不存在,则创建该文件并添加如下行:rootlocalhost # cat /etc/scsi_id.config options=-whiteli

7、sted -replace-whitespacerootlocalhost #5.3. 如果是使用 VMware 虚拟机,直接输入 scsi_id 命令可能无法获取 id,需修改 VMware 文件参数。rootlocalhost # scsi_id -whitelisted -replace-whitespace -device=/dev/sdbrootlocalhost # scsi_id -whitelisted -replace-whitespace -device=/dev/sdcD:VMsOracle Database 11gR2Oracle Database 11gR2.vmx使

8、用文本编辑器编辑该文件,在尾部新增一行参数:disk.EnableUUID="TRUE"保存文件,启动虚拟机。rootlocalhost # scsi_id -whitelisted -replace-whitespace -device=/dev/sdb36000c29fe0fc917d7e9982742a28ce7crootlocalhost # scsi_id -whitelisted -replace-whitespace -device=/dev/sdc36000c293ffc0900fd932348de4b6baf8rootlocalhost #6. 创建并配置

9、 udev rules 文件rootlocalhost # vi /etc/udev/rules.d/99-oracle-asmdevices.rulesKERNEL="sd*", SUBSYSTEM="block", PROGRAM="/sbin/scsi_id -whitelisted -replace-whitespace -device=/dev/$name",RESULT="36000c29fe0fc917d7e9982742a28ce7c", NAME="asm-diskb", OW

10、NER="grid",GROUP="asmadmin", MODE="0660"KERNEL="sd*", SUBSYSTEM="block", PROGRAM="/sbin/scsi_id -whitelisted -replace-whitespace -device=/dev/$name",RESULT="36000c293ffc0900fd932348de4b6baf8", NAME="asm-diskc", OWNER=&qu

11、ot;grid",GROUP="asmadmin", MODE="0660"根据步骤 5 获取的 ID 修改 RESULT 值7. 添加完成后,重启 udev,不同 Linux 发行版本重启方式不一样。rootlocalhost # start_udev Starting udev: OK rootlocalhost #8. 查看绑定的 asm,如果此时还是看不到 asm disk,请重启操作系统后再查看。rootlocalhost # ll /dev/asm*brw-rw- 1 grid asmadmin 8, 17 Oct 17 14:26

12、 /dev/asm-diskbbrw-rw- 1 grid asmadmin 8, 33 Oct 17 14:26 /dev/asm-diskc9. 编辑 /etc/security/limits.conf 文件,在文件尾部添加如下内容:rootlocalhost # tail -8 /etc/security/limits.conf oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536grid soft nproc 2047grid hard npro

13、c 16384grid soft nofile 1024grid hard nofile 65536rootlocalhost #10. 编辑 /etc/pam.d/login 文件,在文件尾部添加如下内容:rootlocalhost # tail -1 /etc/pam.d/login session required pam_limis.sorootlocalhost #11. 编辑 /etc/profile 文件,设置 shell 限制,在文件尾部添加如下内容:rootlocalhost # tail -9 /etc/profileif /$USER = "oracl

14、e" | /$USER = "grid" ; thenif /$SHELL = "/bin/ksh" ; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fiumask 022firootlocalhost #12. 编辑 /etc/hosts 文件,确认是否有如下内容,没有则添加:rootlocalhost # tail -1 /etc/hostslocalhostlocalhost.localdomainrootlocalhost #13.

15、为 Linux 系统配置本地 YUM 源13.1. 创建光盘挂载目录# mkdir /media/cdrom13.2. 编辑 /etc/fstab 文件,在文件尾部添加如下内容,以便开机自动挂载光盘:rootlocalhost # tail -1 /etc/fstab /dev/cdrom/media/cdromiso9660defaults0 0rootlocalhost #13.3. 挂载光盘rootlocalhost # mount -amount: block device /dev/sr0 is write-protected, mounting read-onlyrootlocal

16、host #13.4. 清空并编辑 YUM 源配置文件清空 /etc/yum.repos.d/public-yum-ol6.repo 文件并新增以下内容:rootlocalhost # cp /etc/yum.repos.d/public-yum-ol6.repo /etc/yum.repos.d/public-yum-ol6.bakrootlocalhost # cat /etc/yum.repos.d/public-yum-ol6.repool6_localname=Oracle Linux 6 Localbaseurl=file:/media/cdromgpgcheck=0enabled

17、=1rootlocalhost #13.5. 更新 YUM 源并安装 lrzsz 软件包,该软件包用于在虚拟主机和宿主机之间传送文件。rootlocalhost # yum install -y *sz*Loaded plugins: refresh-packagekit, securitySetting up Install ProcessResolving Dependencies-> Running transaction check-> Package lrzsz.x86_64 0:0.12.20-27.1.el6 will be installed-> Finish

18、ed Dependency ResolutionDependencies Resolved= Package Arch Version Repository Size=Installing: lrzsz x86_64 0.12.20-27.1.el6 ol6_local 70 kTransaction Summary=Install 1 Package(s)Total download size: 70 kInstalled size: 159 kDownloading Packages:Running rpm_check_debugRunning Transaction TestTransa

19、ction Test SucceededRunning Transaction Installing : lrzsz-0.12.20-27.1.el6.x86_64 1/1 Verifying : lrzsz-0.12.20-27.1.el6.x86_64 1/1 Installed: lrzsz.x86_64 0:0.12.20-27.1.el6 Complete!rootlocalhost #14. 通过 ZMODEM 上传文件 linux.x64_11gR2_grid.zip 至用户家目录 /home/grid/rootlocalhost # ll /home/grid/tot

20、al 1028228-rw-r-r- 1 root root 1052897657 Oct 16 13:22 linux.x64_11gR2_grid.ziprootlocalhost #15. 解压文件rootlocalhost grid# unzip linux.x64_11gR2_grid.ziprootlocalhost grid# lltotal 1028232drwxr-xr-x 8 root root 4096 Aug 21 2009 grid-rw-r-r- 1 root root 1052897657 Oct 16 13:22 linux.x64_11gR2_grid.zip

21、rootlocalhost grid#16. 作为 grid 用户登录系统,执行安装程序。16.1. 检查安装脚本是否具有可执行权限gridlocalhost grid$ iduid=501(grid) gid=500(oinstall) groups=500(oinstall),501(dba),503(asmadmin),504(asmoper),505(asmdba)gridlocalhost grid$ ll runInstaller -rwxr-xr-x 1 root root 3227 Aug 15 2009 runInstallergridlocalhost grid$如果无可执

22、行权限,执行以下命令进行授权:rootlocalhost # chown -R grid:oinstall /home/grid/grid/rootlocalhost # ll /home/grid/grid/runInstaller-rwxr-xr-x 1 grid oinstall 3227 Aug 15 2009 /home/grid/grid/runInstallerrootlocalhost #16.2. 执行安装脚本 /home/grid/grid/runInstallerXshell 会话设置如下:17. 安装过程gridlocalhost $ /home/grid/grid/r

23、unInstaller Starting Oracle Universal Installer.Checking Temp space: must be greater than 120 MB. Actual 38826 MB PassedChecking swap space: must be greater than 150 MB. Actual 4095 MB PassedChecking monitor: must be configured to display at least 256 colors. Actual 16777216 PassedPreparing to launc

24、h Oracle Universal Installer from /tmp/OraInstall2013-10-17_03-31-41PM. Please wait .gridlocalhost $...17.6.1. 检查安装条件17.6.2.执行修复脚本:rootlocalhost # /tmp/CVU_.0_grid/runfixup.sh Response file being used is :/tmp/CVU_.0_grid/fixup.responseEnable file being use

25、d is :/tmp/CVU_.0_grid/fixup.enableLog file location: /tmp/CVU_.0_grid/orarun.logSetting Kernel Parameters.kernel.sem = 250 32000 100 128fs.file-max = 6815744net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.wmem_default = 262144net.core.rmem_max = 41943

26、04net.core.wmem_max = 1048576fs.aio-max-nr = 104857617.6.3. 安装缺失软件包# yum install -y package_name这些软件包其实已安装,只不过因为 Oracle Linux 6.4 自带的软件包版本高于检查版本,所以检查不通过,忽略即可。Oracle Linux 6.4 的安装光盘中无 pdksh 软件包,安装 ksh 软件包即可。# yum install -y ksh因为没有 NTP 时钟服务器,所以 NTP 检查不通过,忽略即可。.17.9. 安装时间较长,请耐心等待。

27、安装过程中会弹出对话框,提示你以 root 身份执行两个脚本:rootlocalhost # /u01/app/oraInventory/orainstRoot.shChanging permissions of /u01/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /u01/app/oraInventory to oinstall.The execution of the scri

28、pt is complete.rootlocalhost # /u01/app/11.2.0/grid/root.shRunning Oracle 11g root.sh script.The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/11.2.0/gridEnter the full pathname of the local bin directory: /usr/local/bin: - 输入回车 Copying dbhome to /usr/local/bin

29、 . 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 byDatabase Configuration Assistant when a database is createdFinished running generic part of root.sh script.Now product-specific root actions wi

30、ll be performed.To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user: - 单实例安装需执行以下脚本/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.plTo configure Grid Infra

31、structure for a Cluster perform the following steps:1. Provide values for Grid Infrastructure configuration parameters in the file - /u01/app/11.2.0/grid/crs/install/crsconfig_params. For details on how to do this, see the installation guide.2. Run the following command as the root user: /u01/app/11

32、.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/rootcrs.plTo update inventory properties for Grid Infrastructure, perform the followingsteps. If a pre-11.2 home is already configured, execute the following:11.2_Home/oui/bin/

33、runInstaller -updateNodeList -silent -local CRS=false ORACLE_HOME=pre-11.2_HomeAlways execute the following to register the current home:11.2_Home/oui/bin/runInstaller -updateNodeList -silent -local CRS=true ORACLE_HOME=11.2_Home.If either home is shared, provide the additional argument -cfs.rootloc

34、alhost # /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.pl2013-10-17 16:18:19: Checking for super user privileges2013-10-17 16:18:19: User has super user privileges2013-10-17 16:18:19: Parsing the host na

35、meUsing configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_paramsCreating trace directory/u01/app/11.2.0/grid/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory - 报错Failed to create keys in the OLR, rc =

36、32512, 32512OLR configuration failedrootlocalhost #解决报错:17.9.1. 检查操作系统中 libcap.so 是否已安装如果是 64 位系统,i686 和 x86_64 都要安装。# yum install -y libcap*.i686# yum install -y libcap*.x86_64rootlocalhost # rpm -qa | grep libcaplibcap-ng-0.6.4-3.el6_0.1.i686libcap-2.16-5.5.el6.x86_64libcap-devel-2.16-5.5.el6.x86_

37、64libcap-devel-2.16-5.5.el6.i686libcap-ng-0.6.4-3.el6_0.1.x86_64libcap-2.16-5.5.el6.i686libcap-ng-devel-0.6.4-3.el6_0.1.i686libcap-ng-devel-0.6.4-3.el6_0.1.x86_64rootlocalhost # 17.9.2. 检查 libcap.so 文件rootlocalhost # ll /lib64/libcap.so*lrwxrwxrwx 1 root root 11 Oct 17 16:28 /lib64/libcap.so -> l

38、ibcap.so.2lrwxrwxrwx. 1 root root 14 Oct 16 15:22 /lib64/libcap.so.2 -> libcap.so.2.16-rwxr-xr-x 1 root root 19016 Oct 13 2011 /lib64/libcap.so.2.16rootlocalhost #17.9.3.rootlocalhost # ln -s /lib64/libcap.so.2.16 /lib64/libcap.so.1rootlocalhost # ll /lib64/libcap.so*lrwxrwxrwx 1 root root 11 Oct

39、 17 16:28 /lib64/libcap.so -> libcap.so.2lrwxrwxrwx 1 root root 21 Oct 17 17:01 /lib64/libcap.so.1 -> /lib64/libcap.so.2.16lrwxrwxrwx. 1 root root 14 Oct 16 15:22 /lib64/libcap.so.2 -> libcap.so.2.16-rwxr-xr-x 1 root root 19016 Oct 13 2011 /lib64/libcap.so.2.16rootlocalhost #17.9.4. 重新执行

40、60;/u01/app/11.2.0/grid/root.sh 脚本rootlocalhost # /u01/app/11.2.0/grid/root.shRunning Oracle 11g root.sh script.The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/11.2.0/gridEnter the full pathname of the local bin directory: /usr/local/bin:The file "dbhome

41、" already exists in /usr/local/bin. Overwrite it? (y/n)n: y - 输入 y 覆盖安装 Copying dbhome to /usr/local/bin .The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)n: y - 输入 y 覆盖安装 Copying oraenv to /usr/local/bin .The file "coraenv" already exists in /usr/local

42、/bin. Overwrite it? (y/n)n: y - 输入 y 覆盖安装 Copying coraenv to /usr/local/bin .Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root.sh script.Now product-specific root actions will be performed.To con

43、figure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:/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.plTo configure Grid Infrastructure for a Cluster perform the f

44、ollowing steps:1. Provide values for Grid Infrastructure configuration parameters in the file - /u01/app/11.2.0/grid/crs/install/crsconfig_params. For details on how to do this, see the installation guide.2. Run the following command as the root user: /u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11

45、.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/rootcrs.plTo update inventory properties for Grid Infrastructure, perform the followingsteps. If a pre-11.2 home is already configured, execute the following:11.2_Home/oui/bin/runInstaller -updateNodeList -silent

46、-local CRS=false ORACLE_HOME=pre-11.2_HomeAlways execute the following to register the current home:11.2_Home/oui/bin/runInstaller -updateNodeList -silent -local CRS=true ORACLE_HOME=11.2_Home.If either home is shared, provide the additional argument -cfs.rootlocalhost # /u01/app/11.2.0/grid/perl/bi

47、n/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.pl2013-10-17 17:04:58: Checking for super user privileges2013-10-17 17:04:58: User has super user privileges2013-10-17 17:04:58: Parsing the host nameUsing configuration parameter file:

48、 /u01/app/11.2.0/grid/crs/install/crsconfig_paramsImproper Oracle Clusterware configuration found on this hostDeconfigure the existing cluster configuration before starting - 报错to configure a new Clusterwarerun '/u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig'to configure existing fail

49、ed configuration and then rerun root.sh17.9.5. 解决步骤 4) 中的错误rootlocalhost # /u01/app/11.2.0/grid/crs/install/roothas.pl -verbose -delete -force2013-10-17 18:25:15: Checking for super user privileges2013-10-17 18:25:15: User has super user privileges2013-10-17 18:25:15: Parsing the host nameUsing conf

50、iguration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_paramsCRS-4639: Could not contact Oracle High Availability ServicesCRS-4000: Command Stop failed, or completed with errors.CRS-4639: Could not contact Oracle High Availability ServicesCRS-4000: Command Delete failed, or completed w

51、ith errors.CRS-4544: Unable to connect to OHASCRS-4000: Command Stop failed, or completed with errors./u01/app/11.2.0/grid/bin/acfsdriverstate: line 51: /lib/acfstoolsdriver.sh: No such file or directory/u01/app/11.2.0/grid/bin/acfsdriverstate: line 51: exec: /lib/acfstoolsdriver.sh: cannot execute:

52、 No such file or directorySuccessfully deconfigured Oracle Restart stackrootlocalhost #17.9.6. 重新执行 /u01/app/11.2.0/grid/root.sh 脚本rootlocalhost # /u01/app/11.2.0/grid/root.shRunning Oracle 11g root.sh script.The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /

53、u01/app/11.2.0/gridEnter 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

54、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 .Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of ro

55、ot.sh script.Now product-specific root actions will be performed.To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:/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.plTo configure Grid Infrastructure for a Cluster perform the following steps:1. Provide values for Grid Infrastructure configuration parameters in the file - /u01/app/11.2.0/grid/crs/install/crsco

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论