当前位置:文档之家› 无图形界面情况下静默安装oracle

无图形界面情况下静默安装oracle

无图形界面情况下静默安装oracle如果Server段没有安装X界面,如何来安装Oracle呢?我们可以使用Oracle提供的静默安装来实现提示符下的Oracle安装。

安装前的系统环境变量及内核参数的设置这里就不重复了,可以查看安装光盘中的安装文档。

假设Oracle安装文件已经解压至/u02 。

su - oraclemkdir -p /u01/app/oracle/1. 建立静默安装的配置文件cd /u02/database/responsevi enterprise01.rspRESPONSEFILE_VERSION=2.2.1.0.0FROM_LOCATION="../stage/products.xml"ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_1/"ORACLE_HOME_NAME="OraDb10g_home1"TOPLEVEL_COMPONENT={"racle.server","10.2.0.1.0"}DEINSTALL_LIST={"racle.server","10.2.0.1.0"}SHOW_SPLASH_SCREEN=falseSHOW_WELCOME_PAGE=falseSHOW_COMPONENT_LOCATIONS_PAGE=falseSHOW_CUSTOM_TREE_PAGE=falseSHOW_SUMMARY_PAGE=falseSHOW_INSTALL_PROGRESS_PAGE=falseSHOW_REQUIRED_CONFIG_TOOL_PAGE=falseSHOW_CONFIG_TOOL_PAGE=falseSHOW_RELEASE_NOTES=falseSHOW_ROOTSH_CONFIRMATION=falseSHOW_END_SESSION_PAGE=falseSHOW_EXIT_CONFIRMATION=falseNEXT_SESSION=falseNEXT_SESSION_ON_FAIL=falseSHOW_DEINSTALL_CONFIRMATION=falseSHOW_DEINSTALL_PROGRESS=falseACCEPT_LICENSE_AGREEMENT=trueCOMPONENT_LANGUAGES={"en"}CLUSTER_NODES=INSTALL_TYPE="EE"s_nameForDBAGrp=dbas_nameForOPERGrp=dbab_oneClick=falseSHOW_DATABASE_CONFIGURATION_PAGE=falseb_createStarterDB=false相关属性的值的意义,请参考Oracle提供的enterprise.rsp文档中的说明。

2. 开始安装cd /u02/database/./runInstaller -silent -responseFile /u02/database/response/enterprise01.rsp #注意-responseFile参数后的文件路径一定是绝对路径,并且enterprise01.rsp oracle 用户可读。

执行过程如下:Installation in progress (Mon May 12 20:27:18 CST 2008) ............................................................... 11% Done. ............................................................... 23% Done. ............................................................... 35% Done. ............................................................... 47% Done. ........................................... 55% Done.Install successfulLinking in progress (Mon May 12 20:30:01 CST 2008). 55% Done. Link successfulSetup in progress (Mon May 12 20:31:21 CST 2008) .................... 100% Done. Setup successfulEnd of install phases.(Mon May 12 20:31:29 CST 2008)Starting to execute configuration assistantsConfiguration assistant "Oracle Net Configuration Assistant" succeeded Configuration assistant "Oracle Database Configuration Assistant" failed SEVERE UI-10104:Some of the configuration assistants failed. It is stronglyrecommended that you retry the configuration assistants at this time. Not successfully running any "Recommended" assistants means your system will not be correctly configured. Select the failed assistants and click the 'Retry' button to retry them.--------------------------------------The "/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/configToolFailedCommands" script contains all commands that failed, were skipped or were cancelled. This file may be used to run these configuration assistants outside of OUI. Note that you may have to update this script with passwords (if any) before executing the same. The "/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/configToolAllCommands" script contains all commands to be executed by the configuration assistants. This file may be used to run the configuration assistants outside of OUI. Note that you may have to update this script with passwords (if any) before executing the same.--------------------------------------The installation of Oracle Database 10g was successful, but some optional configuration assistants failed, were cancelled or skipped.Please check'/u01/app/oracle/oraInventory/logs/silentInstall2008-05-12_08-26-55PM.log' for more details.3. 运行安装所需脚本vi /u01/app/oracle/oraInventory/logs/silentInstall2008-05-12_08-26-55PM.log查看日志,提示我们用root用户运行如下两个脚本/u01/app/oracle/oraInventory/orainstRoot.sh/u01/app/oracle/product/10.2.0/db_1/root.sh至此Oracle的产品已经安装完成,可是目前为止我们还没有建立数据库。

由于没有X界面无法启动dbca ,所以不能用dbca来帮我们建立数据库。

这时候你可能会想到用create database 语句来建立数据库,可是语法实在是繁琐,并且还要运行许多的oracle脚本。

下面我们来利用oracle提供的种子数据库还原一个数据库出来。

假设我们要建立的数据库的名称为orcl 。

4.建立我们所需的目录。

mkdir -p /u01/app/oracle/admin/orcl/{a,b,u}dumpmkdir -p /u01/app/oracle/oradata/orcl找到oracle为种子数据库提供的控制文件并copy至/u01/app/oracle/oradata/orcl 。

cd /u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates/cp Seed_Database.ctl /u01/app/oracle/oradata/orcl5.建立pfile文件cd /u01/app/oracle/product/10.2.0/db_1/dbsvi initorcl.ora*.db_name=SEEDDATA #注:因为Seed_Database.ctl控制文件中记录的db_name为SEEDDATA。

相关主题