本篇内容介绍了“怎么安装RPM方式单机数据库”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

一、 环境介绍

操作系统

Red Hat Enterprise Linux Server release 7.7 (Maipo)

数据库版本

Oracle database 19.3

主机名

adg19c

IP地址

192.168.84.99

安装目录

/DBSoft/oracle/product/19.3/dbhome_1

数据库名称

woo

字符集

AL32UTF8

二、 环境准备2.1. 关闭防火墙

[root@adg19c~]#systemctlstopfirewalld[root@adg19c~]#systemctldisablefirewalldRemovedsymlink/etc/systemd/system/multi-user.target.wants/firewalld.service.Removedsymlink/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.2.2. 禁用NetworkManager服务

[root@adg19c~]#systemctlstopNetworkManager[root@adg19c~]#systemctldisableNetworkManager2.3. 禁用SELINUX

[root@adg19c~]#setenforce0setenforce:SELinuxisdisabled[root@adg19c~]#sed-i"/^SELINUX=/s#enforcing#disabled#"/etc/selinux/config2.4. 配置HOSTS解析

[root@adg19c~]#cat>>/etc/hosts<<EOF>>192.168.84.99adg19c>EOF2.5. 修改主机名

[root@adg19c~]#sed-i's#^HOSTNAME=.*$#HOSTNAME=db01#'/etc/sysconfig/network[root@adg19c~]#sed-i's#^NETWORKING_IPV6=.*$#NETWORKING_IPV6=no#'/etc/sysconfig/network2.6. 配置NOZEROCONFIG

[root@adg19c~]#cat>>/etc/sysconfig/network<<EOF>NOZEROCONF=yes>EOF2.7. 配置yum环境

[root@adg19c~]#cat>/etc/yum.repos.d/local.repo<<EOF>[base]>name=base>baseurl=file:///mnt>enabled=1>gpgcheck=0>multilib_policy=all>EOF[root@adg19c~]#yumcleanall&&yummakecacheLoadedplugins:product-id,search-disabled-repos,subscription-managerThissystemisnotregisteredwithanentitlementserver.Youcanusesubscription-managertoregister.Cleaningrepos:base2.8. 上传并安装compat-libstdc++

[root@adg19c~]#rpm-ivh/home/oracle/compat-libstdc++-33-3.2.3-69.el6.x86_64.rpmwarning:/home/oracle/compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm:HeaderV3RSA/SHA256Signature,keyIDec551f03:NOKEYPreparing...#################################[100%]Updating/installing...1:compat-libstdc++-33-3.2.3-69.el6#################################[100%]

注意:这个包在RHEL 7的环境中没有,需要单独下载后手工安装。

三、 安装数据库3.1. 预安装

[root@localhost~]#ls-rtltotal2631532-rw-r--r--.1rootroot18204Apr1001:41oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm-rw-r--r--.1rootroot2694664264Apr1001:42oracle-database-ee-19c-1.0-1.x86_64.rpm[root@localhost~]#yumlocalinstall-yoracle-database-preinstall-19c-1.0-1.el7.x86_64.rpmLoadedplugins:ulninfoExaminingoracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm:oracle-database-preinstall-19c-1.0-1.el7.x86_64Markingoracle-database-preinstall-19c-1.0-1.el7.x86_64.rpmtobeinstalledResolvingDependencies-->Runningtransactioncheck--->Packageoracle-database-preinstall-19c.x86_640:1.0-1.el7willbeinstalled-->FinishedDependencyResolutionDependenciesResolved==========================================================================================================================PackageArchVersionRepositorySize==========================================================================================================================Installing:oracle-database-preinstall-19cx86_641.0-1.el7/oracle-database-preinstall-19c-1.0-1.el7.x86_6455kTransactionSummary==========================================================================================================================Install1PackageTotalsize:55kInstalledsize:55kDownloadingpackages:RunningtransactioncheckRunningtransactiontestTransactiontestsucceededRunningtransactionWarning:RPMDBalteredoutsideofyum.Installing:oracle-database-preinstall-19c-1.0-1.el7.x86_641/1Verifying:oracle-database-preinstall-19c-1.0-1.el7.x86_641/1Installed:oracle-database-preinstall-19c.x86_640:1.0-1.el7Complete!3.2. 安装数据库软件

