首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Oracle Database Express 18.4版本:敏捷的二步安装法

Oracle Database Express 18.4版本:敏捷的二步安装法

作者头像
数据和云01
发布2020-03-27 08:25:25
4140
发布2020-03-27 08:25:25
举报
文章被收录于专栏:数据库新发现数据库新发现

可能有些朋友还不知道,Oracle 推出了完全免费的 Express 版本,虽然存在一些功能限制,但是这个版本是完全免费的,只要你需要,可以随意适用。

可能有些朋友还不知道,Oracle 推出了完全免费的 Express 版本,虽然存在一些功能限制,但是这个版本是完全免费的,只要你需要,可以随意适用。

现在,Oracle 也将这个版本的安装简化到了极致。 安装这个版本,你只需要两个步骤:

  1. 第一:安装preinstall安装包
  2. 第二:安装数据库软件包

两者都简约到极致,第一步,下载安装预需求包:

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

第二步,安装数据库软件包,从 OTN 直接抓取软件,你不需要帐号,不需要登录:

yum -y install https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-18c-1.0-1.x86_64.rpm
image.png
image.png

一些基本的输出如下:

[root@enmodb1 ~]# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 
[root@enmodb1 ~]# 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
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 18244  100 18244    0     0   6888      0  0:00:02  0:00:02 --:--:--  6889
[root@enmodb1 ~]# yum -y localinstall oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
Loaded plugins: fastestmirror
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
Loading mirror speeds from cached hostfile
 * base: mirrors.cqu.edu.cn
 * epel: mirrors.yun-idc.com
 * extras: mirrors.cqu.edu.cn
 * updates: mirrors.cqu.edu.cn
--> Processing Dependency: compat-libstdc++-33 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: xorg-x11-utils 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 compat-libstdc++-33.x86_64 0:3.2.3-72.el7 will be installed
---> Package ksh.x86_64 0:20120801-139.el7 will be installed
---> Package xorg-x11-utils.x86_64 0:7.5-23.el7 will be installed
--> Processing Dependency: libdmx.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64
--> Processing Dependency: libXxf86dga.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64
--> Processing Dependency: libXv.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64
--> Running transaction check
---> Package libXv.x86_64 0:1.0.11-1.el7 will be installed
---> Package libXxf86dga.x86_64 0:1.1.4-2.1.el7 will be installed
---> Package libdmx.x86_64 0:1.1.3-3.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                   base                                                       19 k
 compat-libstdc++-33                     x86_64          3.2.3-72.el7                 base                                                      191 k
 ksh                                     x86_64          20120801-139.el7             base                                                      885 k
 libXv                                   x86_64          1.0.11-1.el7                 base                                                       18 k
 libXxf86dga                             x86_64          1.1.4-2.1.el7                base                                                       19 k
 libdmx                                  x86_64          1.1.3-3.el7                  base                                                       16 k
 xorg-x11-utils                          x86_64          7.5-23.el7                   base                                                      114 k

Transaction Summary
======================================================================================================================================================
Install  1 Package (+7 Dependent packages)

Total size: 1.3 M
Total download size: 1.2 M
Installed size: 4.3 M
Downloading packages:
(1/7): compat-libcap1-1.10-7.el7.x86_64.rpm                                                                                    |  19 kB  00:00:00     
(2/7): compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm                                                                             | 191 kB  00:00:00     
(3/7): libXv-1.0.11-1.el7.x86_64.rpm                                                                                           |  18 kB  00:00:00     
(4/7): libXxf86dga-1.1.4-2.1.el7.x86_64.rpm                                                                                    |  19 kB  00:00:00     
(5/7): ksh-20120801-139.el7.x86_64.rpm                                                                                         | 885 kB  00:00:00     
(6/7): libdmx-1.1.3-3.el7.x86_64.rpm                                                                                           |  16 kB  00:00:00     
(7/7): xorg-x11-utils-7.5-23.el7.x86_64.rpm                                                                                    | 114 kB  00:00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                 1.5 MB/s | 1.2 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : compat-libcap1-1.10-7.el7.x86_64                                                                                                   1/8 
  Installing : compat-libstdc++-33-3.2.3-72.el7.x86_64                                                                                            2/8 
  Installing : libXxf86dga-1.1.4-2.1.el7.x86_64                                                                                                   3/8 
  Installing : libXv-1.0.11-1.el7.x86_64                                                                                                          4/8 
  Installing : ksh-20120801-139.el7.x86_64                                                                                                        5/8 
  Installing : libdmx-1.1.3-3.el7.x86_64                                                                                                          6/8 
  Installing : xorg-x11-utils-7.5-23.el7.x86_64                                                                                                   7/8 
  Installing : oracle-database-preinstall-18c-1.0-1.el7.x86_64                                                                                    8/8 
  Verifying  : libdmx-1.1.3-3.el7.x86_64                                                                                                          1/8 
  Verifying  : ksh-20120801-139.el7.x86_64                                                                                                        2/8 
  Verifying  : libXv-1.0.11-1.el7.x86_64                                                                                                          3/8 
  Verifying  : oracle-database-preinstall-18c-1.0-1.el7.x86_64                                                                                    4/8 
  Verifying  : libXxf86dga-1.1.4-2.1.el7.x86_64                                                                                                   5/8 
  Verifying  : compat-libstdc++-33-3.2.3-72.el7.x86_64                                                                                            6/8 
  Verifying  : xorg-x11-utils-7.5-23.el7.x86_64                                                                                                   7/8 
  Verifying  : compat-libcap1-1.10-7.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   compat-libstdc++-33.x86_64 0:3.2.3-72.el7   ksh.x86_64 0:20120801-139.el7        libXv.x86_64 0:1.0.11-1.el7  
  libXxf86dga.x86_64 0:1.1.4-2.1.el7   libdmx.x86_64 0:1.1.3-3.el7                 xorg-x11-utils.x86_64 0:7.5-23.el7  

