发现9i的Silent安装和10以上版本还有所不同,简单描述一下安装过程。
首先是检查系统情况:
root@newtrade1 # /usr/sbin/prtconf | grep "Memory size"
Memory size: 32768 Megabytes
root@newtrade1 # /usr/sbin/swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d20 85,20 16 63498224 63498224
root@newtrade1 # df -k /data
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/emcpower4g 619339184 280169072 332976721 46% /data
对于当前的服务器而言,硬件方面不是问题。
下面是检查操作系统的情况:
root@newtrade1 # uname -a
SunOS newtrade1 5.10 Generic_127111-06 sun4u sparc SUNW,Sun-Fire-V490
root@newtrade1 # pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWtoo SUNWi1of SUNWxwfnt
system SUNWarc Lint Libraries (usr)
system SUNWbtool CCS tools bundled with SunOS
system SUNWhea SunOS Header Files
system SUNWi1of ISO-8859-1 (Latin-1) Optional Fonts
system SUNWlibm Math & Microtasking Library Headers & Lint Files (Usr)
system SUNWlibms Math & Microtasking Libraries (Usr)
system SUNWsprot Solaris Bundled tools
system SUNWtoo Programming Tools
system SUNWxwfnt X Window System platform. required fonts
对于Solaris 10而言,安装920这种低版本的数据库,也不会存在问题。
检查JRE所需版本,最新版本要求是1.1.8:
root@newtrade1 # java -version
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Server VM (build 1.5.0_12-b04, mixed mode)
下面检查/etc/system文件,确保其中的设置大于Oracle推荐的默认设置。
这里由于安装过一个其他版本的数据库,因此不需要在进行调整了:
set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=256
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=21474836479
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
如果这里进行设置,需要重启服务器。当然Solaris10已经有办法不重启系统来修改这些参数的设置了,这里就不详细描述了。
执行下面的语句创建oracle用户和dba、oinstall组,由于当前服务器上,oracle用户已经存在,就跳过这个步骤了。
# groupadd dba
# groupadd oinstall
# mkdir /export/home/oracle
# useradd -g oinstall -G dba -d /export/home/oracle oracle
# passwd oracle
# chown -R oracle:oinstall /export/home/oracle
# chown -R oracle:oinstall /data
下面切换为oracle用户,编辑.profile文件如下:
umask 022
ORACLE_SID=single92
export ORACLE_SID
ORACLE_BASE=/data/oracle
export ORACLE_BASE
ORACLE_HOME=/data/oracle/product/9.2
export ORACLE_HOME
NLS_LANG='SIMPLIFIED CHINESE_CHINA.ZHS16GBK'
export NLS_LANG
PATH=$PATH:$ORACLE_HOME/bin
export PATH
由于采用SILENT安装模式,因此不需要设置DISPLAY参数。
下面开始安装过程,首先编辑一个my_install.rsp文件,内容大致如下:
[General]
RESPONSEFILE_VERSION=1.7.0
[SESSION]
UNIX_GROUP_NAME="oinstall"
FROM_LOCATION="/data/oracle9/oracle_cd/disk1/stage/products.jar"
ORACLE_HOME="/data/oracle/product/9.2"
ORACLE_HOME_NAME="OracleHome92"
TOPLEVEL_COMPONENT={"oracle.server","9.2.0.1.0"}
DEINSTALL_LIST={"oracle.server","9.2.0.1.0"}
SHOW_ROOTSH_CONFIRMATION=true
LOCATION_FOR_DISK2="/data/oracle9/oracle_cd/disk2"
LOCATION_FOR_DISK3="/data/oracle9/oracle_cd/disk3"
#
# Oracle9i Database
#
[oracle.server_9.2.0.1.0]
COMPONENT_LANGUAGES={"en","zh_CN"}
INSTALL_TYPE="EE"
s_cfgtyperet="Customized"
[oracle.rdbms_9.2.0.1.0]
sl_dbaOperGroups={"dba","dba"}
[oracle.assistants.dbca_9.2.0.1.0]
OPTIONAL_CONFIG_TOOLS={"dbca"}
s_responseFileName="/data/oracle9/oracle_cd/disk1/response/my_dbca.rsp"
简单描述一下主要参数的含义:
FROM_LOCATION参数指出Oracle读取配置信息的位置,这里最好通过绝对路径指出products.jar文件的位置。在10g以上版本,这个文件变为products.xml,从这里也可以看出Oracle的转变过程。
ORACLE_HOME和ORACLE_HOME_NAME分别指出ORACLE_HOME的路径和ORACLE_HOME对应的名称。
TOPLEVEL_COMPONENT参数为安装组件和版本信息。
DEINSTALL_LIST参数为对应的卸载信息和版本。
SHOW_ROOTSH_CONFIRMATION设置显示运行root脚本的提示信息。其他的SHOW_参数都可以忽略。
LOCATION_FOR_DISK2和LOCATION_FOR_DISK3:这两个参数是9i特有的,10g以后默认都是一个安装文件,而9i包括了3个,因此需要这两个参数指出DISK2和DISK3两个安装文件的位置。
COMPONENT_LANGUAGES参数设置安装的语句,这里添加了简体中文。
INSTALL_TYPE参数设置安装类似,EE表示企业版。
s_cfgtyperet:选择定制方式,在安装结束后通过dbca来建立数据库。
sl_dbaOperGroups设置SYSDBA和SYSOPER对应的操作系统组信息。
OPTIONAL_CONFIG_TOOLS设置在安装结束后启动DBCA来进行建库操作。
s_responseFileName参数设置dbca的silent安装所需的response文件位置。
下面编辑dbca所需要的response文件,my_dbca.rsp:
[GENERAL]
RESPONSEFILE_VERSION = "9.2.0"
CREATE_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "single92.us.oracle.com"
SID = "single92"
TEMPLATENAME = "New Database"
CHARACTERSET = "ZHS16GBK"
NATIONALCHARACTERSET= "AL16UTF16"
DBCA的response文件中的参数都很容易理解,这里就不详细描述了。
需要注意,由于当前环境下已经存在高版本数据库,因此这里就不启用NETCA进行LISTENER和TNSNAMES的设置了。如果需要进行设置可以设置参数OPTIONAL_CONFIG_TOOLS和s_responseFileName,方法与dbca设置类似。
bash-3.00$ ./runInstaller -silent -responseFile /data/oracle9/oracle_cd/disk1/response/my_install.rsp
bash-3.00$
DISPLAY not set. Please set the DISPLAY and try again.
: No such file or directory
bash-3.00$ export DISPLAY=172.0.2.54:1.0
bash-3.00$ ./runInstaller -silent -responseFile /data/oracle9/oracle_cd/disk1/response/my_install.rsp
bash-3.00$ Initializing Java Virtual Machine from /tmp/OraInstall2008-09-25_03-00-28PM/jre/bin/java. Please wait...
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
Font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal--*-%d-*-*-p-*-sun-fontspecific]
In UNIX Group Name Page
In Cluster Node Selection Page
In File Locations Page
In Available Products Page
In Installation Types Page
In Component Locations Page
In Title Page
NLS_LANG = AMERICAN_AMERICA.WE8MSWIN1252
In Summary Page
In End of Installation Page
The installation of Oracle9i Database was successful, but some optional configuration tools failed or were canceled.
Please check /data/oracle/oraInventory/logs/silentInstall2008-09-25_03-00-28PM.log for more details.
9i的silent和10g以上还不一样,必要要求一个可用DISPLAY设置,即使在Silent模式下根本不用这个设置。
下面检查一下日志信息:
bash-3.00$ more /data/oracle/oraInventory/logs/silentInstall2008-09-25_03-00-28PM.log
silentInstall2008-09-25_03-00-28PM.log
Error :*** Alert: A configuration script. needs to be run as root before installation can proceed. Please leave this window up, go run /data/oracle/product/9.2/root.sh as root from another window, then come back here and click OK to continue. ***
Configuration tool Oracle Database Configuration Assistant failed
Look at the log file "/data/oracle/product/9.2/assistants/dbca/logs/orcl.log" for further details.
Error :*** Alert: One or more tools have failed. It is recommended but not required that these tools succeed for this installation.
You can now select these tools, read its details to examine why they failed, fix those problems, and retry them. Or, you can click "
Next" to continue. ***
The installation of Oracle9i Database was successful, but some optional configuration tools failed or were canceled.
问题在于没有执行root.sh脚本,下面手工执行root.sh:
root@newtrade1 # /data/oracle/product/9.2/root.sh
Running Oracle9 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /data/oracle/product/9.2
Enter 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]:
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]:
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]:
Adding entry to /var/opt/oracle/oratab file...
Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
下面手工启动dbca:
bash-3.00$ $ORACLE_HOME/bin/dbca -silent -responseFile /data/oracle9/oracle_cd/disk1/response/my_dbca.rsp
Look at the log file "/data/oracle/admin/single92/create/single92.log" for further details.
居然在安装全程没有任何一点的提示,看来10g以上的Silent安装已经人性化多了。检查一下日志文件:
bash-3.00$ more /data/oracle/admin/single92/create/single92.log
Database creation completed. See logfiles at /data/oracle/admin/single92/create for details.
Database Information:
global database name: single92.us.oracle.com
database system identifier (SID): single92
SYS account password: change_on_install
SYSTEM account password: manager.
Note: All other database accounts have been locked. Oracle highly RECOMMENDS to change the default passwords of all the users.
至此9201的SILENT安装完成:
bash-3.00$ $ORACLE_HOME/bin/sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.1.0 - Production on 星期四 9月 25 15:58:41 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
PL/SQL Release 9.2.0.1.0 - Production
CORE 9.2.0.1.0 Production
TNS for Solaris: Version 9.2.0.1.0 - Production
NLSRTL Version 9.2.0.1.0 - Production
由于Oracle建立数据库的大部分参数采用了默认的设置,剩下还需要手工进行调整。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4227/viewspace-465948/ ,如需转载,请注明出处,否则将追究法律责任。