1 基于RPM 安装Oracle 说明
在Oracle 18c之前,只能通过通过安装包来安装数据库,配置也比较多,从Oracle 18.3开始支持通过RPM包来直接安装单实例数据,可以从官网下载到RPM安装文件,安装文件3.3G。
目前下载渠道有三个:
Oracle Technology Network
http://www.oracle.com/technetwork/indexes/downloads/index.html
Oracle Software Delivery Cloud portal (edelivery)
https://edelivery.oracle.com/
Unbreakable Linux Network (ULN)
https://linux.oracle.com/
基于RPM的安装只安装Oracle软件,RPM 安装包会执行安装前的检测,解压缩数据库软件,修改Oracle 软件的权限到之前配置的用户和组,维护Oracle inventory,执行安装需要需要执行的root操作。软件安装好之后,我们可以手动执行DBCA来创建数据库实例。当然,也可以使用/etc/init.d/oracledb_ORCLCDB-18c 服务配置脚本来创建实例。https://www.cndba.cn/dave/article/3093https://www.cndba.cn/dave/article/3093https://www.cndba.cn/dave/article/3093
当前基于RPM的安装有如下限制:
RPM 不支持对数据库打Patch,如果要打Patch还需要使用OPatch工具。
RPM 目前还不支持安装Standard Edition 2,该版本将在19c中支持。
Oracle 18c 中 SE2 和 EE 版本功能的区别
https://www.cndba.cn/dave/article/2980
RPM 不支持使用rpm -Uvh来升级,数据库的升级还只能使用通常的方法。
RPM 支持在同一台机器上安装多个版本的数据库软件到不同的Oracle Home。
2 安装示例
2.1 Oracle Linux
如果操作系统是Oracle Linux,并且配置了ULN (Unbreakable Linux Network),那么可以直接使用yum来自动安装。使用root用户执行如下命令:
# yum -y install oracle-database-ee-18c
该命令会下载和安装以来的RPM包和数据库软件RPM包。Oracle 软件完成之后可以执行DBCA来创建实例。https://www.cndba.cn/dave/article/3093https://www.cndba.cn/dave/article/3093
2.2 手工执行RPM
如果操作系统不是Oracle Linux,那么可以使用手工执行RPM包来进行安装。
https://www.cndba.cn/dave/article/3093
使用root用户登录系统。
下载和安装Oracle Preinstallation RPM。
# yum -y install oracle-database-preinstall-18c
对于Red Hat Enterprise Linux,执行一下命令:
先安装compat-libstdc++-33-3.2.3-61.x86_64.rpm包,该包在镜像里没有,需要单独下载来安装:
[root@www.cndba.cn/dave ~]# rpm -ivh compat-libstdc++-33-3.2.3-61.x86_64.rpm
warning: compat-libstdc++-33-3.2.3-61.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID e8562897: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:compat-libstdc++-33-3.2.3-61 ################################# [100%]
[root@www.cndba.cn/dave ~]#
[root@www.cndba.cn/dave ~]# curl -o oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLindatabase-preinstall-18c-1.0-1.el7.x86_64.rpm
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 18244 100 18244 0 0 13259 0 0:00:01 0:00:01 --:--:-- 13268
[root@www.cndba.cn/dave ~]#
[root@www.cndba.cn/dave ~]# rpm -ivh compat-libstdc++-33-3.2.3-61.x86_64.rpm
warning: compat-libstdc++-33-3.2.3-61.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID e8562897: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:compat-libstdc++-33-3.2.3-61 ################################# [100%]
[root@www.cndba.cn/dave ~]#
[root@www.cndba.cn/dave ~]#
[root@www.cndba.cn/dave ~]#
[root@www.cndba.cn/dave ~]#
[root@www.cndba.cn/dave ~]# yum -y localinstall oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Examining oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm: oracle-database-preinstall-18c-1.0-1.el7.x86_64
Marking oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-database-preinstall-18c.x86_64 0:1.0-1.el7 will be installed
--> Processing Dependency: compat-libcap1 for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
--> Processing Dependency: glibc-devel for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
--> Processing Dependency: ksh for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
--> Processing Dependency: libaio-devel for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
--> Processing Dependency: libstdc++-devel for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-7.el7 will be installed
---> Package glibc-devel.x86_64 0:2.17-222.el7 will be installed
--> Processing Dependency: glibc-headers = 2.17-222.el7 for package: glibc-devel-2.17-222.el7.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-222.el7.x86_64
---> Package ksh.x86_64 0:20120801-137.el7 will be installed
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
---> Package libstdc++-devel.x86_64 0:4.8.5-28.el7 will be installed
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-222.el7 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-222.el7.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-222.el7.x86_64
--> Running transaction check
---> Package kernel-headers.x86_64 0:3.10.0-862.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================
Package Arch Version Repository Size
===============================================================================================================
Installing:
oracle-database-preinstall-18c x86_64 1.0-1.el7 /oracle-database-preinstall-18c-1.0-1.el7.x86_64 55 k
Installing for dependencies:
compat-libcap1 x86_64 1.10-7.el7 cndba.cn 19 k
glibc-devel x86_64 2.17-222.el7 cndba.cn 1.1 M
glibc-headers x86_64 2.17-222.el7 cndba.cn 678 k
kernel-headers x86_64 3.10.0-862.el7 cndba.cn 7.1 M
ksh x86_64 20120801-137.el7 cndba.cn 885 k
libaio-devel x86_64 0.3.109-13.el7 cndba.cn 13 k
libstdc++-devel x86_64 4.8.5-28.el7 cndba.cn 1.5 M
Transaction Summary
===============================================================================================================
Install 1 Package (+7 Dependent packages)
Total size: 11 M
Total download size: 11 M
Installed size: 18 M
Downloading packages:
---------------------------------------------------------------------------------------------------------------
Total 48 MB/s | 11 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : kernel-headers-3.10.0-862.el7.x86_64 1/8
Installing : glibc-headers-2.17-222.el7.x86_64 2/8
Installing : glibc-devel-2.17-222.el7.x86_64 3/8
Installing : libaio-devel-0.3.109-13.el7.x86_64 4/8
Installing : libstdc++-devel-4.8.5-28.el7.x86_64 5/8
Installing : compat-libcap1-1.10-7.el7.x86_64 6/8
Installing : ksh-20120801-137.el7.x86_64 7/8
Installing : oracle-database-preinstall-18c-1.0-1.el7.x86_64 8/8
cndba.cn/productid | 1.6 kB 00:00:00
Verifying : ksh-20120801-137.el7.x86_64 1/8
Verifying : oracle-database-preinstall-18c-1.0-1.el7.x86_64 2/8
Verifying : compat-libcap1-1.10-7.el7.x86_64 3/8
Verifying : glibc-devel-2.17-222.el7.x86_64 4/8
Verifying : libstdc++-devel-4.8.5-28.el7.x86_64 5/8
Verifying : glibc-headers-2.17-222.el7.x86_64 6/8
Verifying : libaio-devel-0.3.109-13.el7.x86_64 7/8
Verifying : kernel-headers-3.10.0-862.el7.x86_64 8/8
Installed:
oracle-database-preinstall-18c.x86_64 0:1.0-1.el7
Dependency Installed:
compat-libcap1.x86_64 0:1.10-7.el7 glibc-devel.x86_64 0:2.17-222.el7 glibc-headers.x86_64 0:2.17-222.el7
kernel-headers.x86_64 0:3.10.0-862.el7 ksh.x86_64 0:20120801-137.el7 libaio-devel.x86_64 0:0.3.109-13.el7
libstdc++-devel.x86_64 0:4.8.5-28.el7
Complete!
[root@www.cndba.cn/dave ~]#
3. 使用yum localinstall命令安装数据库rpm包:
[root@www.cndba.cn/dave ~]# ls
anaconda-ks.cfg initial-setup-ks.cfg oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
compat-libstdc++-33-3.2.3-61.x86_64.rpm oracle-database-ee-18c-1.0-1.x86_64.rpm
[root@www.cndba.cn/dave ~]# yum -y localinstall oracle-database-ee-18c-1.0-1.x86_64.rpm
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Examining oracle-database-ee-18c-1.0-1.x86_64.rpm: oracle-database-ee-18c-1.0-1.x86_64
Marking oracle-database-ee-18c-1.0-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-database-ee-18c.x86_64 0:1.0-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================
Installing:
oracle-database-ee-18c x86_64 1.0-1 /oracle-database-ee-18c-1.0-1.x86_64 7.8 G
Transaction Summary
======================================================================================================================================================
Install 1 Package
Total size: 7.8 G
Installed size: 7.8 G
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : oracle-database-ee-18c-1.0-1.x86_64 1/1
[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
Verifying : oracle-database-ee-18c-1.0-1.x86_64 1/1
Installed:
oracle-database-ee-18c.x86_64 0:1.0-1
Complete!
[root@www.cndba.cn/dave ~]#
2.3 创建和配置数据库实例
因为rpm包只安装软件,所以还需要创建数据库实例,可以选择DBCA工具来创建,也可以使用以下方法使用默认配置来创建实例。
使用root用户登录系统。
使用以下服务配置脚本创建实例:# /etc/init.d/oracledb_ORCLCDB-18c configure 当然,可以修改/etc/sysconfig/oracledb_ORCLCDB-18c.conf文件来编辑实例的配置参数。该脚本将创建一个ORCLCDB的数据库,其包含一个ORCLPDB1的PDB,默认的监听的端口是1521.
使用DBCA的方式都比较熟悉,这里不做说明,我们看下利用/etc/init.d/oracledb_ORCLCDB-18c服务的方式来创建。https://www.cndba.cn/dave/article/3093https://www.cndba.cn/dave/article/3093
查看配置文件:
[root@www.cndba.cn/dave ~]# cat /etc/sysconfig/oracledb_ORCLCDB-18c.conf
#This is a configuration file to setup the Oracle Database.
#It is used when running '/etc/init.d/oracledb_ORCLCDB configure'.
#Please use this file to modify the default listener port and the
#Oracle data location.
# LISTENER_PORT: Database listener
LISTENER_PORT=1521
# ORACLE_DATA_LOCATION: Database oradata location
ORACLE_DATA_LOCATION=/opt/oracle/oradata
# EM_EXPRESS_PORT: Oracle EM Express listener
EM_EXPRESS_PORT=5500
[root@www.cndba.cn/dave ~]#
查看服务文件:
[root@www.cndba.cn/dave ~]# cat /etc/init.d/oracledb_ORCLCDB-18c
#!/bin/bash
#
# chkconfig: 2345 80 05
# Description: This script is responsible for taking care of configuring the Oracle Database and its associated services.
#
# processname: oracledb_ORCLCDB-18c
# Red Hat or SuSE config: /etc/sysconfig/oracledb_ORCLCDB-18c
#
# Set path if path not set
case $PATH in
"") PATH=/bin:/usr/bin:/sbin:/etc
export PATH ;;
esac
# Check if the root user is running this script
if [ $(id -u) != "0" ]
then
echo "You must be root user to run the configurations script. Login as root user and try again."
exit 1
fi
# Setting the required environment variables
export ORACLE_HOME=/opt/oracle/product/18c/dbhome_1
export ORACLE_VERSION=18c
export ORACLE_SID=ORCLCDB
export TEMPLATE_NAME=General_Purpose.dbc
export CHARSET=AL32UTF8
export PDB_NAME=ORCLPDB1
export LISTENER_NAME=LISTENER
export NUMBER_OF_PDBS=1
export CREATE_AS_CDB=true
# General exports and vars
export PATH=$ORACLE_HOME/bin:$PATH
LSNR=$ORACLE_HOME/bin/lsnrctl
SQLPLUS=$ORACLE_HOME/bin/sqlplus
DBCA=$ORACLE_HOME/bin/dbca
ORACLE_OWNER=oracle
RETVAL=0
CONFIG_NAME="oracledb_$ORACLE_SID-$ORACLE_VERSION.conf"
CONFIGURATION="/etc/sysconfig/$CONFIG_NAME"
# Commands
if [ -z "$SU" ];then SU=/bin/su; fi
if [ -z "$GREP" ]; then GREP=/usr/bin/grep; fi
if [ ! -f "$GREP" ]; then GREP=/bin/grep; fi
# To start the DB
start()
{
check_for_configuration
RETVAL=$?
if [ $RETVAL -eq 1 ]
then
echo "The Oracle Database is not configured. You must run '/etc/init.d/oracledb_$ORACLE_SID-$ORACLE_VERSION configure' as the root user to configure the database."
exit
fi
# Check if the DB is already started
pmon=`ps -ef | egrep pmon_$ORACLE_SID'/>' | $GREP -v grep`
if [ "$pmon" = "" ];
then
# Unset the proxy env vars before calling sqlplus
unset_proxy_vars
echo "Starting Oracle Net Listener."
$SU -s /bin/bash $ORACLE_OWNER -c "$LSNR start $LISTENER_NAME" > /dev/null 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ]
then
echo "Oracle Net Listener started."
fi
echo "Starting Oracle Database instance $ORACLE_SID."
$SU -s /bin/bash $ORACLE_OWNER -c "$SQLPLUS -s /nolog << EOF
connect / as sysdba
startup
alter pluggable database all open
exit;
EOF" > /dev/null 2>&1
RETVAL1=$?
if [ $RETVAL1 -eq 0 ]
then
echo "Oracle Database instance $ORACLE_SID started."
fi
else
echo "The Oracle Database instance $ORACLE_SID is already started."
exit 0
fi
echo
if [ $RETVAL -eq 0 ] && [ $RETVAL1 -eq 0 ]
then
return 0
else
echo "Failed to start Oracle Net Listener using $ORACLE_HOME/bin/tnslsnr and Oracle Database using $ORACLE_HOME/bin/sqlplus."
exit 1
fi
}
# To stop the DB
stop()
{
check_for_configuration
RETVAL=$?
if [ $RETVAL -eq 1 ]
then
echo "The Oracle Database is not configured. You must run '/etc/init.d/oracledb_$ORACLE_SID-$ORACLE_VERSION configure' as the root user to configure the database."
exit 1
fi
# Check if the DB is already stopped
pmon=`ps -ef | egrep pmon_$ORACLE_SID'/>' | $GREP -v grep`
if [ "$pmon" = "" ]
then
echo "Oracle Database instance $ORACLE_SID is already stopped."
exit 1
else
# Unset the proxy env vars before calling sqlplus
unset_proxy_vars
echo "Shutting down Oracle Database instance $ORACLE_SID."
$SU -s /bin/bash $ORACLE_OWNER -c "$SQLPLUS -s /nolog << EOF
connect / as sysdba
shutdown immediate
exit;
EOF" > /dev/null 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ]
then
echo "Oracle Database instance $ORACLE_SID shut down."
fi
echo "Stopping Oracle Net Listener."
$SU -s /bin/bash $ORACLE_OWNER -c "$LSNR stop $LISTENER_NAME" > /dev/null 2>&1
RETVAL1=$?
if [ $RETVAL1 -eq 0 ]
then
echo "Oracle Net Listener stopped."
fi
fi
echo
if [ $RETVAL -eq 0 ] && [ $RETVAL1 -eq 0 ]
then
return 0
else
echo "Failed to stop Oracle Net Listener using $ORACLE_HOME/bin/tnslsnr and Oracle Database using $ORACLE_HOME/bin/sqlplus."
exit 1
fi
}
# To call DBCA to configure the DB
configure_perform()
{
# Unset the proxy env vars before calling dbca
unset_proxy_vars
echo "Configuring Oracle Database $ORACLE_SID."
$SU -s /bin/bash $ORACLE_OWNER -c "$DBCA -silent -createDatabase -gdbName $ORACLE_SID -templateName $TEMPLATE_NAME -characterSet $CHARSET -createAsContainerDatabase $CREATE_AS_CDB -numberOfPDBs $NUMBER_OF_PDBS -pdbName $PDB_NAME -createListener $LISTENER_NAME:$LISTENER_PORT -datafileDestination $ORACLE_DATA_LOCATION -sid $ORACLE_SID -autoGeneratePasswords -emConfiguration DBEXPRESS -emExpressPort $EM_EXPRESS_PORT"
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]
then
echo "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."
return 0
else
echo "Database configuration failed."
exit 1
fi
}
# Enh 27965939 - Unsets the proxy env variables
unset_proxy_vars()
{
if [ "$http_proxy" != "" ]
then
unset http_proxy
fi
if [ "$HTTP_PROXY" != "" ]
then
unset HTTP_PROXY
fi
if [ "$https_proxy" != "" ]
then
unset https_proxy
fi
if [ "$HTTPS_PROXY" != "" ]
then
unset HTTPS_PROXY
fi
}
# Check if the DB is already configured
check_for_configuration()
{
configfile=`$GREP --no-messages $ORACLE_SID:$ORACLE_HOME /etc/oratab` > /dev/null 2>&1
if [ "$configfile" = "" ]
then
return 1
fi
return 0
}
read_config_file()
{
if [ -f "$CONFIGURATION" ]
then
. "$CONFIGURATION"
else
echo "The Oracle Database is not configured. Unable to read the configuration file '$CONFIGURATION'"
exit 1;
fi
}
# Entry point to configure the DB
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
}
check_port_availability()
{
port=`netstat -n --tcp --listen | $GREP :$LISTENER_PORT`
if [ "$port" != "" ]
then
echo "Port $LISTENER_PORT appears to be in use by another application. Specify a different port in the configuration file '$CONFIGURATION'"
exit 1;
fi
}
# Validation method to check for port availability for Oracle EM Express
check_em_express_port_availability()
{
port=`netstat -n --tcp --listen | $GREP :$EM_EXPRESS_PORT`
if [ "$port" != "" ]
then
echo "Port $EM_EXPRESS_PORT appears to be in use by another application. Specify a different Oracle EM Express port in the configuration file '$CONFIGURATION'"
exit 1;
fi
}
restart()
{
# Check if the DB is already stopped
pmon=`ps -ef | egrep pmon_$ORACLE_SID'/>' | $GREP -v grep`
if [ "$pmon" = "" ]
then
start
else
stop
start
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
configure)
configure
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart|configure}"
exit 1
;;
esac
exit 0
[root@www.cndba.cn/dave ~]#
从脚本看,本质上就是一个静默安装,所以我们也可以修改数据库实例的相关信息,我们这里直接使用默认配置来创建实例:
[root@www.cndba.cn/dave ~]# /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.
[root@www.cndba.cn/dave ~]#
注意这里最后的提示,密码是是自动生成的,需要在Oracle用户使用’sqlplus / as sysdba’连接后进行修改。另外就是默认的ORACLE_HOME是:ORACLE_HOME=/opt/oracle/product/18c/dbhome_1,并且也没有配置Oracle用户的环境变量,如果要使用的方便些,还是要配置一下环境变量:
[oracle@18c oracle]$ export ORACLE_HOME=/opt/oracle/product/18c/dbhome_1
[oracle@18c oracle]$ sqlplus / as sysdba
bash: sqlplus: command not found...
[oracle@18c oracle]$ cd $ORACLE_HOME/bin
[oracle@18c bin]$ ./lsnrctl status
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 20-OCT-2018 13:24:53
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=18c)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 20-OCT-2018 13:00:30
Uptime 0 days 0 hr. 24 min. 23 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/18c/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=18c)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=18c)(PORT=5500))(Security=(my_wallet_directory=/opt/oracle/admin/ORCLCDB/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "78a324fcde881370e055810414b26e27" 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
[oracle@18c bin]$ ./sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 - Production on Sat Oct 20 13:25:05 2018
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name: ^C
[oracle@18c bin]$ export ORACLE_SID=ORCLCDB
[oracle@18c bin]$ ./sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 - Production on Sat Oct 20 13:26:23 2018
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 READ WRITE NO
至此,使用RPM安装Oracle 18.3 的示例结束。 从操作来看,安装还是简单很多,尤其是不能使用GUI界面的情况下。https://www.cndba.cn/dave/article/3093
版权声明:本文为博主原创文章,未经博主允许不得转载。