静默模式安装单实例数据库软件及建库

测试版本:11.2.0.4.0
假设运行./runInstaller之前步骤已完成

1.复制响应文件模板
mkdir etc
cp /home/oracle/database/response/* /home/oracle/etc/

2.设置响应文件权限
chmod 700 /home/oracle/etc/*

-rwx------. 1 oracle oinstall 44533 Aug 27 2013 dbca.rsp
-rwx------. 1 oracle oinstall 25276 Mar 1 12:09 db_install.rsp
-rwx------. 1 oracle oinstall 5871 Aug 27 2013 netca.rsp

3.修改安装Oracle软件的响应文件
vi /home/oracle/etc/db_install.rsp

修改以下参数


#安装类型
oracle.install.option=INSTALL_DB_SWONLY
#主机名
ORACLE_HOSTNAME=hostname
#安装组
UNIX_GROUP_NAME=oinstall
#INVENTORY目录(不填就是默认值)
INVENTORY_LOCATION=/data/app/oraInventory
#选择语言
SELECTED_LANGUAGES=en
#ORACLE_HOME
ORACLE_HOME=/data/app/oracle/product/11.2.0.3/dbhome_1
#ORACLE_BASE
ORACLE_BASE=/data/app/oracle
#oracle版本
oracle.install.db.InstallEdition=EE
#自定义安装,否,使用默认组件
oracle.install.db.isCustomInstall=false
#dba用户组
oracle.install.db.DBA_GROUP=dba
#oper用户组
oracle.install.db.OPER_GROUP=oinstall
#通过mos进行安全更新
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
#设置安全更新(貌似是有bug,这个一定要选true,否则会无限提醒邮件地址有问题,终止安装)
DECLINE_SECURITY_UPDATES=true


4.开始静默安装
安装中,如果提示[WARNING]不必理会,此时安装程序仍在进行,如果出现[FATAL],则安装程序已经停止了。

./runInstaller -silent -responseFile /home/oracle/etc/db_install.rsp


Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB. Actual 32506 MB Passed
Checking swap space: must be greater than 150 MB. Actual 4095 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-03-01_12-10-12PM. Please wait ... [WARNING] [INS-13014] Target environment do not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/OraInstall2018-03-01_12-10-12PM/installActions2018-03-01_12-10-12PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2018-03-01_12-10-12PM/installActions2018-03-01_12-10-12PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
You can find the log of this install session at:
/data/app/oraInventory/logs/installActions2018-03-01_12-10-12PM.log
The installation of Oracle Database 11g was successful.
Please check '/data/app/oraInventory/logs/silentInstall2018-03-01_12-10-12PM.log' for more details.

5.出现以下提示时,以root用户运行指定脚本
As a root user, execute the following script(s):
1. /data/app/oraInventory/orainstRoot.sh
2. /data/app/oracle/product/11.2.0.3/dbhome_1/root.sh

6.出现以下提示时,软件安装成功
Successfully Setup Software.

查看安装日志信息了解安装进度
cd /data/app/oraInventory/logs
tail -f installActions*.log

12.1 参考

http://blog.itpub.net/28612416/viewspace-1669298/

12.1 Oracle软件安装

[oracle@euphe ~]$ ls
database_12c p25433352_121020_Linux-x86-64
[oracle@euphe ~]$ chmod 775 -R database_12c/
[oracle@euphe ~]$ cd database_12c/
[oracle@euphe database_12c]$ ll
total 24
drwxrwxr-x 4 oracle oinstall 4096 Sep 6 2017 install
drwxrwxr-x 2 oracle oinstall 58 Sep 6 2017 response
drwxrwxr-x 2 oracle oinstall 33 Sep 6 2017 rpm
-rwxrwxr-x 1 oracle oinstall 8533 Sep 11 2017 runInstaller
drwxrwxr-x 2 oracle oinstall 28 Sep 6 2017 sshsetup
drwxrwxr-x 14 oracle oinstall 4096 Sep 6 2017 stage
-rwxrwxr-x 1 oracle oinstall 500 Sep 11 2017 welcome.html


[oracle@euphe database_12c]$ mkdir -p /home/oracle/etc
[oracle@euphe database_12c]$ cp /home/oracle/database_12c/response/* /home/oracle/etc/
[oracle@euphe database_12c]$ chmod 700 /home/oracle/etc/*
[oracle@euphe database_12c]$ cd /home/oracle/etc/
[oracle@euphe etc]$ ll
total 112
-rwx------ 1 oracle oinstall 74822 Apr 23 11:20 dbca.rsp
-rwx------ 1 oracle oinstall 25036 Apr 23 11:20 db_install.rsp
-rwx------ 1 oracle oinstall 6038 Apr 23 11:20 netca.rsp

vi /home/oracle/etc/db_install.rsp

修改以下参数

oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=oracle-test
UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/data/prd/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/data/prd/oracle/database/12.1.0.2/srm
ORACLE_BASE=/data/prd/oracle/database
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oinstall
oracle.install.db.BACKUPDBA_GROUP=dba
oracle.install.db.DGDBA_GROUP=dba
oracle.install.db.KMDBA_GROUP=dba
oracle.install.db.isRACOneInstall=false
DECLINE_SECURITY_UPDATES=true
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

安装软件

[oracle@oracle-test database_12c]$ ./runInstaller -silent -responseFile /home/oracle/etc/db_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB. Actual 53410 MB Passed
Checking swap space: must be greater than 150 MB. Actual 16379 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-04-20_11-39-10AM. Please wait ...[oracle@oracle-test database_12c]$ You can find the log of this install session at:
/data/prd/oraInventory/logs/installActions2018-04-20_11-39-10AM.log
The installation of Oracle Database 12c was successful.
Please check '/data/prd/oraInventory/logs/silentInstall2018-04-20_11-39-10AM.log' for more details.

As a root user, execute the following script(s):
1. /data/prd/oraInventory/orainstRoot.sh
2. /data/prd/oracle/database/12.1.0.2/srm/root.sh


Successfully Setup Software.

以root用户运行上面两个脚本

/data/prd/oraInventory/orainstRoot.sh
/data/prd/oracle/database/12.1.0.2/srm/root.sh

dbca建库(非CDB)

dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname orcl -sid orcl -responseFile NO_VALUE -characterSet AL32UTF8 -memoryPercentage 50


[oracle@oracle-test database_12c]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname orcl -sid orcl -responseFile NO_VALUE -characterSet AL32UTF8 -memoryPercentage 50
Enter SYS user password: 

Enter SYSTEM user password: 

Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/data/prd/oracle/database/cfgtoollogs/dbca/orcl/orcl.log" for further details.

数据库创建参考

http://blog.itpub.net/29047826/viewspace-1431667/

12.2参考

http://blog.51cto.com/seiang/1946087

https://blog.csdn.net/jc_benben/article/details/69911904

12.2 Oracle软件安装

[oracle@localhost database]$ ll
total 24
drwxr-xr-x. 4 oracle oinstall 4096 Jan 26 2017 install
drwxrwxr-x. 2 oracle oinstall 58 Jan 26 2017 response
drwxr-xr-x. 2 oracle oinstall 34 Jan 26 2017 rpm
-rwxr-xr-x. 1 oracle oinstall 8771 Jan 26 2017 runInstaller
drwxrwxr-x. 2 oracle oinstall 28 Jan 26 2017 sshsetup
drwxr-xr-x. 14 oracle oinstall 4096 Jan 26 2017 stage
-rwxr-xr-x. 1 oracle oinstall 500 Feb 6 2013 welcome.html

mkdir -p /home/oracle/etc
cp /home/oracle/database/response/* /home/oracle/etc/
chmod 700 /home/oracle/etc/*
cd /home/oracle/etc/

[oracle@localhost etc]$ ll
total 60
-rwx------. 1 oracle oinstall 25502 Jul 26 00:11 dbca.rsp
-rwx------. 1 oracle oinstall 22924 Jul 26 00:11 db_install.rsp
-rwx------. 1 oracle oinstall 6209 Jul 26 00:11 netca.rsp

vi /home/oracle/etc/db_install.rsp

修改以下参数

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0

oracle.install.option=INSTALL_DB_SWONLY

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/data/prd/oraInventory

ORACLE_HOME=/data/prd/oracle/database/12.2.0.1/Euphy

ORACLE_BASE=/data/prd/oracle/database

oracle.install.db.InstallEdition=EE

oracle.install.db.OSDBA_GROUP=dba

oracle.install.db.OSOPER_GROUP=dba

oracle.install.db.OSBACKUPDBA_GROUP=dba

oracle.install.db.OSDGDBA_GROUP=dba

oracle.install.db.OSKMDBA_GROUP=dba

oracle.install.db.OSRACDBA_GROUP=dba

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

DECLINE_SECURITY_UPDATES=true

安装软件

[oracle@euphe database]$ ./runInstaller -silent -responseFile /home/oracle/etc/db_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB. Actual 81513 MB Passed
Checking swap space: must be greater than 150 MB. Actual 4063 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-07-26_02-00-35AM. Please wait ...[oracle@euphe database]$ You can find the log of this install session at:

/data/prd/oraInventory/logs/installActions2018-07-26_02-00-35AM.log
The installation of Oracle Database 12c was successful.
Please check '/data/prd/oraInventory/logs/silentInstall2018-07-26_02-00-35AM.log' for more details.

As a root user, execute the following script(s):
1. /data/prd/oraInventory/orainstRoot.sh
2. /data/prd/oracle/database/12.2.0.1/Euphy/root.sh

Successfully Setup Software.

root用户运行上面两个脚本

[root@euphe ~]# /data/prd/oraInventory/orainstRoot.sh
Changing permissions of /data/prd/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /data/prd/oraInventory to oinstall.
The execution of the script is complete.


[root@euphe ~]# /data/prd/oracle/database/12.2.0.1/Euphy/root.sh
Check /data/prd/oracle/database/12.2.0.1/Euphy/install/root_euphe_2018-07-26_02-06-04-414749379.log for the output of root script

创建数据库(CDB)

dbca -silent -createDatabase -gdbName euphy -sid euphy -createAsContainerDatabase true -templateName General_Purpose.dbc -characterSet AL32UTF8 -memoryPercentage 30

Copying database files
1% complete
2% complete
18% complete
33% complete
Creating and starting Oracle instance
35% complete
40% complete
41% complete
42% complete
46% complete
51% complete
52% complete
53% complete
55% complete
Completing Database Creation
56% complete
58% complete
59% complete
62% complete
hy65% complete
66% complete
Executing Post Configuration Actions
100% complete
Look at the log file "/data/prd/oracle/database/cfgtoollogs/dbca/euphy/euphy.log" for further details.

猜你喜欢

转载自blog.csdn.net/Hehuyi_In/article/details/85759845