Oracle 19c摆设之数据库软件安装(二)

数据人与超自然意识  论坛元老 | 2025-4-20 20:29:25 | 来自手机 | 显示全部楼层 | 阅读模式
打印 上一主题 下一主题

主题 1777|帖子 1777|积分 5331

在完成了Oracle Linux 9的初始化设置之后,我们准备安装Oracle 19c数据库软件。

Oracle数据库支持两种主要的安装方式:图形化安装和静默安装。这两种方法各有优缺点,选择哪种取决于你的具体需求、环境设置以及个人偏好。


  • 图形化安装
图形化安装(Graphical Installation)是通过Oracle Universal Installer (OUI)进行的,它提供了一个直观的用户界面来引导你完成整个安装过程。


  • 静默安装
静默安装(Silent Installation)是一种无需人工干预的安装方式,适用于自动化摆设场景。它通过响应文件(response file)来定义所有安装参数。
接下来我们会将这两种安装方式做一个具体的演示

一、 DB安装

1.1 上传软件并解压

上传软件包的方式有多种,可以通过sftp或虚拟机tools,这里不做具体先容。
  1. su – oracle
  2. cd /soft/
  3. unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME
复制代码


1.2 图形化安装数据库软件

  1. --如果安装过程中出现版本适配问题,调整以下参数
  2. export CV_ASSUME_DISTID=RHEL7.6
  3. [oracle@db1 ~]$ cd $ORACLE_HOME
  4. [oracle@db1 dbhome_1]$ ./runInstaller
  5. ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable.
  6. Launching Oracle Database Setup Wizard...
复制代码


1.3 选择只安装 database 软件



1.4 选择单实例数据库安装




1.5 选择企业版



1.6 设置database的base和inventory目录




1.7 设置database 软件用户组



1.8 设置安装脚本自动执行

略过,不需要设置


1.9 安装前查抄

swap查抄可以忽略继续安装,等安装完之后再做调解。


1.10 开始安装数据库软件




1.11 执行root.sh脚本


在root用户下执行完上面两个脚本,安装完成

二、 DB安装及初始化实例(静默)

 2.1 解压oracle soft

同图形化安装


 2.2 安装db soft

1)设置rsp文件,静默安装db
  1. $ORACLE_HOME/install/response/db_install.rsp
复制代码
模版如下:
  1. oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0
  2. oracle.install.option=INSTALL_DB_SWONLY
  3. UNIX_GROUP_NAME=oinstall
  4. INVENTORY_LOCATION=/u01/app/oraInventory
  5. ORACLE_HOME=/u01/app/oracle/product/19.3/dbhome_1
  6. ORACLE_BASE=/u01/app/oracle
  7. oracle.install.db.InstallEdition=EE
  8. oracle.install.db.OSDBA_GROUP=dba
  9. oracle.install.db.OSOPER_GROUP=oper
  10. oracle.install.db.OSBACKUPDBA_GROUP=backupdba
  11. oracle.install.db.OSDGDBA_GROUP=dgdba
  12. oracle.install.db.OSKMDBA_GROUP=kmdba
  13. oracle.install.db.OSRACDBA_GROUP=racdba
  14. oracle.install.db.rootconfig.executeRootScript=false
复制代码
上面的模板参数,在图形化安装的过程中,可以手工保存下来,用于静默安装时使用。

2)安装前查抄
  1. cd $ORACLE_HOME
  2. ./runInstaller -executePrereqs -silent -responseFile /u01/app/oracle/product/19.3/dbhome_1/install/response/db_install.rsp
复制代码
针对查抄失败的项,需要重点关注

3)执行静默安装
  1. cd $ORACLE_HOME
  2. --安装DB软件
  3. ./runInstaller -silent -responseFile /u01/app/oracle/product/19.3/dbhome_1/install/response/db_install.rsp -skipPrereqs
  4. --执行root.sh脚本
  5. [root@db1 ~]# /u01/app/oraInventory/orainstRoot.sh
  6. Changing permissions of /u01/app/oraInventory.
  7. Adding read,write permissions for group.
  8. Removing read,write,execute permissions for world.
  9. Changing groupname of /u01/app/oraInventory to oinstall.
  10. The execution of the script is complete.
  11. [root@db1 ~]# /u01/app/oracle/product/19.3/dbhome_1/root.sh
  12. Performing root user operation.
  13. The following environment variables are set as:
  14.     ORACLE_OWNER= oracle
  15.     ORACLE_HOME=  /u01/app/oracle/product/19.3/dbhome_1
  16. Enter the full pathname of the local bin directory: [/usr/local/bin]:
  17. The contents of "dbhome" have not changed. No need to overwrite.
  18. The contents of "oraenv" have not changed. No need to overwrite.
  19. The contents of "coraenv" have not changed. No need to overwrite.
  20. Creating /etc/oratab file...
  21. Entries will be added to the /etc/oratab file as needed by
  22. Database Configuration Assistant when a database is created
  23. Finished running generic part of root script.
  24. Now product-specific root actions will be performed.
  25. Oracle Trace File Analyzer (TFA - Standalone Mode) is available at :
  26.     /u01/app/oracle/product/19.3/dbhome_1/bin/tfactl
  27. Note :
  28. 1. tfactl will use TFA Service if that service is running and user has been granted access
  29. 2. tfactl will configure TFA Standalone Mode only if user has no access to TFA Service or TFA is not installed
