前言
Oracle 一鍵安裝腳本,演示 SUSE 12 SP5 一鍵安裝 Oracle 11GR2 單機(jī)(全程無(wú)需人工干預(yù))。
?? 腳本下載地址:Shell腳本安裝Oracle數(shù)據(jù)庫(kù)
前置準(zhǔn)備
- 1、安裝好操作系統(tǒng),建議安裝圖形化
- 2、配置好網(wǎng)絡(luò)
- 3、掛載本地 ISO 鏡像源
- 4、上傳軟件安裝包(安裝基礎(chǔ)包,補(bǔ)丁包)
- 5、上傳一鍵安裝腳本:OracleShellInstall
環(huán)境信息
# 主機(jī)版本
sles12:/soft # cat /etc/os-release
NAME="SLES"
VERSION="12-SP5"
VERSION_ID="12.5"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP5"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp5"
# 網(wǎng)絡(luò)信息
sles12:/soft # ip a
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:0c:29:a1:22:0b brd ff:ff:ff:ff:ff:ff
inet 192.168.6.199/24 brd 192.168.6.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fea1:220b/64 scope link
valid_lft forever preferred_lft forever
# 掛載本地 ISO 鏡像
sles12:/soft # mount | grep iso9660 | grep -v "/run/media"
/dev/sr0 on /mnt type iso9660 (ro,relatime,uid=0,gid=0,iocharset=utf8,mode=0400,dmode=0500)
sles12:/soft # df -h|grep /mnt
/dev/sr0 3.9G 3.9G 0 100% /mnt
# 安裝包存放在 /soft 目錄下
sles12:/soft # ll
-rwxr-xr-x 1 root root 198303 Apr 25 11:46 OracleShellInstall
-rwx------ 1 root root 1395582860 Apr 25 11:19 p13390677_112040_Linux-x86-64_1of7.zip
-rwx------ 1 root root 1151304589 Apr 25 11:19 p13390677_112040_Linux-x86-64_2of7.zip
-rwx------ 1 root root 562188912 Apr 25 11:18 p35574075_112040_Linux-x86-64.zip
-rwx------ 1 root root 86183099 Apr 25 11:18 p35685663_112040_Linux-x86-64.zip
-rwx------ 1 root root 128433424 Apr 25 11:18 p6880880_112000_Linux-x86-64.zip
確保安裝環(huán)境準(zhǔn)備完成后,即可執(zhí)行一鍵安裝。
安裝命令
使用標(biāo)準(zhǔn)生產(chǎn)環(huán)境安裝參數(shù):
# 根據(jù)腳本 README 或者 -h 命令提示,編輯好一鍵安裝命令,進(jìn)入 /soft 目錄執(zhí)行安裝:
./OracleShellInstall -lf eth0 `# local ip ifname`\
-n sles12 `# hostname`\
-op oracle `# oracle password`\
-d /u01 `# software base dir`\
-ord /oradata `# data dir`\
-o lucifer `# dbname`\
-dp oracle `# sys/system password`\
-ds AL32UTF8 `# database character`\
-ns AL16UTF16 `# national character`\
-redo 100 `# redo size`\
-opa 35574075 `# oracle PSU/RU`\
-jpa 35685663 `# OJVM PSU/RU`\
-opd Y `# optimize db`
安裝過(guò)程
███████ ██ ████████ ██ ██ ██ ██ ██ ██ ██
██?????██ ?██ ██?????? ?██ ?██ ?██?██ ?██ ?██ ?██
██ ??██ ██████ ██████ █████ ?██ █████ ?██ ?██ █████ ?██ ?██?██ ███████ ██████ ██████ ██████ ?██ ?██
?██ ?██??██??█ ??????██ ██???██ ?██ ██???██?█████████?██████ ██???██ ?██ ?██?██??██???██ ██???? ???██? ??????██ ?██ ?██
?██ ?██ ?██ ? ███████ ?██ ?? ?██?███████????????██?██???██?███████ ?██ ?██?██ ?██ ?██??█████ ?██ ███████ ?██ ?██
??██ ██ ?██ ██????██ ?██ ██ ?██?██???? ?██?██ ?██?██???? ?██ ?██?██ ?██ ?██ ?????██ ?██ ██????██ ?██ ?██
??███████ ?███ ??████████??█████ ███??██████ ████████ ?██ ?██??██████ ███ ███?██ ███ ?██ ██████ ??██ ??████████ ███ ███
??????? ??? ???????? ????? ??? ?????? ???????? ?? ?? ?????? ??? ??? ?? ??? ?? ?????? ?? ???????? ??? ???
請(qǐng)選擇安裝模式 [單機(jī)(si)/單機(jī)ASM(sa)/集群(rac)] : si
數(shù)據(jù)庫(kù)安裝模式: single
請(qǐng)選擇數(shù)據(jù)庫(kù)版本 [11/12/19/21] : 11
數(shù)據(jù)庫(kù)版本: 11
OracleShellInstall 開始安裝,安裝過(guò)程可查看日志: /soft/print_ora_install_20240425123753.log
正在檢查操作系統(tǒng)是否符合安裝條件......已完成 (耗時(shí): 0 秒)
正在去除密碼復(fù)雜度配置......已完成 (耗時(shí): 1 秒)
正在配置 YUM 源......已完成 (耗時(shí): 3 秒)
正在獲取操作系統(tǒng)信息......已完成 (耗時(shí): 1 秒)
正在配置 Swap......已完成 (耗時(shí): 0 秒)
正在配置防火墻......已完成 (耗時(shí): 1 秒)
正在安裝依賴包......已完成 (耗時(shí): 36 秒)
正在配置主機(jī)名和 /etc/hosts......已完成 (耗時(shí): 0 秒)
正在創(chuàng)建用戶和組......已完成 (耗時(shí): 1 秒)
正在創(chuàng)建安裝目錄......已完成 (耗時(shí): 0 秒)
正在配置 Avahi-daemon 服務(wù)......已完成 (耗時(shí): 1 秒)
正在配置透明大頁(yè) && NUMA && 磁盤 IO 調(diào)度器......已完成 (耗時(shí): 3 秒)
正在配置操作系統(tǒng)參數(shù) sysctl......已完成 (耗時(shí): 1 秒)
正在配置 RemoveIPC......已完成 (耗時(shí): 1 秒)
正在配置用戶限制 limit......已完成 (耗時(shí): 1 秒)
正在配置 shm 目錄......已完成 (耗時(shí): 1 秒)
正在配置用戶環(huán)境變量......已完成 (耗時(shí): 1 秒)
正在解壓 Oracle 安裝包以及補(bǔ)丁......已完成 (耗時(shí): 54 秒)
正在安裝 Oracle 軟件以及補(bǔ)丁......已完成 (耗時(shí): 873 秒)
正在創(chuàng)建監(jiān)聽......已完成 (耗時(shí): 10 秒)
正在創(chuàng)建數(shù)據(jù)庫(kù)......已完成 (耗時(shí): 702 秒)
正在優(yōu)化數(shù)據(jù)庫(kù)......已完成 (耗時(shí): 19 秒)
恭喜!Oracle 單機(jī)安裝成功 (耗時(shí): 1711 秒),現(xiàn)在是否重啟主機(jī):[Y/N] Y
正在重啟主機(jī)......
連接測(cè)試
查看系統(tǒng)版本:
sles12:/soft # cat /etc/os-release
NAME="SLES"
VERSION="12-SP5"
VERSION_ID="12.5"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP5"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp5"
查看 Oracle 版本以及補(bǔ)丁:
[oracle@sles12:/home/oracle]$ sqlplus -v SQL*Plus: Release 11.2.0.4.0 Production [oracle@sles12:/home/oracle]$ opatch lspatches 35685663;OJVM PATCH SET UPDATE 11.2.0.4.231017 35574075;Database Patch Set Update : 11.2.0.4.231017 (35574075) OPatch succeeded.
查看監(jiān)聽:
[oracle@sles12:/home/oracle]$ lsnrctl stat
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 25-APR-2024 13:09:38
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 25-APR-2024 13:08:42
Uptime 0 days 0 hr. 0 min. 55 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/sles12/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sles12)(PORT=1521)))
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@sles12:/home/oracle]$ sas SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 25 13:09:40 2024 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options sys@LUCIFER 2024-04-25 13:09:40> show parameter name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ 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 processor_group_name string service_names string lucifer
數(shù)據(jù)庫(kù)連接正常。
最后修改時(shí)間:2026-03-23 17:01:22
「喜歡這篇文章,您的關(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)容。




