这篇文章主要介绍“Oracle 18c rpm安装的过程”,在日常操作中,相信很多人在Oracle 18c rpm安装的过程问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Oracle 18c rpm安装的过程”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
环境:
OEL 6.8
DB:18.3
安装过程中包括两个RPM包
oracle-database-ee-18c-1.0-1.x86_64.rpm
oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
安装过程分为在线安装和离线安装,决定于oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm。
在线安装:
# curl -o oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
# yum -y localinstall oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
离线安装,下载oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm后,手动安装。
下载地址:https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
该过程采取离线安装,下载软件包:
oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm软件包检查系统软件包,调整系统参数,添加数据库用户组和用户
通过shell脚本定制Oracle安装条件,实现最佳安装环境配置。
开始安装:
[root@oeldb soft]# rpm -ivh oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
warning: oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
compat-libcap1 is needed by oracle-database-preinstall-18c-1.0-1.el7.x86_64
compat-libstdc++-33 is needed by oracle-database-preinstall-18c-1.0-1.el7.x86_64
ksh is needed by oracle-database-preinstall-18c-1.0-1.el7.x86_64
libaio-devel is needed by oracle-database-preinstall-18c-1.0-1.el7.x86_64
libstdc++-devel is needed by oracle-database-preinstall-18c-1.0-1.el7.x86_64
xorg-x11-utils is needed by oracle-database-preinstall-18c-1.0-1.el7.x86_64
xorg-x11-xauth is needed by oracle-database-preinstall-18c-1.0-1.el7.x86_64
提示所需安装软件包:
[root@oeldb soft]# yum -y install xorg-x11-xauth xorg-x11-utils libstdc++-devel libaio-devel ksh compat-libstdc++-33 compat-libcap1
[root@oeldb soft]# rpm -ivh oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
Preparing... ########################################### [100%]
1:oracle-database-preinst########################################### [100%]
检查安装后环境:
[root@oeldb ~]# cat /etc/passwd | grep oracle
oracle:x:54321:54321::/home/oracle:/bin/bash
[root@oeldb ~]# more /etc/group| tail -10
stapsys:x:157:
stapdev:x:158:
tcpdump:x:72:
oinstall:x:54321:oracle
dba:x:54322:oracle
oper:x:54323:oracle
backupdba:x:54324:oracle
dgdba:x:54325:oracle
kmdba:x:54326:oracle
racdba:x:54330:oracle
检查RPM包内容:
[root@oeldb soft]# rpm -qlp oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
/etc/rc.d/init.d/oracle-database-preinstall-18c-firstboot
/etc/security/limits.d/oracle-database-preinstall-18c.conf
/etc/sysconfig/oracle-database-preinstall-18c
/etc/sysconfig/oracle-database-preinstall-18c/oracle-database-preinstall-18c-verify
/etc/sysconfig/oracle-database-preinstall-18c/oracle-database-preinstall-18c.param
/usr/bin/oracle-database-preinstall-18c-verify
/var/log/oracle-database-preinstall-18c
/var/log/oracle-database-preinstall-18c/results
解压软件包:
[root@oeldb soft]# rpm2cpio oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm | cpio -idmv
./etc/rc.d/init.d/oracle-database-preinstall-18c-firstboot
./etc/sysconfig/oracle-database-preinstall-18c
./etc/sysconfig/oracle-database-preinstall-18c/oracle-database-preinstall-18c-verify
./etc/sysconfig/oracle-database-preinstall-18c/oracle-database-preinstall-18c.param
./usr/bin/oracle-database-preinstall-18c-verify
./var/log/oracle-database-preinstall-18c
./var/log/oracle-database-preinstall-18c/results
数据库相关用户、组、参数:
./etc/sysconfig/oracle-database-preinstall-18c/oracle-database-preinstall-18c.param
安装数据库软件:
首先检查RPM包内容,包括创建数据库、监听、数据库软件,内容如下:
root@oeldb soft]# rpm -qlp oracle-database-ee-18c-1.0-1.x86_64.rpm
/etc/init.d/oracledb_ORCLCDB-18c
/etc/sysconfig/oracledb_ORCLCDB-18c.conf
/opt/oracle/product/18c
/opt/oracle/product/18c/dbhome_1
/opt/oracle/product/18c/dbhome_1/.opatchauto_storage
/opt/oracle/product/18c/dbhome_1/.opatchauto_storage/system_patches
/opt/oracle/product/18c/dbhome_1/.opatchauto_storage/system_patches/28096386
/opt/oracle/product/18c/dbhome_1/.opatchauto_storage/system_patches/28096386/bundle.xml
/opt/oracle/product/18c/dbhome_1/.opatchauto_storage/system_patches/systemPatchInformationStore.xml
/opt/oracle/product/18c/dbhome_1/.patch_storage
......
/opt/oracle/product/18c/dbhome_1/xdk/mesg/lsxtr.msb
/opt/oracle/product/18c/dbhome_1/xdk/mesg/lsxus.msb
/opt/oracle/product/18c/dbhome_1/xdk/mesg/lsxus.msg
/opt/oracle/product/18c/dbhome_1/xdk/mesg/lsxzhs.msb
/opt/oracle/product/18c/dbhome_1/xdk/mesg/lsxzht.msb
[root@oeldb soft]#
[root@oeldb soft]# rpm -ivh oracle-database-ee-18c-1.0-1.x86_64.rpm
Preparing... ########################################### [100%]
1:oracle-database-ee-18c ############################################### [100%]
[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-18c configure
检查文件内容:
/etc/init.d/oracledb_ORCLCDB-18c 文件中configure方法内容如下
......
configure()
{
check_for_configuration
RETVAL=$?
if [ $RETVAL -eq 0 ]
then
echo "Oracle Database instance $ORACLE_SID is already configured."
exit 1
fi
read_config_file
check_port_availability
check_em_express_port_availability
configure_perform
}
......
该文件包括数据库启动、停止、重启等相关脚本集合。
[root@oeldb ~]# more /etc/init.d/oracledb_ORCLCDB-18c | grep '()'
start()
stop()
configure_perform()
unset_proxy_vars()
check_for_configuration()
read_config_file()
configure()
check_port_availability()
check_em_express_port_availability()
restart()
创建数据库,默认创建sid:ORCLCDB,pdb_name:ORCLPDB1,可根据要求调整文件内容。
[root@oeldb ~]# /etc/init.d/oracledb_ORCLCDB-18c configure
Configuring Oracle Database ORCLCDB.
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
43% complete
46% complete
Completing Database Creation
51% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/opt/oracle/cfgtoollogs/dbca/ORCLCDB.
Database Information:
Global Database Name:ORCLCDB
System Identifier(SID):ORCLCDB
Look 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.
Oracle环境变量未配置,配置环境变量,检查监听
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/18c/dbhome_1
export ORACLE_SID=ORCLCDB
export PATH=$PATH:$ORACLE_HOME/bin
[oracle@oeldb ~]$ . .bash_profile
[oracle@oeldb ~]$ lsnrctl status
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 31-OCT-2018 14:54:11
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oeldb)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 31-OCT-2018 14:07:48
Uptime 0 days 0 hr. 46 min. 25 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/18c/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/oeldb/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oeldb)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=oeldb)(PORT=5500))(Security=(my_wallet_directory=/opt/oracle/admin/ORCLCDB/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "7981b2318b511a4ce053c80fa8c07ea4" has 1 instance(s).
Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "ORCLCDB" has 1 instance(s).
Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "ORCLCDBXDB" has 1 instance(s).
Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
Service "orclpdb1" has 1 instance(s).
Instance "ORCLCDB", status READY, has 1 handler(s) for this service...
The command completed successfully
测试停止、启动
[root@oeldb ~]# /etc/init.d/oracledb_ORCLCDB-18c stop
Shutting down Oracle Database instance ORCLCDB.
Oracle Database instance ORCLCDB shut down.
Stopping Oracle Net Listener.
Oracle Net Listener stopped.
[root@oeldb ~]# /etc/init.d/oracledb_ORCLCDB-18c start
Starting Oracle Net Listener.
Oracle Net Listener started.
Starting Oracle Database instance ORCLCDB.
Oracle Database instance ORCLCDB started.
整体上rpm安装简化了安装过程,改进很多,创建可以根据脚本内容针对于适合自己的数据库信息。
到此,关于“Oracle 18c rpm安装的过程”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。