安装日志:/u01/app/oraInventory/logs/installActions2014-06-05_06-12-27AM.log
首先打开Xmanager - Passive软件,或者直接以grid用户登录虚拟机,在虚拟机里边进行图形界面操作。
[grid@raclhr-12cR1-N1 ~]$ export DISPLAY=192.168.59.1:0.0 [grid@raclhr-12cR1-N1 ~]$ xhost + access control disabled, clients can connect from any host [grid@raclhr-12cR1-N1 ~]$ cd /soft/grid/ [grid@raclhr-12cR1-N1 grid]$ ll total 80 drwxr-xr-x 4 root root 4096 Jan 16 17:04 install -rwxr-xr-x 1 root root 34132 Jul 11 2014 readme.html drwxrwxr-x 2 root root 4096 Jul 7 2014 response drwxr-xr-x 2 root root 4096 Jul 7 2014 rpm -rwxr-xr-x 1 root root 5085 Dec 20 2013 runcluvfy.sh -rwxr-xr-x 1 root root 8534 Jul 7 2014 runInstaller drwxrwxr-x 2 root root 4096 Jul 7 2014 sshsetup drwxr-xr-x 14 root root 4096 Jul 7 2014 stage -rwxr-xr-x 1 root root 500 Feb 7 2013 welcome.html [grid@raclhr-12cR1-N1 grid]$ ./runInstaller Starting Oracle Universal Installer...
Checking Temp space: must be greater than 415 MB. Actual 2790 MB Passed Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-01-16_08-41-48PM. Please wait ...[grid@raclhr-12cR1-N1 grid]$ [grid@raclhr-12cR1-N1 grid]$
|
依照上图设置好,单击“Next”按钮。
选择Configure a Standard cluster,并选择“下一步”:
依照上图设置好,单击“Next”按钮。
选择语言
依照上图设置好,单击“Next”按钮。
SCAN Name和/etc/hosts文件中设置一样,依照上图设置好,单击“Next”按钮。
上图显示出安装程序所在的节点,节点名和vip名必须小写,先点击Edit修改,其他节点需要手工添加。按Add按钮。Hostname、Virtual IP Name和文件hosts中设置一样,依照上图设置好,单击OK按钮。
输入密码,按Setup按钮建立SSH无密码互连接。如果在安装准备阶段手工配置了SSH连接,直接点Test按钮测试即可。依照上图设置好,单击“Next”按钮。
依照上图设置好,单击“Next”按钮。设置Disk group name 为OCR,Redundancy选择External,单击Change Discovery Path按钮。
指定OCR和Voting disk存放位置为/dev/asm*,依照上图设置Disk Discovery Path为实际路径,单击OK按钮。
此处选择use same passwords for these accounts
单击Yes按钮。
依照上图设置好,单击“Next”按钮。
点击“Next”继续安装;
此处配置为:
Oracle ASM administrator:asmadmin
Oracle ASM DBA :asmdba
Oracle ASM Operator:asmoper
依照上图设置好,单击“Next”按钮。
依照上图设置好,单击“Next”按钮。
点击“Next”继续;
安装程序会检查系统环境是否符合要求,包括RPM包、磁盘空间、SWAP、时钟同步等,任何一个条件没有通过,都会给出提示和解决办法。
以上几项可忽略,选择检查框Ignore All,单击“Next”按钮。
单击“Install”按钮。
[grid@raclhr-12cR1-N1 grid]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_rootlhr-Vol00 9.9G 4.9G 4.5G 52% / tmpfs 1000M 72K 1000M 1% /dev/shm /dev/sda1 194M 35M 150M 19% /boot /dev/mapper/vg_rootlhr-Vol01 3.0G 578M 2.3G 21% /tmp /dev/mapper/vg_rootlhr-Vol03 3.0G 70M 2.8G 3% /home /dev/mapper/vg_orasoft-lv_orasoft_u01 20G 6.7G 12G 36% /u01 .host:/ 331G 234G 97G 71% /mnt/hgfs /dev/mapper/vg_orasoft-lv_orasoft_soft 20G 11G 8.6G 54% /soft [grid@raclhr-12cR1-N1 grid]$ [root@raclhr-12cR1-N2 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_rootlhr-Vol00 9.9G 4.9G 4.5G 52% / tmpfs 1000M 72K 1000M 1% /dev/shm /dev/sda1 194M 35M 150M 19% /boot /dev/mapper/vg_rootlhr-Vol01 3.0G 80M 2.8G 3% /tmp /dev/mapper/vg_rootlhr-Vol03 3.0G 69M 2.8G 3% /home /dev/mapper/vg_orasoft-lv_orasoft_u01 20G 5.3G 14G 29% /u01 .host:/ 331G 234G 97G 71% /mnt/hgfs /dev/mapper/vg_orasoft-lv_orasoft_soft 20G 172M 19G 1% /soft [root@raclhr-12cR1-N2 ~]#
|
出现以上窗口时,不要关闭Execute Configuration scripts窗口,切换到节点1和节点2的root用户,先在节点1运行以root用户执行orainstRoot.sh,运行完后再到节点2运行:
/u01/app/oraInventory/orainstRoot.sh |
以root用户在节点1上运行root.sh,然后再节点2上运行root.sh:
/u01/app/12.1.0/grid_1/root.sh |
若root.sh执行失败,则重新执行root.sh的步骤如下:
---$ORACLE_HOME 为GRID_HOME的路径,执行之前最好先手动把数据库资源关闭 日志地址:$ORACLE_HOME/cfgtoollogs/crsconfig/ 重置的日志文件:hadelete.log root.sh脚本日志:rootcrs_rac2.log
--------------① 脚本方式 ---执行失败,重新执行root.sh脚本 $ORACLE_HOME/crs/install/rootcrs.pl -deconfig -force -verbose --$ORACLE_HOME/crs/install/rootcrs.pl -deconfig -force -verbose -lastnode -keepdg dd if=/dev/zero of=/dev/rhdiskN bs=1024k count=1024 lquerypv -h /dev/rhdisk5 $ORACLE_HOME/root.sh
$ORACLE_HOME/crs/install/rootcrs.pl -deconfig -force -verbose --$ORACLE_HOME/crs/install/rootcrs.pl -deconfig -force -verbose -lastnode -keepdg $ORACLE_HOME/root.sh
---$ORACLE_HOME/crs/install/rootcrs.pl -deconfig -force -verbose执行完成之后需要删除如下的文件 ls -l $ORACLE_BASE/Clusterware/ckptGridHA* find $ORACLE_HOME/gpnp/* -type f find $ORACLE_HOME/gpnp/* -type f -exec rm -rf {} \; |
[grid@raclhr-12cR1-N1 grid]$ crsctl stat res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE raclhr-12cr1-n1 STABLE ONLINE ONLINE raclhr-12cr1-n2 STABLE ora.OCR.dg ONLINE ONLINE raclhr-12cr1-n1 STABLE ONLINE ONLINE raclhr-12cr1-n2 STABLE ora.asm ONLINE ONLINE raclhr-12cr1-n1 Started,STABLE ONLINE ONLINE raclhr-12cr1-n2 Started,STABLE ora.net1.network ONLINE ONLINE raclhr-12cr1-n1 STABLE ONLINE ONLINE raclhr-12cr1-n2 STABLE ora.ons ONLINE ONLINE raclhr-12cr1-n1 STABLE ONLINE ONLINE raclhr-12cr1-n2 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE raclhr-12cr1-n1 STABLE ora.MGMTLSNR 1 OFFLINE OFFLINE STABLE ora.cvu 1 ONLINE ONLINE raclhr-12cr1-n1 STABLE ora.oc4j 1 ONLINE ONLINE raclhr-12cr1-n1 STABLE ora.raclhr-12cr1-n1.vip 1 ONLINE ONLINE raclhr-12cr1-n1 STABLE ora.raclhr-12cr1-n2.vip 1 ONLINE ONLINE raclhr-12cr1-n2 STABLE ora.scan1.vip 1 ONLINE ONLINE raclhr-12cr1-n1 STABLE -------------------------------------------------------------------------------- [grid@raclhr-12cR1-N1 grid]$
|
等到运行完root.sh,切换回Execute Configuration scripts窗口单击“OK”按钮。
创建MGMTDB,数据存储在OCR磁盘组。从后台进程(ps -ef|grep mgmt)找到了如下的SQL语句:
dbca -silent -createDatabase -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -sid -MGMTDB -gdbName _mgmtdb -storageType ASM -diskGroupName OCR -datafileJarLocation /u01/app/12.1.0/grid/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck -oui_internal
|
[root@raclhr-12cR1-N2 ~]# su - grid asmcmd lsdg State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED EXTERN N 512 4096 1048576 6144 5847 0 5847 0 Y OCR/ [root@raclhr-12cR1-N2 ~]# su - grid asmcmd lsdg State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED EXTERN N 512 4096 1048576 6144 4318 0 4318 0 Y OCR/ [root@raclhr-12cR1-N2 ~]# su - grid asmcmd lsdg State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED EXTERN N 512 4096 1048576 6144 1733 0 1733 0 Y OCR/ [root@raclhr-12cR1-N2 ~]# su - grid asmcmd lsdg State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED EXTERN N 512 4096 1048576 6144 1682 0 1682 0 Y OCR/ [root@raclhr-12cR1-N2 ~]#
|
创建完成后:
[grid@raclhr-12cR1-N1 grid]$ crsctl stat res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE raclhr-12cr1-n1 STABLE ONLINE ONLINE raclhr-12cr1-n2 STABLE ora.OCR.dg ONLINE ONLINE raclhr-12cr1-n1 STABLE ONLINE ONLINE raclhr-12cr1-n2 STABLE ora.asm ONLINE ONLINE raclhr-12cr1-n1 Started,STABLE ONLINE ONLINE raclhr-12cr1-n2 Started,STABLE ora.net1.network ONLINE ONLINE raclhr-12cr1-n1 STABLE ONLINE ONLINE raclhr-12cr1-n2 STABLE ora.ons ONLINE ONLINE raclhr-12cr1-n1 STABLE ONLINE ONLINE raclhr-12cr1-n2 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE raclhr-12cr1-n1 STABLE ora.MGMTLSNR 1 ONLINE ONLINE raclhr-12cr1-n1 169.254.146.43 192.1 68.2.100,STABLE ora.cvu 1 ONLINE ONLINE raclhr-12cr1-n1 STABLE ora.mgmtdb 1 ONLINE ONLINE raclhr-12cr1-n1 Open,STABLE ora.oc4j 1 ONLINE ONLINE raclhr-12cr1-n1 STABLE ora.raclhr-12cr1-n1.vip 1 ONLINE ONLINE raclhr-12cr1-n1 STABLE ora.raclhr-12cr1-n2.vip 1 ONLINE ONLINE raclhr-12cr1-n2 STABLE ora.scan1.vip 1 ONLINE ONLINE raclhr-12cr1-n1 STABLE -------------------------------------------------------------------------------- [grid@raclhr-12cR1-N1 grid]$ [grid@raclhr-12cR1-N1 grid]$ ps -ef|grep pmon grid 21105 1 0 Jan16 ? 00:00:00 asm_pmon_+ASM1 grid 36779 1 0 00:33 ? 00:00:00 mdb_pmon_-MGMTDB grid 44574 12846 0 00:45 pts/0 00:00:00 grep pmon [grid@raclhr-12cR1-N1 grid]$ ps -ef|grep MGMTDB | wc -l 41 [grid@raclhr-12cR1-N1 grid]$
|
单击“Next”按钮。
单击Yes按钮。
单击Close按钮。
About Me
...............................................................................................................................
● 本文作者:小麦苗,只专注于数据库的技术,更注重技术的运用
● 本文在itpub(http://blog.itpub.net/26736162)、博客园(http://www.cnblogs.com/lhrbest)和个人微信公众号(xiaomaimiaolhr)上有同步更新
● 本文itpub地址:http://blog.itpub.net/26736162/viewspace-2132772/
● 本文博客园地址:http://www.cnblogs.com/lhrbest/p/6337508.html
● 本文pdf版及小麦苗云盘地址:http://blog.itpub.net/26736162/viewspace-1624453/
● QQ群:230161599 微信群:私聊
● 联系我请加QQ好友(642808185),注明添加缘由
● 于 2017-01-12 08:00 ~ 2016-01-21 24:00 在农行完成
● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解
● 版权所有,欢迎分享本文,转载请保留出处
...............................................................................................................................
拿起手机使用微信客户端扫描下边的左边图片来关注小麦苗的微信公众号:xiaomaimiaolhr,扫描右边的二维码加入小麦苗的QQ群,学习最实用的数据库技术。
cdn.qqmail.com/zh_CN/htmledition/p_w_picpaths/function/qm_open/ico_mailme_02.png">
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。