◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
[root@tim1 ~]# su - oracle[oracle@tim1 ~]$ export DISPLAY=192.168.3.100:0.0[oracle@tim1 soft]$ cd /soft/database[oracle@tim1 database]$ ./runInstaller
Oracle用户的信任关系之前已经建好,不用担心了。
这是在向node2复制数据,可以在node2的$ORACLE_HOME下,通过du -sh 查看进度。
[root@tim1 ~]# /u01/app/oracle/product/11.2.0/db_1/root.shRunning Oracle 11g root.sh script...The following environment variables are set as:ORACLE_OWNER= oracleORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1Enter the full pathname of the local bin directory: [/usr/local/bin]:enterThe file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: yCopying dbhome to /usr/local/bin ...The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: yCopying oraenv to /usr/local/bin ...The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: yCopying 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.Finished product-specific root actions.
这一节是配置DATA和FRA磁盘组,也可以忽略此节,在创建database时再配置。
[root@tim1 ~]# su - grid[grid@tim1 ~]$ export DISPLAY=192.168.3.100:0.0[grid@tim1 ~]$ asmca
启动DBCA安装图形界面,X窗口中,直接切换到Oracle用户下:
[root@tim1 ~]# su - oracle[oracle@tim1 ~]$ export DISPLAY=192.168.3.100:0.0[oracle@tim1 ~]$ dbca
[root@tim1 ~]# srvctl status database -d prod[root@tim1 ~]# srvctl stop database -d prod
[root@tim1 ~]# crsctl check crs[root@tim1 ~]# crs_stat -t[root@tim1 ~]# crsctl stop crs[root@tim2 ~]# crsctl stop crs
先启动Node1,隔几秒后再启动Node2,查看crs和database是否自动启动了。
【注】:手动启库、关库、及启关实例相关命令
[root@tim1 ~]# srvctl start database -d prod[root@tim1 ~]# srvctl status database -d prod[root@tim1 ~]# srvctl status instance -d prod -i prod1
1)如何让数据库自动启动(现在不要做这一步)
如果数据库不能自动启动,可以参照下面的操作:
[root@tim1 ~]# crsctl stat resource ora.prod.db -p |grep AUTO_START
AUTO_START=restore 下次启动crs时,恢复到上次crs关闭时的状态
[root@tim1 ~]# crsctl modify res ora.prod.db -attr AUTO_START=always
AUTO_START=always 下次启动crs时,尝试自动启动数据库
[root@tim1 ~]# crsctl modify res ora.prod.db -attr AUTO_START=never
AUTO_START=never 下次启动crs时,不自动启动数据库
Node1:
[root@tim1 ~]# cd /soft[root@tim1 soft]# rpm -ivh rlwrap-0.41-1.el5.i386.rpm
2、分别修改Oracle用户和Grid用户的环境变量(一共四个文件)
3、修改$ORACLE_HOME/sqlplus/admin/glogin.sql和$GRID_HOME/sqlplus/admin/glogin.sql
set linesize 150set pagesize 100set sqlprompt '_user@ _CONNECT_IDENTIFIER>'
OC4J在Linux平台不使用,GSD是为了兼容 9i,这两个资源offline不影响 11g RAC 功能,在这里就不做 online 了。如果非要 online 这两个资源可以这样做:
[root@tim1 ~]# srvctl enable oc4j[root@tim1 ~]# srvctl start oc4j[root@tim1 ~]# srvctl enable nodeapps[root@tim1 ~]# srvctl status nodeapps[root@tim1 ~]# srvctl start nodeapps
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。