OL8.0靜默安裝Oracle 19C

来源:https://www.cnblogs.com/yongestcat/archive/2019/08/17/11364091.html
-Advertisement-
Play Games

首先在edelivery中下載Oracle Linux 8.0然後就預設安裝系統環境準備工具目前不支持OL8,所以需要手動安裝,首先設置內核參數,在/etc/sysctl.conf追加[root@localhost ~]# cat /etc/sysctl.conf |grep -v ^#|grep ... ...


首先在edelivery中下載Oracle Linux 8.0

image然後就預設安裝系統

image

image

環境準備工具目前不支持OL8,所以需要手動安裝,首先設置內核參數,在/etc/sysctl.conf追加

[root@localhost ~]# cat /etc/sysctl.conf |grep -v ^#|grep -v ^$
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
[root@localhost ~]# 

sysctl -p使參數生效

然後/etc/security/limits.d/oracle-database-preinstall-19c.conf中添加

[root@localhost limits.d]# cat /etc/security/limits.d/oracle-database-preinstall-19c.conf
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728
[root@localhost limits.d]# 

安裝依賴軟體

dnf install -y bc binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libXrender libXrender-devel libX11 libXau libXi libXtst libgcc librdmacm-devel libstdc++ libstdc++-devel libxcb make net-tools nfs-utils python3 python3-configshell python3-rtslib python3-six targetcli smartmontools sysstat unixODBC libnsl libnsl.i686 libnsl2 libnsl2.i686

創建用戶組和用戶

[root@localhost limits.d]# groupadd -g 1001 oinstall
[root@localhost limits.d]# groupadd -g 1002 dba
[root@localhost limits.d]# groupadd -g 1003 oper
[root@localhost limits.d]# useradd -u 1001 -g oinstall -G dba,oper oracle
[root@localhost limits.d]# passwd oracle
Changing password for user oracle.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@localhost limits.d]# 

創建目錄

[root@localhost ~]# mkdir -p /u01/app/oraInventory
[root@localhost ~]# mkdir -p /u01/app/oracle/product/19.3.0/dbhome_1
[root@localhost ~]# chown -R oracle: /u01/app/oraInventory
[root@localhost ~]# chown -R oracle: /u01/app/oracle
[root@localhost ~]# su - oracle
[oracle@localhost db]$ unzip -q /stage/db/V982063-01.zip -d /u01/app/oracle/product/19.3.0/dbhome_1/
[oracle@localhost db]$ 

開始安裝,註意版本相容問題要先設置環境變數export CV_ASSUME_DISTID=RHEL7.6

[oracle@localhost ~]$ export CV_ASSUME_DISTID=RHEL7.6
[oracle@localhost ~]$ /u01/app/oracle/product/19.3.0/dbhome_1/runInstaller -ignorePrereq -waitforcompletion -silent \
>     -responseFile /u01/app/oracle/product/19.3.0/dbhome_1/install/response/db_install.rsp \
>     oracle.install.option=INSTALL_DB_SWONLY \
> .ORACLE_HOSTNAME=OL8.0_19C \
>     UNIX_GROUP_NAME=oinstall \
>     INVENTORY_LOCATION=/u01/app/oraInventory \
>     SELECTED_LANGUAGES=en,en_GB \
>     ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1 \
>     ORACLE_BASE=/u01/app/oracle \
>     oracle.install.db.InstallEdition=EE \
>     oracle.install.db.OSDBA_GROUP=dba \
>     oracle.install.db.OSBACKUPDBA_GROUP=dba \
>     oracle.install.db.OSDGDBA_GROUP=dba \
>     oracle.install.db.OSKMDBA_GROUP=dba \
>     oracle.install.db.OSRACDBA_GROUP=dba \
>     SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
>     DECLINE_SECURITY_UPDATES=true
Launching Oracle Database Setup Wizard...

The response file for this session can be found at:
 /u01/app/oracle/product/19.3.0/dbhome_1/install/response/db_2019-08-17_12-41-50PM.rsp

You can find the log of this install session at:
 /tmp/InstallActions2019-08-17_12-41-50PM/installActions2019-08-17_12-41-50PM.log

