前言
Oracle 一鍵安裝腳本,演示 RedHat 9.4 ARM 一鍵安裝 Oracle 19C ARM 單機(jī)(全程無(wú)需人工干預(yù))。
?? 腳本下載地址:Shell腳本安裝Oracle數(shù)據(jù)庫(kù)
前置準(zhǔn)備
- 1、系統(tǒng)組安裝好操作系統(tǒng)(支持最小化安裝)
- 2、網(wǎng)絡(luò)組配置好主機(jī)網(wǎng)絡(luò),通常只需要一個(gè)公網(wǎng) IP 地址
- 3、DBA 創(chuàng)建軟件目錄:
mkdir /soft - 4、DBA 上傳 Oracle 安裝介質(zhì)(基礎(chǔ)包,補(bǔ)丁包)到 /soft 目錄下
- 5、DBA 上傳 Oracle 一鍵安裝腳本到 /soft 目錄下,授予腳本執(zhí)行權(quán)限:
chmod +x OracleshellInstall - 6、DBA 掛載主機(jī) ISO 鏡像,這里只需要 mount 上即可(這個(gè)很簡(jiǎn)單,不了解的可以百度下)
- 7、根據(jù)腳本安裝腳本以及實(shí)際情況,配置好腳本的安裝參數(shù),在 /soft 目錄下執(zhí)行一鍵安裝即可。
環(huán)境信息
# 主機(jī)版本
[root@rhel9-arm soft]# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="9.4 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.4 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"
# CPU 架構(gòu)
[root@rhel9-arm soft]# uname -m
aarch64
# 網(wǎng)絡(luò)信息
[root@rhel9-arm soft]# ip a
2: enp0s5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:1c:42:45:4b:b4 brd ff:ff:ff:ff:ff:ff
inet 10.211.55.14/24 brd 10.211.55.255 scope global dynamic noprefixroute enp0s5
valid_lft 1418sec preferred_lft 1418sec
inet6 fdb2:2c26:f4e4:0:21c:42ff:fe45:4bb4/64 scope global dynamic noprefixroute
valid_lft 2591987sec preferred_lft 604787sec
inet6 fe80::21c:42ff:fe45:4bb4/64 scope link noprefixroute
valid_lft forever preferred_lft forever
# 掛載本地 ISO 鏡像
[root@rhel9-arm soft]# mount /dev/sr0 /mnt/
mount: /mnt: WARNING: source write-protected, mounted read-only.
[root@rhel9-arm soft]# mount | grep iso9660 | grep -v "/run/media"
/dev/sr0 on /mnt type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048)
[root@rhel9-arm soft]# df -h|grep /mnt
/dev/sr0 8.8G 8.8G 0 100% /mnt
# 安裝包存放在 /soft 目錄下
[root@rhel9-arm soft]# ll
-rwx------. 1 root root 2415583176 7月 3 11:17 LINUX.ARM64_1919000_db_home.zip
-rwxr-xr-x. 1 root root 233906 7月 3 11:17 OracleShellInstall
確保安裝環(huán)境準(zhǔn)備完成后,即可執(zhí)行一鍵安裝。
安裝命令
使用標(biāo)準(zhǔn)生產(chǎn)環(huán)境安裝參數(shù):
# 根據(jù)腳本 README 或者 -h 命令提示,編輯好一鍵安裝命令,進(jìn)入 /soft 目錄執(zhí)行安裝:
[root@rhel9-arm ~]# cd /soft/
[root@rhel9-arm soft]# chmod +x OracleShellInstall
./OracleShellInstall -lf enp0s5 `# 主機(jī)網(wǎng)卡名稱`\
-n rhel9-arm `# 主機(jī)名`\
-op 'P@ssw0rd!123' `# 主機(jī) oracle 用戶密碼`\
-d /u01 `# Oracle 軟件安裝基礎(chǔ)目錄`\
-ord /oradata `# 數(shù)據(jù)庫(kù)文件存放目錄`\
-o lucifer `# 數(shù)據(jù)庫(kù)名稱`\
-dp 'Passw0rd#PST' `# sys/system 用戶密碼`\
-ds AL32UTF8 `# 數(shù)據(jù)庫(kù)字符集`\
-ns AL16UTF16 `# 國(guó)家字符集`\
-redo 10 `# 在線重做日志大小(M)`\
-opd Y `# 是否優(yōu)化數(shù)據(jù)庫(kù)`
安裝過(guò)程
███████ ██ ████████ ██ ██ ██ ██ ██ ██ ██
██?????██ ?██ ██?????? ?██ ?██ ?██?██ ?██ ?██ ?██
██ ??██ ██████ ██████ █████ ?██ █████ ?██ ?██ █████ ?██ ?██?██ ███████ ██████ ██████ ██████ ?██ ?██
?██ ?██??██??█ ??????██ ██???██ ?██ ██???██?█████████?██████ ██???██ ?██ ?██?██??██???██ ██???? ???██? ??????██ ?██ ?██
?██ ?██ ?██ ? ███████ ?██ ?? ?██?███████????????██?██???██?███████ ?██ ?██?██ ?██ ?██??█████ ?██ ███████ ?██ ?██
??██ ██ ?██ ██????██ ?██ ██ ?██?██???? ?██?██ ?██?██???? ?██ ?██?██ ?██ ?██ ?????██ ?██ ██????██ ?██ ?██
??███████ ?███ ??████████??█████ ███??██████ ████████ ?██ ?██??██████ ███ ███?██ ███ ?██ ██████ ??██ ??████████ ███ ███
??????? ??? ???????? ????? ??? ?????? ???????? ?? ?? ?????? ??? ??? ?? ??? ?? ?????? ?? ???????? ??? ???
注意:本腳本僅用于新服務(wù)器上實(shí)施部署數(shù)據(jù)庫(kù)使用,嚴(yán)禁在已運(yùn)行數(shù)據(jù)庫(kù)的主機(jī)上執(zhí)行,以免發(fā)生數(shù)據(jù)丟失或者損壞,造成不可挽回的損失!!!
請(qǐng)選擇安裝模式 [單機(jī)(si)/單機(jī)ASM(sa)/集群(rac)] : si
數(shù)據(jù)庫(kù)安裝模式: single
請(qǐng)選擇數(shù)據(jù)庫(kù)版本 [11/12/19/21] : 19
數(shù)據(jù)庫(kù)版本: 19
正在進(jìn)行安裝前檢查,請(qǐng)稍等......
正在檢測(cè)安裝包 /soft/LINUX.ARM64_1919000_db_home.zip 的 MD5 值是否正確,請(qǐng)稍等......
OracleShellInstall 開(kāi)始安裝,詳細(xì)安裝過(guò)程可查看日志: tail -2000f /soft/print_shell_install_20240703112127.log
正在獲取操作系統(tǒng)信息......已完成 (耗時(shí): 1 秒)
正在配置本地軟件源......已完成 (耗時(shí): 1 秒)
正在安裝依賴包......已完成 (耗時(shí): 32 秒)
正在禁用防火墻......已完成 (耗時(shí): 1 秒)
正在禁用 selinux......已完成 (耗時(shí): 1 秒)
正在配置 nsyctl......已完成 (耗時(shí): 1 秒)
正在配置主機(jī)名和 /etc/hosts......已完成 (耗時(shí): 1 秒)
正在創(chuàng)建用戶和組......已完成 (耗時(shí): 1 秒)
正在創(chuàng)建安裝目錄......已完成 (耗時(shí): 1 秒)
正在配置透明大頁(yè) && NUMA && 磁盤(pán) IO 調(diào)度器......已完成 (耗時(shí): 1 秒)
正在配置操作系統(tǒng)參數(shù) sysctl......已完成 (耗時(shí): 1 秒)
正在配置 RemoveIPC......已完成 (耗時(shí): 1 秒)
正在配置用戶限制 limit......已完成 (耗時(shí): 1 秒)
正在配置 shm 目錄......已完成 (耗時(shí): 1 秒)
正在配置用戶環(huán)境變量......已完成 (耗時(shí): 1 秒)
正在解壓 Oracle 安裝包以及補(bǔ)丁......已完成 (耗時(shí): 35 秒)
正在安裝 Oracle 軟件以及補(bǔ)丁......已完成 (耗時(shí): 91 秒)
正在創(chuàng)建監(jiān)聽(tīng)......已完成 (耗時(shí): 1 秒)
正在創(chuàng)建數(shù)據(jù)庫(kù)......已完成 (耗時(shí): 247 秒)
正在優(yōu)化數(shù)據(jù)庫(kù)......已完成 (耗時(shí): 8 秒)
恭喜!Oracle 一鍵安裝執(zhí)行完成 (耗時(shí): 428 秒),現(xiàn)在是否重啟主機(jī):[Y/N] Y
正在重啟當(dāng)前節(jié)點(diǎn)主機(jī)......
連接測(cè)試
查看系統(tǒng)版本:
[root@rhel9-arm:/root]# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="9.4 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.4 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"
查看補(bǔ)丁信息:
[oracle@rhel9-arm:/home/oracle]$ sqlplus -v
SQL*Plus: Release 19.0.0.0.0 - Production
Version 19.19.0.0.0
[oracle@rhel9-arm:/home/oracle]$ opatch lspatches
此 Oracle 主目錄中未安裝任何臨時(shí)補(bǔ)丁程序 "/u01/app/oracle/product/19.3.0/db".
OPatch succeeded.
查看監(jiān)聽(tīng):
[oracle@rhel9-arm:/home/oracle]$ lsnrctl stat
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 03-JUL-2024 11:31:45
Copyright (c) 1991, 2023, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rhel9-arm)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 03-JUL-2024 11:30:58
Uptime 0 days 0 hr. 0 min. 46 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/19.3.0/db/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/rhel9-arm/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel9-arm)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "lucifer" has 1 instance(s).
Instance "lucifer", status READY, has 1 handler(s) for this service...
Service "luciferXDB" has 1 instance(s).
Instance "lucifer", status READY, has 1 handler(s) for this service...
The command completed successfully
連接數(shù)據(jù)庫(kù):
[oracle@rhel9-arm:/home/oracle]$ sas SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jul 3 11:31:51 2024 Version 19.19.0.0.0 Copyright (c) 1982, 2023, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.19.0.0.0 sys@LUCIFER 2024-07-03 11:31:51> show parameter name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cdb_cluster_name string cell_offloadgroup_name string db_file_name_convert string db_name string lucifer db_unique_name string lucifer global_names boolean FALSE instance_name string lucifer lock_name_space string log_file_name_convert string pdb_file_name_convert string processor_group_name string service_names string lucifer
數(shù)據(jù)庫(kù)可以正常連接。
最后修改時(shí)間:2026-03-23 16:39:49
「喜歡這篇文章,您的關(guān)注和贊賞是給作者最好的鼓勵(lì)」
關(guān)注作者
【版權(quán)聲明】本文為墨天輪用戶原創(chuàng)內(nèi)容,轉(zhuǎn)載時(shí)必須標(biāo)注文章的來(lái)源(墨天輪),文章鏈接,文章作者等基本信息,否則作者和墨天輪有權(quán)追究責(zé)任。如果您發(fā)現(xiàn)墨天輪中有涉嫌抄襲或者侵權(quán)的內(nèi)容,歡迎發(fā)送郵件至:contact@modb.pro進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),墨天輪將立刻刪除相關(guān)內(nèi)容。




