飞道的博客

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

377人阅读  评论(0)

墨天轮原文链接:https://www.modb.pro/db/21800?ywm

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

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

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

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

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


  
  1. 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
  2. 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

一些基本的输出如下:


  
  1. [root@enmodb1 ~]# cat /etc/redhat-release
  2. CentOS Linux release 7.2.1511 (Core)
  3. [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
  4. % Total % Received % Xferd Average Speed Time Time Time Current
  5. Dload Upload Total Spent Left Speed
  6. 100 18244 100 18244 0 0 6888 0 0:00:02 0:00:02 --:--:-- 6889
  7. [root@enmodb1 ~]# yum -y localinstall oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
  8. Loaded plugins: fastestmirror
  9. Examining oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm: oracle-database-preinstall-18c-1.0-1.el7.x86_64
  10. Marking oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm to be installed
  11. Resolving Dependencies
  12. --> Running transaction check
  13. ---> Package oracle-database-preinstall-18c.x86_64 0:1.0-1.el7 will be installed
  14. --> Processing Dependency: compat-libcap1 for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
  15. Loading mirror speeds from cached hostfile
  16. * base: mirrors.cqu.edu.cn
  17. * epel: mirrors.yun-idc.com
  18. * extras: mirrors.cqu.edu.cn
  19. * updates: mirrors.cqu.edu.cn
  20. --> Processing Dependency: compat-libstdc++-33 for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
  21. --> Processing Dependency: ksh for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
  22. --> Processing Dependency: xorg-x11-utils for package: oracle-database-preinstall-18c-1.0-1.el7.x86_64
  23. --> Running transaction check
  24. ---> Package compat-libcap1.x86_64 0:1.10-7.el7 will be installed
  25. ---> Package compat-libstdc++-33.x86_64 0:3.2.3-72.el7 will be installed
  26. ---> Package ksh.x86_64 0:20120801-139.el7 will be installed
  27. ---> Package xorg-x11-utils.x86_64 0:7.5-23.el7 will be installed
  28. --> Processing Dependency: libdmx.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64
  29. --> Processing Dependency: libXxf86dga.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64
  30. --> Processing Dependency: libXv.so.1()(64bit) for package: xorg-x11-utils-7.5-23.el7.x86_64
  31. --> Running transaction check
  32. ---> Package libXv.x86_64 0:1.0.11-1.el7 will be installed
  33. ---> Package libXxf86dga.x86_64 0:1.1.4-2.1.el7 will be installed
  34. ---> Package libdmx.x86_64 0:1.1.3-3.el7 will be installed
  35. --> Finished Dependency Resolution
  36. Dependencies Resolved
  37. ======================================================================================================================================================
  38. Package Arch Version Repository Size
  39. ======================================================================================================================================================
  40. Installing:
  41. oracle-database-preinstall-18c x86_64 1.0-1.el7 /oracle-database-preinstall-18c-1.0-1.el7.x86_64 55 k
  42. Installing for dependencies:
  43. compat-libcap1 x86_64 1.10-7.el7 base 19 k
  44. compat-libstdc++-33 x86_64 3.2.3-72.el7 base 191 k
  45. ksh x86_64 20120801-139.el7 base 885 k
  46. libXv x86_64 1.0.11-1.el7 base 18 k
  47. libXxf86dga x86_64 1.1.4-2.1.el7 base 19 k
  48. libdmx x86_64 1.1.3-3.el7 base 16 k
  49. xorg-x11-utils x86_64 7.5-23.el7 base 114 k
  50. Transaction Summary
  51. ======================================================================================================================================================
  52. Install 1 Package (+7 Dependent packages)
  53. Total size: 1.3 M
  54. Total download size: 1.2 M
  55. Installed size: 4.3 M
  56. Downloading packages:
  57. (1/7): compat-libcap1-1.10-7.el7.x86_64.rpm | 19 kB 00:00:00
  58. (2/7): compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm | 191 kB 00:00:00
  59. (3/7): libXv-1.0.11-1.el7.x86_64.rpm | 18 kB 00:00:00
  60. (4/7): libXxf86dga-1.1.4-2.1.el7.x86_64.rpm | 19 kB 00:00:00
  61. (5/7): ksh-20120801-139.el7.x86_64.rpm | 885 kB 00:00:00
  62. (6/7): libdmx-1.1.3-3.el7.x86_64.rpm | 16 kB 00:00:00
  63. (7/7): xorg-x11-utils-7.5-23.el7.x86_64.rpm | 114 kB 00:00:00
  64. ------------------------------------------------------------------------------------------------------------------------------------------------------
  65. Total 1.5 MB/s | 1.2 MB 00:00:00
  66. Running transaction check
  67. Running transaction test
  68. Transaction test succeeded
  69. Running transaction
  70. Installing : compat-libcap1-1.10-7.el7.x86_64 1/8
  71. Installing : compat-libstdc++-33-3.2.3-72.el7.x86_64 2/8
  72. Installing : libXxf86dga-1.1.4-2.1.el7.x86_64 3/8
  73. Installing : libXv-1.0.11-1.el7.x86_64 4/8
  74. Installing : ksh-20120801-139.el7.x86_64 5/8
  75. Installing : libdmx-1.1.3-3.el7.x86_64 6/8
  76. Installing : xorg-x11-utils-7.5-23.el7.x86_64 7/8
  77. Installing : oracle-database-preinstall-18c-1.0-1.el7.x86_64 8/8
  78. Verifying : libdmx-1.1.3-3.el7.x86_64 1/8
  79. Verifying : ksh-20120801-139.el7.x86_64 2/8
  80. Verifying : libXv-1.0.11-1.el7.x86_64 3/8
  81. Verifying : oracle-database-preinstall-18c-1.0-1.el7.x86_64 4/8
  82. Verifying : libXxf86dga-1.1.4-2.1.el7.x86_64 5/8
  83. Verifying : compat-libstdc++-33-3.2.3-72.el7.x86_64 6/8
  84. Verifying : xorg-x11-utils-7.5-23.el7.x86_64 7/8
  85. Verifying : compat-libcap1-1.10-7.el7.x86_64 8/8
  86. Installed:
  87. oracle-database-preinstall-18c.x86_64 0:1.0-1.el7
  88. Dependency Installed:
  89. 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
  90. 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
  91. Complete!

安装数据库:


  
  1. [ 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
  2. Loaded plugins: fastestmirror
  3. oracle-database-xe -18c -1.0 -1.x86_64.rpm | 2.3 GB 00: 33: 09
  4. 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
  5. Marking / var/tmp/yum-root-EsjN01/oracle-database-xe -18c -1.0 -1.x86_64.rpm to be installed
  6. Resolving Dependencies
  7. --> Running transaction check
  8. ---> Package oracle-database-xe -18c.x86_64 0: 1.0 -1 will be installed
  9. --> Finished Dependency Resolution
  10. Dependencies Resolved
  11. ======================================================================================================================================================
  12. Package Arch Version Repository Size
  13. ======================================================================================================================================================
  14. Installing:
  15. oracle-database-xe -18c x86_64 1.0 -1 /oracle-database-xe -18c -1.0 -1.x86_64 5.2 G
  16. Transaction Summary
  17. ======================================================================================================================================================
  18. Install 1 Package
  19. Total size: 5.2 G
  20. Installed size: 5.2 G
  21. Downloading packages:
  22. Running transaction check
  23. Running transaction test
  24. Transaction test succeeded
  25. Running transaction
  26. Installing : oracle-database-xe -18c -1.0 -1.x86_64 1/ 1
  27. [ INFO] Executing post installation scripts...
  28. [ INFO] Oracle home installed successfully and ready to be configured.
  29. 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.
  30. Verifying : oracle-database-xe -18c -1.0 -1.x86_64 1/ 1
  31. Installed:
  32. oracle-database-xe -18c.x86_64 0: 1.0 -1
  33. Complete!

配置数据库:


  
  1. [root@enmodb1 ~] # /etc/init.d/oracle-xe-18c configure
  2. 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:
  3. Confirm the password:
  4. Configuring Oracle Listener.
  5. Listener configuration succeeded.
  6. Configuring Oracle Database XE.
  7. Enter SYS user password:
  8. ***********
  9. Enter SYSTEM user password:
  10. ************
  11. Enter PDBADMIN User Password:
  12. **********
  13. Prepare for db operation
  14. 7% complete
  15. Copying database files
  16. 29% complete
  17. Creating and starting Oracle instance
  18. 30% complete
  19. 31% complete
  20. 34% complete
  21. 38% complete
  22. 41% complete
  23. 43% complete
  24. Completing Database Creation
  25. 47% complete
  26. 50% complete
  27. Creating Pluggable Databases
  28. 54% complete
  29. 71% complete
  30. Executing Post Configuration Actions
  31. 93% complete
  32. Running Custom Scripts
  33. 100% complete
  34. Database creation complete. For details check the logfiles at:
  35. /opt/oracle/cfgtoollogs/dbca/XE.
  36. Database Information:
  37. Global Database Name:XE
  38. System Identifier(SID) :XE
  39. Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.
  40. Connect to Oracle Database using one of the connect strings:
  41. Pluggable database: enmodb1/XEPDB1
  42. Multitenant container database: enmodb1
  43. Use https:/ /localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE

连接数据库:


  
  1. [oracle@enmodb1 ~]$ export ORACLE_SID=XE
  2. [oracle@enmodb1 ~]$ export ORACLE_HOME= /opt/oracle /product/ 18c/dbhomeXE
  3. [oracle@enmodb1 ~]$ export PATH=$PATH :$ORACLE_HOME/bin
  4. [oracle@enmodb1 ~]$ sqlplus / as sysdba
  5. SQL* Plus: Release 18.0. 0. 0. 0 - Production on Sat Feb 22 10 : 28 :08 2020
  6. Version 18.4. 0. 0. 0
  7. Copyright (c) 1982, 2018, Oracle. All rights reserved.
  8. Connected to:
  9. Oracle Database 18c Express Edition Release 18.0. 0. 0. 0 - Production
  10. Version 18.4. 0. 0. 0
  11. SQL> select banner from v$version;
  12. BANNER
  13. --------------------------------------------------------------------------------
  14. Oracle Database 18c Express Edition Release 18.0. 0. 0. 0 - Production
  15. SQL> select name from v$datafile;
  16. NAME
  17. --------------------------------------------------------------------------------
  18. /opt/oracle /oradata/XE/system01.dbf
  19. /opt/oracle/oradata/XE/sysaux01.dbf
  20. /opt/oracle/oradata/XE/undotbs01.dbf
  21. /opt/oracle/oradata/XE/pdbseed/system01.dbf
  22. /opt/oracle/oradata/XE/pdbseed/sysaux01.dbf
  23. /opt/oracle/oradata/XE/users01.dbf
  24. /opt/oracle/oradata/XE/pdbseed/undotbs01.dbf
  25. /opt/oracle/oradata/XE/XEPDB1/system01.dbf
  26. /opt/oracle/oradata/XE/XEPDB1/sysaux01.dbf
  27. /opt/oracle/oradata/XE/XEPDB1/undotbs01.dbf
  28. /opt/oracle/oradata/XE/XEPDB1/users01.dbf
  29. 11 rows selected.

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


转载:https://blog.csdn.net/eygle/article/details/105088412
查看评论
* 以上用户言论只代表其个人观点,不代表本网站的观点或立场