您好,登錄后才能下訂單哦!
這篇文章主要介紹了OL7.6中如何通過RPM方式安裝Oracle 19c,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。
設置主機名
[root@localhost ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.0.0.11 study1.localdomain study1 [root@localhost ~]# cat /etc/hostname study1.localdomain
安裝環境準備工具
其實直接rpm安裝即可,它會自動解決依賴問題包括環境準備工具,但是這樣oracle用戶沒有home目錄,所以單獨先安裝環境準備工具
[root@study1 /]# yum -y install oracle-database-preinstall-19c Loaded plugins: langpacks, ulninfo ol7_UEKR5 | 2.5 kB 00:00:00 ol7_latest | 2.7 kB 00:00:00 (1/4): ol7_UEKR5/x86_64/updateinfo | 49 kB 00:00:01 (2/4): ol7_latest/x86_64/updateinfo | 1.1 MB 00:00:05 (3/4): ol7_UEKR5/x86_64/primary_db | 5.7 MB 00:00:27 (4/4): ol7_latest/x86_64/primary_db | 19 MB 00:01:21 Resolving Dependencies (many more lines supressed) Installed: oracle-database-preinstall-19c.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 glibc-devel.x86_64 0:2.17-292.0.1.el7 glibc-headers.x86_64 0:2.17-292.0.1.el7 kernel-headers.x86_64 0:3.10.0-1062.el7 ksh.x86_64 0:20120801-139.0.1.el7 libaio-devel.x86_64 0:0.3.109-13.el7 libstdc++-devel.x86_64 0:4.8.5-39.0.1.el7 Dependency Updated: glibc.x86_64 0:2.17-292.0.1.el7 glibc-common.x86_64 0:2.17-292.0.1.el7 libstdc++.x86_64 0:4.8.5-39.0.1.el7 Complete! [root@study1 /]#
如果是rhel或者centos,就要手工先下載preinstall的rmp包,然后本地安裝(或者添加oracle linux的yum源來yum安裝)
[root@study1 /]# curl -o oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 18204 100 18204 0 0 18037 0 0:00:01 0:00:01 --:--:-- 18059 [root@study1 /]# yum -y localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
安裝oracle軟件
[root@study1 db]# yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm Loaded plugins: langpacks, ulninfo Examining oracle-database-ee-19c-1.0-1.x86_64.rpm: oracle-database-ee-19c-1.0-1.x86_64 Marking oracle-database-ee-19c-1.0-1.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package oracle-database-ee-19c.x86_64 0:1.0-1 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================================================================================== Installing: oracle-database-ee-19c x86_64 1.0-1 /oracle-database-ee-19c-1.0-1.x86_64 6.9 G Transaction Summary ======================================================================================================================================================================================================================== Install 1 Package Total size: 6.9 G Installed size: 6.9 G Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : oracle-database-ee-19c-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-19c configure Verifying : oracle-database-ee-19c-1.0-1.x86_64 1/1 Installed: oracle-database-ee-19c.x86_64 0:1.0-1 Complete! [root@study1 db]# oracle_home目錄是/opt/oracle/product/19c/dbhome_1
創建數據庫
[root@study1 dbhome_1]# /etc/init.d/oracledb_ORCLCDB-19c 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@study1 dbhome_1]#
這默認創建了名為ORCLCDB且pdb名ORCLPDB1的數據庫,當然可以不用這么創建,用傳統的dbca方式
優缺點
實際上這個方式并沒有什么用,比起來靜默安裝也并沒有顯得更容易,只能安裝數據庫軟件,并不能升級數據庫,而且不能用于rac,只能用于安裝單實例數據庫,整個部署沒有給予定制空間比如oracle_home目錄如果和你公司的磁盤規劃不一致呢,不過新手可能認為這樣更簡單,這個方式僅試試而已體會一下,實際生產中幾乎是不能用的
感謝你能夠認真閱讀完這篇文章,希望小編分享的“OL7.6中如何通過RPM方式安裝Oracle 19c”這篇文章對大家有幫助,同時也希望大家多多支持億速云,關注億速云行業資訊頻道,更多相關知識等著你來學習!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。