复制代码


三、安装故障

3.1、安装DB软件时提示OS不支持



  • 提示信息如下
  1. [INS-08101] Unexpected error while executing the action at state: 'supportedOSCheck'
复制代码


  • 办理方案
报错的主要缘故原由是OS 操作体系不兼容问题,设置以下参数
  1. export CV_ASSUME_DISTID=RHEL7.6
复制代码
清算环境重新安装 即可
  1.     rm -rf /u01/app
  2.     rm -rf /etc/oracle
  3.     rm -f /etc/init.d/init.cssd
  4.     rm -f /etc/init.d/init.crs
  5.     rm -f /etc/init.d/init.crsd
  6.     rm -f /etc/init.d/init.evmd
  7.     rm -f /etc/oraInst.loc
  8.     rm -f /u01/app/oracle/oraInventory
  9.     rm -rf /etc/oratab
  10.     rm -rf /tmp/Ora*
复制代码


3.2 安装前查抄,提示SWAP空间设置不公道问题

1)swap的作用

体系管理和DBA都知道,在Linux和UNIX体系上都有一个SWAP分区,该分区,例似于于Windows体系上的虚拟内存。
当体系的物理内存不敷用的时间,就需要将物理内存中的一部门空间释放出来,临时转移到SWAP上,供当前运行的步伐提供物理内存空间,当步伐需要再访问被转移到了SWAP空间上的数据时,再从SWAP中规复到物理内存中。从此工作原理不丢脸出来,SWAP要有,但是只管不要使用,使用了就会发生内存互换,必然影响体系性能。

2) swap设置问题

有履历的体系管理员和DBA,往往会给体系建设一个适中巨细的SWAP巨细,但现实生产体系中,也常常发现有一些,由于SWAP设置过小的缘故原由,而导致物理内存、SWAP全部耗尽,导致DOWN机的环境;也有发现一由于SWAP设置太大太大而浪费须要的存储空间的环境,SWAP到底该设置多大,可以参考一下ORACLE官方的发起。

3)ORACLE官方发起swap设置标准

对于运行ORACLE数据库的操作体系,ORACLE官方是有设置巨细发起的,在此以从ORACLE 官方文档中提取的发起巨细为例:
(1)ORACLE官方要求最小1GB的RAM,发起2GB或更大
(2)SWAP与RAM的巨细设置关系


  • 1)RAM为1-2GB时,SWAP巨细发起为RAM巨细的1.5倍


  • 2)RAM为2-16GB时,SWAP巨细发起与RAM巨细相称


  • 3)RAM大于16GB时,SWAP巨细发起为16GB


4)怎样调解SWAP空间

(1)创建swapfile
root权限下,创建swapfile,假设当前目录为“/”,执行如下下令:
#dd if=/dev/zero of=swapfile bs=1024 count=500000
则在根目录下创建了一个swapfile,名称为“swapfile”,巨细为500M
(2)将swapfile设置为swap空间
#mkswap swapfile
(3)启用互换空间
# swapon swapfile
可以使用free下令查看swap空间巨细是否发生变化;
示例如下
  1. [root@db1~]# cat /proc/swaps
  2. Filename                                Type            Size    Used    Priority
  3. /dev/nvme0n1p2                          partition       2145276 668672  -2
  4. /root/swapfile                          file            499996  0       -3
  5. [root@db1~]# free -m
  6.               total        used        free      shared  buff/cache   available
  7. Mem:           2814         623         700           0        1489         720
  8. Swap:          2583         653        1930
复制代码


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

数据人与超自然意识

论坛元老
这个人很懒什么都没写!
快速回复 返回顶部 返回列表