之后选择企业版本4.7GB,如下04.png所示:
下面的oraclebase根目录以及软件目录,都默认不需要设置(当然如果你要改路径也是可以的),默认后直接next下一步,如05.png:
接下来在oraInventorygroup name的时候选择oinstall,如08.png所示next下一步:
在databaseadministrator group上选择dba,在databaseoperator group上面选择oper,然后net下一步,如009.png所示:
然后,执行checksoracle基础组件,如果有libaio、compat的提示,直接IgnoreAll即可,next下一步如010.png所示:
然后选择install安装,开始安装oracle软件,如011.png所示:
之后进入安装界面,会有进度条%显示,如012.png所示:
如果安装完成,会弹出ExecuteConfiguration scripts所示,选择OK完成oracle软件安装,如013.png所示:
之后,看到oracle安装到最好一步Finish,选择close结束,如014.png所示:
11,执行dbca初始化脚本:
以root身份执行orainstRoot.sh和root.sh脚本(注:执行完脚本以后,在点击“ok”):
# 查找文件路径 [oracle@azure_earth_dbm1_3_111 database]$ find /data/ -name orainstRoot.sh /data/oraInventory/orainstRoot.sh [oracle@azure_earth_dbm1_3_111 database]$ find /data/ -name root.sh /data/oracle/product/11.2.0/dbhome_1/inventory/Templates/root.sh /data/oracle/product/11.2.0/dbhome_1/root.sh [oracle@azure_earth_dbm1_3_111 database]$ # 开始执行脚本 [root@azure_earth_dbm1_3_111 soft]# sh /data/oraInventory/orainstRoot.sh Changing permissions of /oracle/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /oracle/app/oraInventory to oinstall. The execution of the script is complete. [root@azure_earth_dbm1_3_111 soft]# [root@azure_earth_dbm1_3_111 soft]# sh /data/oracle/product/11.2.0/dbhome_1/root.sh Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /oracle/app/oracle/product/11.2.0/dbhome_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... 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 by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Finished product-specific root actions. [root@azure_earth_dbm1_3_111 soft]#
12,netca创建oracle监听
在shell命令行sudo – oracle,然后执行netca命令,出现如下界面,选择默认的listener configure配置,如下015.png:
然后选择Add,添加新的监听,如016.png:
默认监听名字为LISTENER,然后next下一步如017.png所示
然后继续next下一步,如018.png所示:
端口选择默认的1521,然后next下一步如019.png所示:
Ok,listener添加完毕,点击cancel退出,如020.png所示:
13,vnc远程dbca安装oracle数据库实例
[root@azure_earth_dbm1_3_112 ~]# exportDISPLAY=192.168.3.112:1.0 [root@azure_earth_dbm1_3_112 ~]# xhost + access control disabled, clients canconnect from any host [root@azure_earth_dbm1_3_112 ~]# [oracle@azure_earth_dbm1_3_111 database]$ dbca
dbca后出现oracle实例安装界面,如下所示,选择第一个,然后next如021.png所示:
选择创建数据库,然后next下一步如022.jpg所示:
填写全局实例名和SID,这里默认是一样的powerdes,然后next如024.jpg所示:
之后下一步默认,如025.jpg所示:
设置统一的sys密码,如026.jpg、027.png所示所示:
选择用本地的数据文件模版地址:如028.jpg所示:
之后配置闪存区和归档,如029.jpg所示:
选择模版schemas,如030.jpg所示:
配置sga、pga,默认是40%,这里因为是专用的db服务器,可以调整到70%,如031.png所示:
然后选择连接数,默认是150,基本不够用,这里可以设置为5000,如032.png所示:
然后选择字符集,设定16GBK,如033.png所示:
然后出现Data Store,看到一些文件以及存储参数,如034.jpg所示:
然后选择CreateDatabase和GenerateDatabase Creation Scripts,开始create,如035.jpg所示:
之后,跳出确认信息界面,点击ok确认,如036.jpg所示:
之后看到配置界面,提示scripts创建成功了,点击ok,如037.jpg所示:
再之后出现的是创建db的界面,创建数据文件,如038.jpg所示:
然后开始创建数据文件,这个时间比较漫长,主要看磁盘写入速度,如果是ssd磁盘,几分钟就结束了,如果是普通磁盘估计要至少一个小时左右吧,之后创建数据文件结束后,oracle数据库实例就创建完成了,如039.jpg所示:
14,修改启动参数打开归档和闪回
# 修改spfile参数 SQL> alter system set log_archive_dest_1='location=/doea5/arch'; SQL> alter system set log_archive_format='arch_%t_%s_%r.log' scope=spfile; SQL> alter system set db_recovery_file_dest_size=20G scope=spfile; SQL> alter system set db_recovery_file_dest='/oracle/app/oracle/flash_recovery'; SQL> alter system set db_flashback_retention_target=10080 scope=spfile; SQL> alter system set undo_retention=10800; # 打开归档和闪回 SQL> shutdown immediate SQL> startup mount SQL> alter database archivelog ; SQL> alter database flashback on; SQL> alter database open;
OK,至此,oracle11g2.0.4顺利圆满安装完成了。
如果一直报“xhost: unable to open display”,而且没有其它办法解决,可以尝试下面的途径:
[root@pddbnew ~]# export DISPLAY=10.251.3.31:1.0 [root@pddbnew ~]# xhost + xhost: unable to open display "10.251.3.31:1.0" [root@pddbnew ~]# [root@pddbnew ~]# [root@pddbnew ~]# export DISPLAY=pddbnew:1.0 [root@pddbnew ~]# xhost + xhost: unable to open display "pddbnew:1.0" [root@pddbnew ~]#
解决方式:
执行命令: export DISPLAY=:1.0
执行命令:xdpyinfo(ps:xdpyinfo命令会出来一堆信息)
执行命令:xhost +