CentOS7下Oracle19c rpm安装过程

软件 下载地址
CentOS-7-x86_64-Minimal-2009.iso http://mirrors.163.com/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso
oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm https://www.aliyundrive.com/s/F9ziMB6nPbp
oracle-database-ee-19c-1.0-1.x86_64.rpm https://www.aliyundrive.com/s/E6m5e8CCGq2

一. 环境配置

​虚拟机安装建议分2G内存,30G硬盘。

关闭防火墙(或放行相关端口)

systemctl stop firewalld
systemctl disable firewalld

关闭selinux

修改SELINUX=disabled

vi /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

重启

reboot

oracle-database-ee-19c-1.0-1.x86_64.rpmoracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm上传到/opt

二. 依赖安装

安装oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

yum -y localinstall /opt/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

三. 安装配置Oracle 19c

安装Oracle 19c

yum -y localinstall /opt/oracle-database-ee-19c-1.0-1.x86_64.rpm

初始化Oracle数据库(时间较长)

/etc/init.d/oracledb_ORCLCDB-19c configure

配置环境变量

却换到oracle用户

su - oracle

添加环境变量

vi /home/oracle/.bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
export PATH=$PATH:/opt/oracle/product/19c/dbhome_1/bin
export ORACLE_SID=ORCLCDB

使环境变量生效

source /home/oracle/.bash_profile

登陆数据库

sqlplus / as sysdba

修改system密码为123456

alter user system identified by 123456;

退出数据库

exit;

四. 设置数据库监听自启动

修改/etc/oratab文件NY

vi /etc/oratab

# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
ORCLCDB:/opt/oracle/product/19c/dbhome_1:Y

/etc/rc.local中添加需执行的命令

su root # 却换为root用户
vi /etc/rc.local

#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.

touch /var/lock/subsys/local

su - oracle -c 'lsnrctl start'
su - oracle -c 'dbstart'

修改$ORACLE_HOME/bin/dbstart文件,修改ORACLE_HOME_LISTNER=$ORACLE_HOME

vi $ORACLE_HOME/bin/dbstart

$ORACLE_HOME/bin/dbstart 文件局部

...
#####################################

LOGMSG="logger -puser.alert -s "

trap 'exit' 1 2 3

# for script tracing
case $ORACLE_TRACE in
  T) set -x ;;
esac

# Set path if path not set (if called from /etc/rc)
SAVE_PATH=/bin:/usr/bin:/etc:${PATH} ; export PATH
SAVE_LLP=$LD_LIBRARY_PATH

# First argument is used to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME
if [ ! $ORACLE_HOME_LISTNER ]; then
  echo "Since ORACLE_HOME is not set, cannot auto-start Oracle Net Listener."
  echo "Usage: $0 ORACLE_HOME"
else
...

设置CentOS7,8开机执行/etc/rc.local文件(CentOS7,8开机不执行/etc/rc.local文件)

/etc/rc.d/rc.local 添加 可执行权限

chmod a+x /etc/rc.d/rc.local

将 rc-local 服务设置成开机启动(默认状态是 static,会被其他service服务调用执行。不过还是修改一下,以防那个服务被停用就牵连了)

systemctl enable rc-local

重启,用sqldeveloper链接,验证是否成功

reboot

删除/optoracle-database-ee-19c-1.0-1.x86_64.rpmoracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

rm /opt/oracle-database-ee-19c-1.0-1.x86_64.rpm /opt/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

到此这篇关于CentOS7下Oracle19c rpm安装过程的文章就介绍到这了,更多相关Oracle19c rpm安装内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!

(0)

