静默安装oracle软件

到安装包解压的database目录下
[oracle@yq response]$ pwd
/oracle/database/response
[oracle@yq response]$ ls
dbca.rsp  db_install.rsp  netca.rsp
[oracle@yq response]$ vi db_install.rsp
#####修改以下参数########
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=yq
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/oracle/app/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/oracle/app/oracle/product/11.2.0/dbhome_1
ORACLE_BASE=/oracle/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=DBA
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=orcl
oracle.install.db.config.starterdb.SID=orcl
然后开始静默安装oracle软件
[oracle@yq database]$ ./runInstaller -silent -force -noconfig -ignorePrereq -responseFile /oracle/database/response/db_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB.   Actual 16566 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4031 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-06-14_10-44-20PM. Please wait ...[oracle@yq database]$ [FATAL] [INS-35341] The installation user is not a member of the following groups: [DBA]
   CAUSE: The installation user account must be a member of all groups required for installation.
   ACTION: Ensure that the installation user is a member of the system privileges operating system groups you selected.
A log of this session is currently saved as: /tmp/OraInstall2017-06-14_10-44-20PM/installActions2017-06-14_10-44-20PM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.
运行报错了,找到报错参数,
oracle.install.db.DBA_GROUP=DBA
这里是区分大小写的,修改为小写,然后再次执行。
oracle.install.db.DBA_GROUP=dba
[oracle@yq database]$./runInstaller -silent -force -noconfig -ignorePrereq -responseFile /oracle/database/response/db_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB.   Actual 16045 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4031 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-06-14_11-00-32PM. Please wait ...[oracle@yq database]$ You can find the log of this install session at:
 /oracle/app/oraInventory/logs/installActions2017-06-14_11-00-32PM.log
 
查看日志
tail -500f /oracle/app/oraInventory/logs/installActions2017-06-14_11-00-32PM.log
[root@yq media]# tail -f /oracle/app/oraInventory/logs/installActions2017-06-14_11-00-32PM.log
INFO: Installation in progress
INFO: Extracting files to '/oracle/app/oracle/product/11.2.0/dbhome_1'.
INFO: Extracting files to '/oracle/app/oracle/product/11.2.0/dbhome_1'.
INFO: Performing fastcopy operations based on the information in the file 'oracle.server_EE_exp_1.xml'.
INFO: Performing fastcopy operations based on the information in the file 'racfiles.jar'.
INFO: Performing fastcopy operations based on the information in the file 'oracle.server_EE_dirs.lst'.
INFO: Performing fastcopy operations based on the information in the file 'oracle.server_EE_filemap.jar'.
INFO: Performing fastcopy operations based on the information in the file 'oracle.server_EE_1.xml'.
INFO: Performing fastcopy operations based on the information in the file 'setperms1.sh'.
INFO: Number of threads for fast copy :1
...............
WARNING: Validation disabled for the state finish
INFO: Completed validating state <finish>
INFO: Terminating all background operations
INFO: Terminated all background operations
INFO: Successfully executed the flow in SILENT mode
INFO: Finding the most appropriate exit status for the current application
INFO: Exit Status is 0
INFO: Shutdown Oracle Database 11g Release 2 Installer

安装完成后会提示用root用户执行以下脚本
[oracle@yq database]$./runInstaller -silent -force -noconfig -ignorePrereq -responseFile /oracle/database/response/db_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB.   Actual 16045 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4031 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-06-14_11-00-32PM. Please wait ...[oracle@yq database]$ You can find the log of this install session at:
 /oracle/app/oraInventory/logs/installActions2017-06-14_11-00-32PM.log
The installation of Oracle Database 11g was successful.
Please check '/oracle/app/oraInventory/logs/silentInstall2017-06-14_11-00-32PM.log' for more details.
As a root user, execute the following script(s):
        1. /oracle/app/oraInventory/orainstRoot.sh
        2. /oracle/app/oracle/product/11.2.0/dbhome_1/root.sh

Successfully Setup Software.

使用root执行脚本并查看是否成功
[root@yq media]# /oracle/app/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@yq media]# /oracle/app/oracle/product/11.2.0/dbhome_1/root.sh
Check /oracle/app/oracle/product/11.2.0/dbhome_1/install/root_yq_2017-06-14_23-14-20.log for the output of root script
[root@yq media]# cat /oracle/app/oracle/product/11.2.0/dbhome_1/install/root_yq_2017-06-14_23-14-20.log
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
   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.
Finished product-specific root actions.
验证是否安装完成
[oracle@yq database]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 14 23:16:16 2017
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified

Enter user-name:
可以使用sql plus命令。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31467250/viewspace-2141807/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31467250/viewspace-2141807/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值