Complete!

安装数据库:

[root@enmodb1 ~]# yum -y install https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-18c-1.0-1.x86_64.rpm
Loaded plugins: fastestmirror
oracle-database-xe-18c-1.0-1.x86_64.rpm                                                                                        | 2.3 GB  00:33:09     
Examining /var/tmp/yum-root-EsjN01/oracle-database-xe-18c-1.0-1.x86_64.rpm: oracle-database-xe-18c-1.0-1.x86_64
Marking /var/tmp/yum-root-EsjN01/oracle-database-xe-18c-1.0-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-database-xe-18c.x86_64 0:1.0-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================
 Package                                 Arch                    Version                  Repository                                             Size
======================================================================================================================================================
Installing:
 oracle-database-xe-18c                  x86_64                  1.0-1                    /oracle-database-xe-18c-1.0-1.x86_64                  5.2 G

Transaction Summary
======================================================================================================================================================
Install  1 Package

Total size: 5.2 G
Installed size: 5.2 G
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : oracle-database-xe-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 Oracle Database XE, optionally modify the parameters in '/etc/sysconfig/oracle-xe-18c.conf' and then execute '/etc/init.d/oracle-xe-18c configure' as root.
  Verifying  : oracle-database-xe-18c-1.0-1.x86_64                                                                                                1/1 

Installed:
  oracle-database-xe-18c.x86_64 0:1.0-1                                                                                                               

Complete!

配置数据库:

[root@enmodb1 ~]# /etc/init.d/oracle-xe-18c configure
Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database XE.
Enter SYS user password: 
***********
Enter SYSTEM user password: 
************
Enter PDBADMIN User Password: 
**********
Prepare for db operation
7% complete
Copying database files
29% complete
Creating and starting Oracle instance
30% complete
31% complete
34% complete
  38% complete
41% complete
43% complete
Completing Database Creation
47% complete
50% complete
Creating Pluggable Databases
54% complete
71% complete
Executing Post Configuration Actions
93% complete
Running Custom Scripts
100% complete
Database creation complete. For details check the logfiles at:
 /opt/oracle/cfgtoollogs/dbca/XE.
Database Information:
Global Database Name:XE
System Identifier(SID):XE
Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.

Connect to Oracle Database using one of the connect strings:
     Pluggable database: enmodb1/XEPDB1
     Multitenant container database: enmodb1
Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE

连接数据库:

[oracle@enmodb1 ~]$ export ORACLE_SID=XE
[oracle@enmodb1 ~]$ export ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE
[oracle@enmodb1 ~]$ export PATH=$PATH:$ORACLE_HOME/bin
[oracle@enmodb1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Sat Feb 22 10:28:08 2020
Version 18.4.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.


Connected to:
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0
SQL> select banner from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/opt/oracle/oradata/XE/system01.dbf
/opt/oracle/oradata/XE/sysaux01.dbf
/opt/oracle/oradata/XE/undotbs01.dbf
/opt/oracle/oradata/XE/pdbseed/system01.dbf
/opt/oracle/oradata/XE/pdbseed/sysaux01.dbf
/opt/oracle/oradata/XE/users01.dbf
/opt/oracle/oradata/XE/pdbseed/undotbs01.dbf
/opt/oracle/oradata/XE/XEPDB1/system01.dbf
/opt/oracle/oradata/XE/XEPDB1/sysaux01.dbf
/opt/oracle/oradata/XE/XEPDB1/undotbs01.dbf
/opt/oracle/oradata/XE/XEPDB1/users01.dbf

11 rows selected.

现在学习和接触 Oracle 数据库变得很简单!

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-03-25 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
数据库
云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档