相关推荐

  • OL7.6上RPM方式安装Oracle 19c的教程

    设置主机名 [root@localhost ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.0.0.11 study1.localdomain study1 [root@localhost ~]# cat /

  • CentOS7下Oracle19c rpm安装过程

    软件 下载地址 CentOS-7-x86_64-Minimal-2009.iso http://mirrors.163.com/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm https://www.aliyundrive.com/s/F9ziMB6nPbp oracle-database-ee-19c-1.0-1.x8

  • VMware workstation16 中Centos7下MySQL8.0安装过程及Navicat远程连接

    目录 一.CentOS7+MySQL8.0,yum源安装 二.登录mysql以及修改密码 三.远程登录 1.MySQL yum源安装 2.安装后,首次登录mysql以及密码配置 3.远程登录问题(Navicat15为例) 一.CentOS7+MySQL8.0,yum源安装 1.安装mysql前应卸载原有mysql,如果没有请忽虑 1.1找出原有mysql安装目录 输入命令 rpm -qa | grep mysql 后出现以下几行 1.2用以下命令依次删除上述出现的文件 1.3删除mysl配置文件

  • CentOS7下 yum方式安装Nginx的实现步骤

    CentOS7下 yum方式安装Nginx的实现步骤 Nginx 是一个很强大的高性能Web和反向代理服务器,它具有众多非常优越的特性.诸如低开销,高并发,支持缓存,支持正反向代理,支持负载均衡,支持正则,支持rewrite等等不一而足.所以众多粉丝们也是不计其数.本文基于CentOS 7简要描述yum方式的安装部署,供大家参考. 如果是编译安装可以参考:Linux 6下安装编译安装Nginx 有关Nginx的常用配置可参考:Nginx 概述及日常管理 一.配置nginx yum源 演示环境 [

  • Centos7下使用yum安装mysql数据库的详细教程(增强版)

    在之前给大家分享过这篇文章:CentOS 7.0下使用yum安装mysql的方法详解,小编觉得不够详细,今天给大家通过本文给大家做个补充,感兴趣的朋友可以参考下. 1. 下载mysql的repo源 $ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 2. 安装mysql-community-release-el7-5.noarch.rpm包 $ sudo rpm -ivh mysql-community-re

  • CentOS7下 Apache的安装配置方法

    前些天安装了Nginx,为了好玩我就又安装Apache,Apache的安装还算顺利.在此做一下学习记录和经验分享. 一.安装httpd 1.先查看一下系统有没有已经安装了httpd的,如果啥都没查到,那就是没安装呗.如果有#rpm -e 查到的rpm报名,进行删除即可. #rpm -qa | grep httpd 2.我这里就直接使用yum安装了(会自动安装依赖包),为了简单方便. yum -y install httpd 3.httpd -v 查看安装版本,安装成功之后,查找配置文件位置,对h

  • Centos7下源码安装Python3 及shell 脚本自动安装Python3的教程

    一.源码安装 首先安装开发工具包 yum groupinstall -y "Development tools" 安装依赖软件包 yum -y install gcc gcc-c++ zlib-devel bzip2-devel openssl-devel sqlite-devel readline-devel libffi-devel wget 上Python 官网 找源码包的下载地址 wget https://www.python.org/ftp/python/3.7.6/Pyth

  • Linux(CentOS7)使用 RPM 安装 mysql 8.0.11的教程

    一.安装准备工作 1.查看 Linux 相关信息(Linux 命令行操作) (1)查看 Linux 版本,用于下载对应的 mysql. [查看 Linux 信息:] uname -a (2)检查是否已经安装过 mysql. [检查 mysql 是否被安装]  rpm -qa | grep -i mysql 若安装过,会输出相关包名 [若有安装过 mysql,则删除相关文件]  rpm -e [--nodeps] 包名(此处包名是上面命令查出来的名字) 2.下载 mysql (1)官网地址 [官网

  • Centos7下nginx的安装与配置教程详解

    说明:软件安装的基础目录路径:/usr/local 所以下载软件的时候切换到此目录下下载直接解压即可 1.安装gcc gcc-c++依赖包 yum install -y gcc gcc-c++ 2.下载编译安装PCRE库 切换到usr/local目录下执行命令 下载安装包 wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.33/pcre-8.33.tar.gz 解压安装包 tar -zxvf pcre-8.36.tar.gz 编译安

  • Centos7下oracle12c的安装与配置图文教程(详细)

    一.硬件配置 CentOS7@VMware® Workstation 15 Pro,分配资源:CPU:2颗,内存:4GB,硬盘空间:30GB 二.软件准备 linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip SecureCRT 三.虚拟机的配置 挂载镜像,配置本地yum源 /etc/yum.repos.d 设置network.service(配ip) /etc/sysconfig/network-scripts/

  • CentOS7下MySQL5.7安装配置方法图文教程(YUM)

    安装环境:CentOS7 64位,MySQL5.7 1.配置YUM源 在MySQL官网中下载YUM源rpm安装包:http://dev.mysql.com/downloads/repo/yum/ # 下载mysql源安装包 shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm # 安装mysql源 shell> yum localinstall mysql57-community-rele

随机推荐