千家信息网

怎么安装RPM方式单机数据库

发表于:2024-10-21 作者:千家信息网编辑
千家信息网最后更新 2024年10月21日,本篇内容介绍了"怎么安装RPM方式单机数据库"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!一、 环境
千家信息网最后更新 2024年10月21日怎么安装RPM方式单机数据库

本篇内容介绍了"怎么安装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 ~]# systemctl stop firewalld[root@adg19c ~]# systemctl disable firewalldRemoved symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

2.2. 禁用NetworkManager服务

[root@adg19c ~]# systemctl stop NetworkManager[root@adg19c ~]# systemctl disable NetworkManager

2.3. 禁用SELINUX

[root@adg19c ~]# setenforce 0setenforce: SELinux is disabled[root@adg19c ~]# sed -i "/^SELINUX=/s#enforcing#disabled#" /etc/selinux/config

2.4. 配置HOSTS解析

[root@adg19c ~]# cat >> /etc/hosts < > 192.168.84.99         adg19c> EOF

2.5. 修改主机名

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

2.6. 配置NOZEROCONFIG

[root@adg19c ~]# cat >> /etc/sysconfig/network < NOZEROCONF=yes> EOF

2.7. 配置yum环境

[root@adg19c ~]# cat > /etc/yum.repos.d/local.repo < [base]> name=base> baseurl=file:///mnt> enabled=1> gpgcheck=0> multilib_policy=all> EOF[root@adg19c ~]# yum clean all && yum makecacheLoaded plugins: product-id, search-disabled-repos, subscription-managerThis system is not registered with an entitlement server. You can use subscription-manager to register.Cleaning repos: base

2.8. 上传并安装compat-libstdc++

[root@adg19c ~]# rpm -ivh /home/oracle/compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm warning: /home/oracle/compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEYPreparing...                          ################################# [100%]Updating / installing...   1:compat-libstdc++-33-3.2.3-69.el6 ################################# [100%]

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

三、 安装数据库

3.1. 预安装

[root@localhost ~]# ls -rtltotal 2631532-rw-r--r--. 1 root root      18204 Apr 10 01:41 oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm-rw-r--r--. 1 root root 2694664264 Apr 10 01:42 oracle-database-ee-19c-1.0-1.x86_64.rpm [root@localhost ~]# yum localinstall -y oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm Loaded plugins: ulninfoExamining oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm: oracle-database-preinstall-19c-1.0-1.el7.x86_64Marking oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm to be installedResolving Dependencies--> Running transaction check---> Package oracle-database-preinstall-19c.x86_64 0:1.0-1.el7 will be installed--> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================== Package                            Arch       Version         Repository                                            Size==========================================================================================================================Installing: oracle-database-preinstall-19c     x86_64     1.0-1.el7       /oracle-database-preinstall-19c-1.0-1.el7.x86_64      55 k Transaction Summary==========================================================================================================================Install  1 Package Total size: 55 kInstalled size: 55 kDownloading packages:Running transaction checkRunning transaction testTransaction test succeededRunning transactionWarning: RPMDB altered outside of yum.  Installing : oracle-database-preinstall-19c-1.0-1.el7.x86_64                                                        1/1   Verifying  : oracle-database-preinstall-19c-1.0-1.el7.x86_64                                                        1/1  Installed:  oracle-database-preinstall-19c.x86_64 0:1.0-1.el7                                                                        Complete!

3.2. 安装数据库软件

