ITPub博客

首页 > 数据库 > Oracle > 【kingsql分享】OEL7.6安装Oracle18c RPM新玩法

【kingsql分享】OEL7.6安装Oracle18c RPM新玩法

原创 Oracle 作者:kingsql 时间:2018-11-29 14:46:10 0 删除 编辑

1.首先下载安装preinstall包

[root@kingsql01 ~]# yum -y install oracle-database-preinstall-18c


2.编辑以前那些文件

[root@kingsql01 ~]# vi /etc/hosts

[root@kingsql01 ~]# vi /etc/sysconfig/selinux

[root@kingsql01 ~]# vi /etc/security/limits.conf

[root@kingsql01 ~]# vi /etc/pam.d/login


3.编辑oracle用户的.bash_profile

[oracle@kingsql01 ~]$ vi .bash_profile 


4.下面进入精彩时刻

[root@kingsql01 ~]# yum -y localinstall oracle-database-ee-18c-1.0-1.x86_64.rpm 

Loaded plugins: langpacks, ulninfo

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!


由此可见,快乐的时光总是短暂的,人生还需修行


5.创建数据库

[root@kingsql01 ~]# /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.


没有NETCA的步骤了,监听器自动建好了


6.连接数据库

[oracle@kingsql01 ~]$ export ORACLE_SID=ORCLCDB

[oracle@kingsql01 ~]$ sqlplus / as sysdba


SQL*Plus: Release 18.0.0.0.0 - Production on Thu Nov 29 14:42:20 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 pdbs;


    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

         2 PDB$SEED                       READ ONLY  NO

         3 ORCLPDB1                       READ WRITE NO



转载请注明出处

hongzhuohui@qq.com

本来好几年没有更新博客了,最近我的学生们都在勤劳的写博客,所以带动了我。。

--------------------------------------------------------------------------------------------------------------

我曾发现有写网站直接拷贝粘贴,连图片都能复制,请把作者也加上谢谢O(∩_∩)O

--------------------------------------------------------------------------------------------------------------


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28389881/viewspace-2222109/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
OCM

注册时间:2013-02-28

  • 博文量
    237
  • 访问量
    859088