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 |
一. 環(huán)境配置
虛擬機(jī)安裝建議分2G內(nèi)存,30G硬盤。
關(guān)閉防火墻(或放行相關(guān)端口)
systemctl stop firewalld systemctl disable firewalld
關(guān)閉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
三. 安裝配置Oracle 19c
安裝Oracle 19c
yum -y localinstall /opt/oracle-database-ee-19c-1.0-1.x86_64.rpm
初始化Oracle數(shù)據(jù)庫(kù)(時(shí)間較長(zhǎng))
/etc/init.d/oracledb_ORCLCDB-19c configure
配置環(huán)境變量
卻換到oracle
用戶
su - oracle
添加環(huán)境變量
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
使環(huán)境變量生效
source /home/oracle/.bash_profile
登陸數(shù)據(jù)庫(kù)
sqlplus / as sysdba
修改system
密碼為123456
alter user system identified by 123456;
退出數(shù)據(jù)庫(kù)
exit;
四. 設(shè)置數(shù)據(jù)庫(kù)監(jiān)聽自啟動(dòng)
修改/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
中添加需執(zhí)行的命令
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 ...
設(shè)置CentOS7,8開機(jī)執(zhí)行/etc/rc.local
文件(CentOS7,8開機(jī)不執(zhí)行/etc/rc.local
文件)
給 /etc/rc.d/rc.local
添加 可執(zhí)行權(quán)限
chmod a+x /etc/rc.d/rc.local
將 rc-local 服務(wù)設(shè)置成開機(jī)啟動(dòng)(默認(rèn)狀態(tài)是 static,會(huì)被其他service服務(wù)調(diào)用執(zhí)行。不過還是修改一下,以防那個(gè)服務(wù)被停用就牽連了)
systemctl enable rc-local
重啟,用sqldeveloper
鏈接,驗(yàn)證是否成功
reboot
刪除/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
到此這篇關(guān)于CentOS7下Oracle19c rpm安裝過程的文章就介紹到這了,更多相關(guān)Oracle19c rpm安裝內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
使用PLSQL遠(yuǎn)程連接Oracle數(shù)據(jù)庫(kù)的方法(內(nèi)網(wǎng)穿透)
Oracle數(shù)據(jù)庫(kù)來(lái)源于知名大廠甲骨文公司,是一款通用數(shù)據(jù)庫(kù)系統(tǒng),能提供完整的數(shù)據(jù)管理功能,而Oracle數(shù)據(jù)庫(kù)時(shí)關(guān)系數(shù)據(jù)庫(kù)的典型代表,其數(shù)據(jù)關(guān)系設(shè)計(jì)完備,這篇文章主要介紹了使用PLSQL遠(yuǎn)程連接Oracle數(shù)據(jù)庫(kù)的方法(內(nèi)網(wǎng)穿透),需要的朋友可以參考下2023-03-03Oracle定義DES加密解密及MD5加密函數(shù)示例
本節(jié)主要介紹了Oracle中定義DES加密解密及MD5加密函數(shù),感興趣的朋友可以參考下2014-08-08oracle 發(fā)送郵件 實(shí)現(xiàn)方法
oracle 發(fā)送郵件 實(shí)現(xiàn)方法2009-05-05Oracle數(shù)據(jù)庫(kù)下載及安裝圖文操作步驟
本文將介紹Oracle數(shù)據(jù)庫(kù)下載及安裝等一系列步驟,需要了解的朋友可以參考下2012-12-12oracle數(shù)據(jù)庫(kù)如何使用exp和imp命令導(dǎo)入導(dǎo)出數(shù)據(jù)
這篇文章主要給大家介紹了關(guān)于oracle數(shù)據(jù)庫(kù)如何使用exp和imp命令導(dǎo)入導(dǎo)出數(shù)據(jù)的相關(guān)資料,Oracle的EXP(Export)和 IMP(Import)是兩個(gè)非常重要的命令,它們用于數(shù)據(jù)庫(kù)的備份和恢復(fù),需要的朋友可以參考下2024-07-07oracle與gbase8s遷移數(shù)據(jù)類型對(duì)照以及舉例說(shuō)明
gbase8s是一個(gè)高性能的分布式關(guān)系型數(shù)據(jù)庫(kù),下面這篇文章主要給大家介紹了關(guān)于oracle與gbase8s遷移數(shù)據(jù)類型對(duì)照以及舉例說(shuō)明的相關(guān)資料,文中通過圖文介紹的非常詳細(xì),需要的朋友可以參考下2023-12-12Oracle的RBO和CBO詳細(xì)介紹和優(yōu)化模式設(shè)置方法
這篇文章主要介紹了Oracle的RBO和CBO詳細(xì)介紹和優(yōu)化模式設(shè)置方法,RBO即基于規(guī)則的優(yōu)化方式(Rule-Based Optimization),CBO即基于代價(jià)的優(yōu)化方式(Cost-Based Optimization),需要的朋友可以參考下2014-07-07