您好,登錄后才能下訂單哦!
這篇文章主要介紹“Oracle 18c rpm安裝的過程”,在日常操作中,相信很多人在Oracle 18c rpm安裝的過程問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”O(jiān)racle 18c rpm安裝的過程”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!
環(huán)境:
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軟件包檢查系統(tǒng)軟件包,調(diào)整系統(tǒng)參數(shù),添加數(shù)據(jù)庫用戶組和用戶
通過shell腳本定制Oracle安裝條件,實現(xiàn)最佳安裝環(huán)境配置。
開始安裝:
[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%]
檢查安裝后環(huán)境:
[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包內(nèi)容:
[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
數(shù)據(jù)庫相關(guān)用戶、組、參數(shù):
./etc/sysconfig/oracle-database-preinstall-18c/oracle-database-preinstall-18c.param
安裝數(shù)據(jù)庫軟件:
首先檢查RPM包內(nèi)容,包括創(chuàng)建數(shù)據(jù)庫、監(jiān)聽、數(shù)據(jù)庫軟件,內(nèi)容如下:
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
檢查文件內(nèi)容:
/etc/init.d/oracledb_ORCLCDB-18c 文件中configure方法內(nèi)容如下
......
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
}
......
該文件包括數(shù)據(jù)庫啟動、停止、重啟等相關(guān)腳本集合。
[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()
創(chuàng)建數(shù)據(jù)庫,默認創(chuàng)建sid:ORCLCDB,pdb_name:ORCLPDB1,可根據(jù)要求調(diào)整文件內(nèi)容。
[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環(huán)境變量未配置,配置環(huán)境變量,檢查監(jiān)聽
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安裝簡化了安裝過程,改進很多,創(chuàng)建可以根據(jù)腳本內(nèi)容針對于適合自己的數(shù)據(jù)庫信息。
到此,關(guān)于“Oracle 18c rpm安裝的過程”的學習就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續(xù)學習更多相關(guān)知識,請繼續(xù)關(guān)注億速云網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。