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
# 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後,手動安裝。
下載地址:
該過程採取離線安裝,下載軟體包:
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安裝簡化了安裝過程,改進很多,建立可以根據指令碼內容針對於適合自己的資料庫資訊。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24585765/viewspace-2218439/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【18c】Oracle 18.3 RPM安裝Oracle
- mysql安裝------RPM包安裝及解除安裝MySql
- Oracle 18c安裝初體驗Oracle
- veritas cfs for oracle rac安裝過程。Oracle
- Nginx的介紹及安裝過程Nginx
- Oracle 19c RPM安裝Oracle
- APK安裝過程APK
- android apk安裝過程原始碼解析AndroidAPK原始碼
- yum如何解除安裝已安裝的rpm並安裝本地rpm包
- rpm與src.rpm區別及安裝
- oracle11g rac安裝過程Oracle
- mysql安裝(rpm)MySql
- RPM 解除安裝
- Nebula 2.5.0安裝過程及遇到的坑
- Webpack安裝配置及打包詳細過程Web
- ovm安裝過程及中斷處理
- RPM方式安裝oracle資料庫Oracle資料庫
- webpack的安裝過程Web
- selenium安裝過程
- Cocoapods安裝過程
- 【一】TYPORA安裝過程
- rpm包安裝升級與解除安裝
- Postgresql Linux版本安裝——RPM包安裝SQLLinux
- Oracle Linux 7.1 靜默安裝Oracle 18c RACOracleLinux
- redhat 3.9AS安裝oracle 9206RAC過程及配置RedhatOracle
- MySQL 5.6 RPM安裝MySql
- PostgreSQL 10.12 安裝系列 - 本地RPM安裝SQL
- Mysql for Linux安裝配置之—— rpm(bundle)安裝MySqlLinux
- MySQL 5.7 原始碼安裝、Yum倉庫安裝、RPM安裝、二進位制安裝MySql原始碼
- Oracle 10g RAC 靜默安裝過程Oracle 10g
- Oracle 10g for AIX5.2安裝過程Oracle 10gAI
- oracle10g for redhat as4 安裝過程。OracleRedhat
- Linux AS3 下安裝oracle的過程LinuxS3Oracle
- RabbitMQ安裝過程詳解MQ
- 安裝wampserver的過程Server
- 原始碼包安裝過程原始碼
- apache、php、mysql安裝過程ApachePHPMySql
- linux安裝pymssql過程LinuxSQL