As a root user, execute the following script(s):
        1. /u01/app/oraInventory/orainstRoot.sh
        2. /u01/app/oracle/product/19.3.0/dbhome_1/root.sh

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes: 
[localhost]
Execute /u01/app/oracle/product/19.3.0/dbhome_1/root.sh on the following nodes: 
[localhost]


Successfully Setup Software.
Moved the install session logs to:
 /u01/app/oraInventory/logs/InstallActions2019-08-17_12-41-50PM
[oracle@localhost ~]$ su - root
Password: 
[root@localhost ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@localhost ~]# /u01/app/oracle/product/19.3.0/dbhome_1/root.sh
Check /u01/app/oracle/product/19.3.0/dbhome_1/install/root_localhost.localdomain_2019-08-17_12-44-20-885851348.log for the output of root script
[root@localhost ~]# 

代碼是

/u01/app/oracle/product/19.3.0/dbhome_1/runInstaller -ignorePrereq -waitforcompletion -silent \
    -responseFile /u01/app/oracle/product/19.3.0/dbhome_1/install/response/db_install.rsp \
    oracle.install.option=INSTALL_DB_SWONLY \
	ORACLE_HOSTNAME=OL8.0_19C \
    UNIX_GROUP_NAME=oinstall \
    INVENTORY_LOCATION=/u01/app/oraInventory \
    SELECTED_LANGUAGES=en,en_GB \
    ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1 \
    ORACLE_BASE=/u01/app/oracle \
    oracle.install.db.InstallEdition=EE \
    oracle.install.db.OSDBA_GROUP=dba \
    oracle.install.db.OSBACKUPDBA_GROUP=dba \
    oracle.install.db.OSDGDBA_GROUP=dba \
    oracle.install.db.OSKMDBA_GROUP=dba \
    oracle.install.db.OSRACDBA_GROUP=dba \
    SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
    DECLINE_SECURITY_UPDATES=true

靜默安裝資料庫,df -h先看看記憶體夠不夠,不夠就調整參數大小或者mount -o remount,size=4G /dev/shm

[root@localhost ~]# mount -o remount,size=4G /dev/shm
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ /u01/app/oracle/product/19.3.0/dbhome_1/bin/dbca -silent -createDatabase \
>      -templateName General_Purpose.dbc \
>      -gdbname cdb1 -sid  cdb1 -responseFile NO_VALUE \
>      -characterSet AL32UTF8 \
>      -sysPassword oracle \
>      -systemPassword oracle \
>      -createAsContainerDatabase true \
>      -numberOfPDBs 1 \
>      -pdbName pdb1 \
>      -pdbAdminPassword oracle \
>      -databaseType MULTIPURPOSE \
>      -automaticMemoryManagement false \
>      -totalMemory 2000 \
>      -storageType FS \
>      -datafileDestination "/u01/app/oracle/oradata" \
>      -redoLogFileSize 50 \
>      -emConfiguration NONE \
>      -ignorePreReqs
[WARNING] [DBT-11209] Current available memory is less than the required available memory (2,000MB) for creating the database.
   CAUSE: Following nodes do not have required available memory :
 Node:localhost         Available memory:1.8429GB (1932452.0KB)

[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. 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].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. 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].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. 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].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
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
53% 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:
 /u01/app/oracle/cfgtoollogs/dbca/cdb1.
Database Information:
Global Database Name:cdb1
System Identifier(SID):cdb1
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/cdb1/cdb1.log" for further details.
[oracle@localhost ~]$ 

代碼是

/u01/app/oracle/product/19.3.0/dbhome_1/bin/dbca -silent -createDatabase \
     -templateName General_Purpose.dbc \
     -gdbname cdb1 -sid  cdb1 -responseFile NO_VALUE \
     -characterSet AL32UTF8 \
     -sysPassword oracle \
     -systemPassword oracle \
     -createAsContainerDatabase true \
     -numberOfPDBs 1 \
     -pdbName pdb1 \
     -pdbAdminPassword oracle \
     -databaseType MULTIPURPOSE \
     -automaticMemoryManagement false \
     -totalMemory 2000 \
     -storageType FS \
     -datafileDestination "/u01/app/oracle/oradata" \
     -redoLogFileSize 50 \
     -emConfiguration NONE \
     -ignorePreReqs

