Oracle11G静默安装软件和建库
⼀、准备软件和补丁包
p1*******_112040_Linux-x86-64_1of7.zip
p1*******_112040_Linux-x86-64_2of7.zip
p6880880_112000_Linux-x86-64.zip
p2*******_112040_Linux-x86-64.zip
⼆、静默安装数据库软件
解压数据库软件包,在 /database/response 下⾯有⼀个 db_install.rsp
主要做如下修改
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=pc    #⽤hostname命令查看
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oinstall
oracle.installer.autoupdates.option=SKIP_UPDATES
DECLINE_SECURITY_UPDATES=true
*注意等号后⾯没有空格
-
-执⾏安装脚本
/soft/database/runInstaller -silent -responsefile /database/response/db_install.rsp -ignoresysprereqs -showProgress --其中-silent 指的是静默安装, showProgress 显⽰进度, responseFile 是种⼦⽂件
--执⾏命令后,在最后需要执⾏脚本的时候报错了
Execute Root Scripts in progress.
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/11.2.0.4/db_1/root.sh
.................................................. 100% Done.
Execute Root Scripts successful.
Successfully Setup Software.
--报错信息如下
[root@pc ~]# cat /u01/app/oracle/product/11.2.0.4/db_1/install/root_pc_2020-04-22_16-09-36.log
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0.4/db_1
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/
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.
/u01/app/oracle/product/11.2.0.4/db_1/root.sh: line 14: /u01/app/oracle/product/11.2.0.4/db_1/rdbms/install/rootadd_rdbms.sh: No such file or directory
/u01/app/oracle/product/11.2.0.4/db_1/root.sh: line 16: /u01/app/oracle/product/11.2.0.4/db_1/rdbms/install/rootadd_filemap.sh: No such file or directory
---最终到原因竟然是软件包有问题;导致解压后/database 有问题;上⾯安装进度,产⽣的⽂件⼤⼩是 du -sh /u01/app  2.4G ;正确安装应该是4.2G或者4.3G
--解压的软件包有问题,当时解压的⽂件⼤⼩是 1.4G;正常解压完/database 应该是2.5G;
--安装完成后可以测试登陆数据库
[oracle@pc ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Apr 22 18:07:39 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
SQL> exit
Disconnected
[oracle@pc ~]$
---主库静默DBCA建库:
/u01/app/oracle/product/11.2.0.4/db_1/bin/dbca -silent -createDatabase -templateName
/u01/app/oracle/product/11.2.0.4/db_1/assistants/dbca/templates/General_Purpose.dbc -gdbName pcc -sid pc -sysPassword oracle -systemPassword oracle -emConfiguration LOCAL -dbsnmpPassword oracle -sysmanPassword oracle -characterSet ZHS16GBK
--报错如下:
[root@pc soft]# cat /u01/app/oracle/cfgtoollogs/dbca/pc/pc.log
Copying database files
DBCA_PROGRESS : 1%
DBCA_PROGRESS : 2%
ORA-27102: out of memory
DBCA_PROGRESS : 4%
DBCA_PROGRESS : 11%
DBCA_PROGRESS : 12%
ORA-01034: ORACLE not available
ORA-01034: ORACLE not available
DBCA_PROGRESS : 100%
vi /f
shmall 是全部允许使⽤的共享内存⼤⼩,
shmmax 是单个段允许使⽤的⼤⼩。这两个可以设置为内存的 90%。例如 16G 内存,16*1024*1024*1024*90% = 15461882265 ,shmall 的⼤⼩为 15461882265/4k(getconf PAGESIZE可得到) = 3774873 。
修改 /f
kernel.shmmax=15461882265
kernel.shmall=3774873
kernel.msgmax=65535
kernel.msgmnb=65535
执⾏ sudo sysctl -p
可以使⽤ ipcs -l 看结果。ipcs -u 可以看到实际使⽤的情况
--此服务器实际内存8G
修改后参数如下:
kernel.shmmax = 1932735283
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
fs.aio-max-nr=1048576
vm.swappiness=0
重新运⾏建库即可。
/u01/app/oracle/product/11.2.0.4/db_1/bin/dbca -silent -createDatabase -templateName
/u01/app/oracle/product/11.2.0.4/db_1/assistants/dbca/templates/General_Purpose.dbc -gdbName pcc -sid pc -sysPassword oracle -systemPassword oracle -emConfiguration LOCAL -dbsnmpPassword oracle -sysmanPassword oracle -characterSet ZHS16GBK
各参数含义如下:
-silent 表⽰以静默⽅式安装
-responseFile 表⽰使⽤哪个响应⽂件,必需使⽤绝对路径
RESPONSEFILE_VERSION 响应⽂件模板的版本,该参数不要更改
OPERATION_TYPE 安装类型,该参数不要更改
GDBNAME 全局数据库名,点号前⾯默认是db_name,点号后⾯默认就是db_domain
TEMPLATENAME 建库模板名,参考各模板定义:$ORACLE_HOME/assistants/dbca/templates/*.dbc
CHARACTERSET 字符集,默认是WE8MSWIN1252
TOTALMEMORY 实例内存,默认是服务器物理内存的40%
--系统参数调整
---修改影响系统SSH 时间的参数
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
vi /etc/ssh/sshd_config
GSSAPIAuthentication 赋值为no
ClientAliveInterval 60
ClientAliveCountMax 3
查UseDNS,赋值为 no(该项默认不启⽤的,要把前⾯的#删除掉)
UseDNS=no
systemctl restart sshdlinux安装oracle依赖包

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。