[root@localhost~]#yumlocalinstall-yoracle-database-ee-19c-1.0-1.x86_64.rpmLoadedplugins:ulninfoExaminingoracle-database-ee-19c-1.0-1.x86_64.rpm:oracle-database-ee-19c-1.0-1.x86_64Markingoracle-database-ee-19c-1.0-1.x86_64.rpmtobeinstalledResolvingDependencies-->Runningtransactioncheck--->Packageoracle-database-ee-19c.x86_640:1.0-1willbeinstalled-->FinishedDependencyResolutionDependenciesResolved==========================================================================================================================PackageArchVersionRepositorySize==========================================================================================================================Installing:oracle-database-ee-19cx86_641.0-1/oracle-database-ee-19c-1.0-1.x86_646.9GTransactionSummary==========================================================================================================================Install1PackageTotalsize:6.9GInstalledsize:6.9GDownloadingpackages:RunningtransactioncheckRunningtransactiontestTransactiontestsucceededRunningtransactionInstalling:oracle-database-ee-19c-1.0-1.x86_641/1[INFO]Executingpostinstallationscripts...[INFO]Oraclehomeinstalledsuccessfullyandreadytobeconfigured.ToconfigureasampleOracleDatabaseyoucanexecutethefollowingserviceconfigurationscriptasroot:/etc/init.d/oracledb_ORCLCDB-19cconfigureVerifying:oracle-database-ee-19c-1.0-1.x86_641/1Installed:oracle-database-ee-19c.x86_640:1.0-1Complete!3.3. 创建数据库

[root@localhostsysconfig]#/etc/init.d/oracledb_ORCLCDB-19cconfigureConfiguringOracleDatabaseORCLCDB.Preparefordboperation8%completeCopyingdatabasefiles31%completeCreatingandstartingOracleinstance32%complete36%complete40%complete43%complete46%completeCompletingDatabaseCreation51%complete54%completeCreatingPluggableDatabases58%complete77%completeExecutingPostConfigurationActions100%completeDatabasecreationcomplete.Fordetailscheckthelogfilesat:/opt/oracle/cfgtoollogs/dbca/ORCLCDB.DatabaseInformation:GlobalDatabaseName:ORCLCDBSystemIdentifier(SID):ORCLCDBLookatthelogfile"/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log"forfurtherdetails.Databaseconfigurationcompletedsuccessfully.Thepasswordswereautogenerated,youmustchangethembyconnectingtothedatabaseusing'sqlplus/assysdba'astheoracleuser.四、 一键自动化安装4.1. 安装介质下载并上传

链接:https://pan.baidu.com/s/1tC7eLLp3JdRksLRWOfgPRg

提取码:0ajw

复制这段内容后打开百度网盘手机App,操作更方便哦

4.2. 挂载操作系统光盘

[root@localhost~]#mount/dev/sr0/mnt/mount:/dev/sr0iswrite-protected,mountingread-only


4.3. 执行一键安装

[root@localhost~]#shrhel7_oracle_1903_rpm_Install.sh----------------------------------------------------------------------------WelcometoPrudentWooOracle19.3DatabaseRPMInstallPackagePrudentWooQQ:286507175E-mail:happy-wuweilong@hotmail.com4.4. 输入数据库名称

PleaseInsertintoORACLENAME:woo--输入woo4.5. 创建数据库

------------------CreateOracleDatabase;Nameiswoo-----------------------ConfiguringOracleDatabasewoo.Preparefordboperation8%completeCopyingdatabasefiles31%completeCreatingandstartingOracleinstance32%complete36%complete40%complete43%complete46%completeCompletingDatabaseCreation51%complete54%completeCreatingPluggableDatabases58%complete77%completeExecutingPostConfigurationActions100%completeDatabasecreationcomplete.Fordetailscheckthelogfilesat:/opt/oracle/cfgtoollogs/dbca/woo.DatabaseInformation:GlobalDatabaseName:wooSystemIdentifier(SID):wooLookatthelogfile"/opt/oracle/cfgtoollogs/dbca/woo/woo.log"forfurtherdetails.Databaseconfigurationcompletedsuccessfully.Thepasswordswereautogenerated,youmustchangethembyconnectingtothedatabaseusing'sqlplus/assysdba'astheoracleuser.Changingpasswordforuseroracle.passwd:allauthenticationtokensupdatedsuccessfully.4.6. 最后配置数据库

sqlplus/assysdba<<EOFshutimmediatestartupmount;alterdatabasearchivelog;alterdatabaseopen;alterpluggabledatabaseallopen;EOF4.7. 安装完后检查数据库

sqlplus/assysdba<<EOFselectuserenv('language')fromdual;altersessionsetNLS_DATE_FORMAT='YYYY-MM-DDHH24:MI:SS';selectd.name,i.status,d.LOG_MODE,d.CREATEDfromv\$instancei,v\$databased;showpdbs;EOFSQL>USERENV('LANGUAGE')----------------------------------------------------AMERICAN_AMERICA.AL32UTF8SQL>NAMESTATUSLOG_MODECREATED----------------------------------------------------WOOOPENARCHIVELOG2020-06-0111:22:31SQL>CON_IDCON_NAMEOPENMODERESTRICTED------------------------------------------------------------2PDB$SEEDREADONLYNO3ORCLPDB1READWRITENO

“怎么安装RPM方式单机数据库”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!