修改/etc/oratab中預設的N為Y,以便讓資料庫隨系統的啟動一起啟動

[oracle@localhost ~]$ cat /etc/oratab |grep -v ^#|grep -v ^$
cdb1:/u01/app/oracle/product/19.3.0/dbhome_1:Y
[oracle@localhost ~]$ 

查看一下

[oracle@localhost ~]$ export ORACLE_SID=cdb1
[oracle@localhost ~]$ export ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1
[oracle@localhost ~]$ export ORACLE_BASE=/u01/app/oracle/
[oracle@localhost ~]$ export PATH=$PATH:$ORACLE_HOME/bin
[oracle@localhost ~]$ 
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Aug 17 14:20:38 2019
Version 19.3.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB1                           READ WRITE NO
SQL> alter system set db_create_file_dest='/u01/app/oracle/oradata';

System altered.

SQL> alter pluggable database pdb1 save state;

Pluggable database altered.

SQL> exit;
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@localhost ~]$ 

ojbk,have fun!


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 一、廢話兩句 在雲數據中心,一次幾十臺甚至幾百台伺服器上線,系統安裝將變得非常繁瑣,系統安裝好了後還會涉及很多配置,如果一臺台來安裝的話工作量非常大。(雖然有加班費,開個玩笑)為瞭解決這個問題,我們需要實現無人值守批量部署系統。 簡單看一下拓撲圖: 1. 什麼是PXE? 簡單來說:PXE主要是引導作 ...
  • 第一章Linux命令行簡介 1.1 Linux命令行概述 1.1.1 Linux 命令行的開啟和退出 開啟:登陸賬號密碼進入系統 退出:exit/logout 快捷鍵:Ctrl+d 1.1.2 Linux命令行提示符介紹 (1)提示符由PS1環境變數控制。實例代碼如下: [root@centos10 ...
  • 今天我們學習關於NTFS管理數據 以下是學習的內容NTFS分區和FAT32分區的區別,如何將FAT32分區轉化成NTFS分區,FAT 32 不支持大於4G ,NTFS許可權設置 ,EFS加密 ,文件夾的NTFS許可權 許可權累加, 查看對象的所有者,獲得對象的所有權,重置文件夾中所有對象的許可權,利用EFS ...
  • 把對應的不同文件內的代碼段,合併到一起,成為最後的可執行文件 鏈接的方式,讓我們在寫代碼的時候做到了“復用”。 同樣的功能代碼只要寫一次,然後提供給很多不同的程式進行鏈接就行了。 “鏈接”其實有點兒像我們日常生活中的 標準化、模塊化 生產。 有一個可以生產標準螺帽的生產線,就可生產很多不同的螺帽。 ...
  • 一、索引創建 1. 非結構化創建 2. 結構化創建 二、插入 1. 指定文檔ID插入 2. 自動產生文檔ID插入 三、修改 1. 直接修改文檔 2. 腳本修改文檔 四、刪除 1. 刪除文檔 2. 刪除索引 五、查詢 1. 簡單查詢 2. 條件查詢 3. 聚合查詢 ...
  • 參考:https://ci.apache.org/projects/flink/flink-docs-release-1.8/dev/api_concepts.html DataSet and DataStream Flink具有特殊類DataSet和DataStream來表示程式中的數據。 你可以 ...
  • 比爾·蓋茨在上世紀80年代說的“640K ought to be enough for anyone” 也就是“640K記憶體對哪個人來說都夠用了” 那個年代,微軟開發的還是DOS操作系統,程式員們還在絞盡腦汁,想要用好這極為有限的640K記憶體 而現在,我手頭的Mac Book Pro已經是16G記憶體 ...
  • 本機到本機的配置: 源端 10.1.83.144:1521/SIBP_GSDY HNSIB_GSDY目標端 10.1.83.144:1521/SIBP_GS HNSIB_GS進程名規劃 :OBB05 源端抽取進程及文件首碼:BG01_DY DY 目標端恢復進程:OBR01 //環境變數設置#for ...
一周排行
    -Advertisement-
    Play Games
  • GoF之工廠模式 @目錄GoF之工廠模式每博一文案1. 簡單說明“23種設計模式”1.2 介紹工廠模式的三種形態1.3 簡單工廠模式(靜態工廠模式)1.3.1 簡單工廠模式的優缺點:1.4 工廠方法模式1.4.1 工廠方法模式的優缺點:1.5 抽象工廠模式1.6 抽象工廠模式的優缺點:2. 總結:3 ...
  • 新改進提供的Taurus Rpc 功能,可以簡化微服務間的調用,同時可以不用再手動輸出模塊名稱,或調用路徑,包括負載均衡,這一切,由框架實現並提供了。新的Taurus Rpc 功能,將使得服務間的調用,更加輕鬆、簡約、高效。 ...
  • 本章將和大家分享ES的數據同步方案和ES集群相關知識。廢話不多說,下麵我們直接進入主題。 一、ES數據同步 1、數據同步問題 Elasticsearch中的酒店數據來自於mysql資料庫,因此mysql數據發生改變時,Elasticsearch也必須跟著改變,這個就是Elasticsearch與my ...
  • 引言 在我們之前的文章中介紹過使用Bogus生成模擬測試數據,今天來講解一下功能更加強大自動生成測試數據的工具的庫"AutoFixture"。 什麼是AutoFixture? AutoFixture 是一個針對 .NET 的開源庫,旨在最大程度地減少單元測試中的“安排(Arrange)”階段,以提高 ...
  • 經過前面幾個部分學習,相信學過的同學已經能夠掌握 .NET Emit 這種中間語言,並能使得它來編寫一些應用,以提高程式的性能。隨著 IL 指令篇的結束,本系列也已經接近尾聲,在這接近結束的最後,會提供幾個可供直接使用的示例,以供大伙分析或使用在項目中。 ...
  • 當從不同來源導入Excel數據時,可能存在重覆的記錄。為了確保數據的準確性,通常需要刪除這些重覆的行。手動查找並刪除可能會非常耗費時間,而通過編程腳本則可以實現在短時間內處理大量數據。本文將提供一個使用C# 快速查找並刪除Excel重覆項的免費解決方案。 以下是實現步驟: 1. 首先安裝免費.NET ...
  • C++ 異常處理 C++ 異常處理機制允許程式在運行時處理錯誤或意外情況。它提供了捕獲和處理錯誤的一種結構化方式,使程式更加健壯和可靠。 異常處理的基本概念: 異常: 程式在運行時發生的錯誤或意外情況。 拋出異常: 使用 throw 關鍵字將異常傳遞給調用堆棧。 捕獲異常: 使用 try-catch ...
  • 優秀且經驗豐富的Java開發人員的特征之一是對API的廣泛瞭解,包括JDK和第三方庫。 我花了很多時間來學習API,尤其是在閱讀了Effective Java 3rd Edition之後 ,Joshua Bloch建議在Java 3rd Edition中使用現有的API進行開發,而不是為常見的東西編 ...
  • 框架 · 使用laravel框架,原因:tp的框架路由和orm沒有laravel好用 · 使用強制路由,方便介面多時,分多版本,分文件夾等操作 介面 · 介面開發註意欄位類型,欄位是int,查詢成功失敗都要返回int(對接java等強類型語言方便) · 查詢介面用GET、其他用POST 代碼 · 所 ...
  • 正文 下午找企業的人去鎮上做貸後。 車上聽同事跟那個司機對罵,火星子都快出來了。司機跟那同事更熟一些,連我在內一共就三個人,同事那一手指桑罵槐給我都聽愣了。司機也是老社會人了,馬上聽出來了,為那個無辜的企業經辦人辯護,實際上是為自己辯護。 “這個事情你不能怪企業。”“但他們總不能讓銀行的人全權負責, ...