gpt4 book ai didi

CentOS7下Oracle19c rpm安装过程

转载 作者:qq735679552 更新时间:2022-09-29 22:32:09 27 4
gpt4 key购买 nike

CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.

这篇CFSDN的博客文章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硬盘.

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

?
1
2
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.rpm和oracle-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 。

CentOS7下Oracle19c rpm安装过程

三. 安装配置oracle 19c

安装oracle 19c 。

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

CentOS7下Oracle19c rpm安装过程

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

/etc/init.d/oracledb_orclcdb-19c configure 。

CentOS7下Oracle19c rpm安装过程

配置环境变量 。

却换到oracle用户 。

su - oracle 。

添加环境变量 。

vi /home/oracle/.bash_profile 。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# .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 。

CentOS7下Oracle19c rpm安装过程

修改system密码为123456 。

alter user system identified by 123456,

退出数据库 。

exit,

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

修改/etc/oratab文件n为y 。

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 。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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 文件局部 。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
#####################################
 
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 。

CentOS7下Oracle19c rpm安装过程

删除/opt下oracle-database-ee-19c-1.0-1.x86_64.rpm和oracle-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安装内容请搜索我以前的文章或继续浏览下面的相关文章希望大家以后多多支持我! 。

原文链接:https://www.cnblogs.com/z212021/p/14989385.html 。

最后此篇关于CentOS7下Oracle19c rpm安装过程的文章就讲到这里了,如果你想了解更多关于CentOS7下Oracle19c rpm安装过程的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com