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

kingsql發表於2018-11-29

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章