[root@localhost ~]# yum localinstall -y oracle-database-ee-19c-1.0-1.x86_64.rpmLoaded plugins: ulninfoExamining oracle-database-ee-19c-1.0-1.x86_64.rpm: oracle-database-ee-19c-1.0-1.x86_64Marking oracle-database-ee-19c-1.0-1.x86_64.rpm to be installedResolving Dependencies--> Running transaction check---> Package oracle-database-ee-19c.x86_64 0:1.0-1 will be installed--> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================== Package                          Arch             Version           Repository                                      Size==========================================================================================================================Installing: oracle-database-ee-19c           x86_64           1.0-1             /oracle-database-ee-19c-1.0-1.x86_64           6.9 G Transaction Summary==========================================================================================================================Install  1 Package Total size: 6.9 GInstalled size: 6.9 GDownloading packages:Running transaction checkRunning transaction testTransaction test succeededRunning transaction  Installing : oracle-database-ee-19c-1.0-1.x86_64                                                                                     1/1 [INFO] Executing post installation scripts...[INFO] Oracle home installed successfully and ready to be configured.To configure a sample Oracle Database you can execute the following service configuration script as root: /etc/init.d/oracledb_ORCLCDB-19c configure  Verifying  : oracle-database-ee-19c-1.0-1.x86_64                                                                                     1/1  Installed:  oracle-database-ee-19c.x86_64 0:1.0-1                                                                                                     Complete!

3.3. 创建数据库

[root@localhost sysconfig]# /etc/init.d/oracledb_ORCLCDB-19c configureConfiguring Oracle Database ORCLCDB.Prepare for db operation8% completeCopying database files31% completeCreating and starting Oracle instance32% complete36% complete40% complete43% complete46% completeCompleting Database Creation51% complete54% completeCreating Pluggable Databases58% complete77% completeExecuting Post Configuration Actions100% completeDatabase creation complete. For details check the logfiles at: /opt/oracle/cfgtoollogs/dbca/ORCLCDB.Database Information:Global Database Name:ORCLCDBSystem Identifier(SID):ORCLCDBLook at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details. Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using 'sqlplus / as sysdba' as the oracle user.

四、 一键自动化安装

4.1. 安装介质下载并上传

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

提取码:0ajw

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

4.2. 挂载操作系统光盘

[root@localhost ~]# mount /dev/sr0 /mnt/mount: /dev/sr0 is write-protected, mounting read-only


4.3. 执行一键安装

[root@localhost ~]# sh rhel7_oracle_1903_rpm_Install.sh ----------------------------------------------------------------------------Welcome to PrudentWoo Oracle 19.3 Database RPM Install Package PrudentWoo QQ:286507175 E-mail:happy-wuweilong@hotmail.com

4.4. 输入数据库名称

Please Insert into ORACLE NAME: woo   --输入woo

4.5. 创建数据库

------------------ Create Oracle Database; Name is woo ----------------------- Configuring Oracle Database woo.Prepare for db operation8% completeCopying database files31% completeCreating and starting Oracle instance32% complete36% complete40% complete43% complete46% completeCompleting Database Creation51% complete54% completeCreating Pluggable Databases58% complete77% completeExecuting Post Configuration Actions100% completeDatabase creation complete. For details check the logfiles at: /opt/oracle/cfgtoollogs/dbca/woo.Database Information:Global Database Name:wooSystem Identifier(SID):wooLook at the log file "/opt/oracle/cfgtoollogs/dbca/woo/woo.log" for further details. Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using 'sqlplus / as sysdba' as the oracle user.Changing password for user oracle.passwd: all authentication tokens updated successfully.

4.6. 最后配置数据库

sqlplus / as sysdba  << EOFshut immediatestartup mount;alter database archivelog;alter database open;alter pluggable database all open;EOF

4.7. 安装完后检查数据库

sqlplus / as sysdba  << EOFselect userenv('language') from dual;alter session set NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS';select d.name,i.status,d.LOG_MODE,d.CREATED from v\$instance i,v\$database d;show pdbs;EOF SQL> USERENV('LANGUAGE')----------------------------------------------------AMERICAN_AMERICA.AL32UTF8 SQL> NAME      STATUS       LOG_MODE     CREATED--------- ------------ ------------ -------------------WOO       OPEN         ARCHIVELOG   2020-06-01 11:22:31 SQL>     CON_ID CON_NAME                       OPEN MODE  RESTRICTED---------- ------------------------------ ---------- ----------         2 PDB$SEED                       READ ONLY  NO         3 ORCLPDB1                       READ WRITE NO

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

0