Introduction
Oracle one-click installation script demonstrating the process of installing Oracle 11GR2 standalone on Deepin 20.9 (no human intervention required).
Script download: Shell script for installing Oracle database More tutorials: Oracle one-click installation script collection, continuously updated
Prerequisites
- The system group has installed the operating system (minimal installation is acceptable).
- The network group has configured the host network; usually only one public IP address is needed.
- The DBA creates the software directory:
mkdir /soft - The DBA uploads the Oracle installation media (base package, patch package) to the
/softdirectory. - The DBA uploads the Oracle one-click installation script too the
/softdirectory and grants execute permission:chmod +x OracleShellInstall - Ensure external network access is available; network software sources need to be configured.
- According to the script installation and actual situation, configure the script's enstallation parameters, then execute one-click installation in the
/softdirectory.
Environment Information
# Host version
root@deepin:/soft# cat /etc/os-release
PRETTY_NAME="Deepin 20.9"
NAME="Deepin"
VERSION_ID="20.9"
VERSION="20.9"
VERSION_CODENAME="apricot"
ID=Deepin
HOME_URL="https://www.deepin.org/"
BUG_REPORT_URL="https://bbs.deepin.org/"
# Network information
root@deepin:/soft# ip a
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:8b:c7:d9 brd ff:ff:ff:ff:ff:ff
inet 192.168.6.62/24 brd 192.168.6.255 scope global dynamic noprefixroute ens33
valid_lft 78639sec preferred_lft 78639sec
inet6 fe80::7355:4d89:a6ba:412d/64 scope link noprefixroute
valid_lft forever preferred_lft forever
# External network connectivity test
root@deepin:/soft# ping www.baidu.com
PING www.a.shifen.com (180.101.50.242) 56(84) bytes of data.
64 bytes from www.baidu.com (180.101.50.242): icmp_seq=1 ttl=53 time=8.45 ms
64 bytes from www.baidu.com (180.101.50.242): icmp_seq=2 ttl=53 time=7.61 ms
64 bytes from www.baidu.com (180.101.50.242): icmp_seq=3 ttl=53 time=7.70 ms
64 bytes from www.baidu.com (180.101.50.242): icmp_seq=4 ttl=53 time=7.86 ms
64 bytes from www.baidu.com (180.101.50.242): icmp_seq=5 ttl=53 time=7.81 ms
# Installation packages stored in /soft directory
root@deepin:/soft# ls -l
-rwxr-xr-x 1 root root 233744 7月 12 13:24 OracleShellInstall
-rwx------ 1 root root 1395582860 7月 12 14:16 p13390677_112040_Linux-x86-64_1of7.zip
-rwx------ 1 root root 1151304589 7月 12 14:16 p13390677_112040_Linux-x86-64_2of7.zip
Ensure the installation environment is ready, then proceed with one-click installation.
Installation Command
Using standard production environment installation parameters (if installation fails, the script supports re-execution):
# Based on script README or -h command hints, edit the one-click installation command, enter /soft directory and execute:
root@deepin:~# cd /soft/
root@deepin:/soft# chmod +x OracleShellInstall
./OracleShellInstall -lf ens33 `# Host network interface name`\
-n deepin `# Hostname`\
-op oracle `# Oracle user password`\
-d /u01 `# Oracle software installation base directory`\
-ord /oradata `# Database file storage directory`\
-o lucifer `# Database name`\
-dp 'Passw0rd#PST' `# sys/system user password`\
-ds AL32UTF8 `# Database character set`\
-ns AL16UTF16 `# National character set`\
-redo 100 `# Online redo log size (MB)`\
-opd Y `# Optimize database`
Installation Process
███████ ██ ████████ ██ ██ ██ ██ ██ ██ ██
██░░░░░██ ░██ ██░░░░░░ ░██ ░██ ░██░██ ░██ ░██ ░██
██ ░░██ ██████ ██████ █████ ░██ █████ ░██ ░██ █████ ░██ ░██░██ ███████ ██████ ██████ ██████ ░██ ░██
░██ ░██░░██░░█ ░░░░░░██ ██░░░██ ░██ ██░░░██░█████████░██████ ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░ ░░░░░░██ ░██ ░██
░██ ░██ ░██ ░ ███████ ░██ ░░ ░██░███████░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██ ░██░░█████ ░██ ███████ ░██ ░██
░░██ ██ ░██ ██░░░░██ ░██ ██ ░██░██░░░░ ░██░██ ░██░██░░░░ ░██ ░██░██ ░██ ░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██
░░███████ ░███ ░░████████░░█████ ███░░██████ ████████ ░██ ░██░░██████ ███ ███░██ ███ ░██ ██████ ░░██ ░░████████ ███ ███
░░░░░░░ ░░░ ░░░░░░░░ ░░░░░ ░░░ ░░░░░░ ░░░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░░
Note: This script is only intended for deploying databases on new servers. It is strictly forbidden to execute it on a host where a database is already running to avoid data loss or corruption and irreversible damage.
Please select installation mode [single(si)/single ASM(sa)/cluster(rac)] : si
Database installation mode: single
Please select database version [11/12/19/21] : 11
Database version: 11
!!! Disclaimer: The current operating system version [Deepin 20.9] is not in Oracle's official support list. This script is only responsible for installation. Please confirm whether to continue installation (Y/N): [Y]
OracleShellInstall installation starts. Detailed installation process can be viewed in the log: tail -2000f /soft/print_shell_install_20240712142109.log
Pre-installation check in progress, please wait...
Checking MD5 of installation package /soft/p13390677_112040_Linux-x86-64_1of7.zip, please wait...
Checking MD5 of installation package /soft/p13390677_112040_Linux-x86-64_2of7.zip, please wait...
Configuring network software sources...Completed (Time: 25 seconds)
Retrieving operating system information...Completed (Time: 1 second)
Installing dependency packages...Completed (Time: 214 seconds)
Disabling firewall...Completed (Time: 0 seconds)
Configuring hostname and /etc/hosts...Completed (Time: 0 seconds)
Creating users and groups...Completed (Time: 1 second)
Creating installation directories...Completed (Time: 1 second)
Configuring Avahi-daemon service...Completed (Time: 2 seconds)
Configuring transparent huge pages & NUMA & disk I/O scheduler...Completed (Time: 5 seconds)
Configuring operating system parameters sysctl...Completed (Time: 1 second)
Configuring RemoveIPC...Completed (Time: 1 second)
Configuring user limits...Completed (Time: 1 second)
Configuring shm directory...Completed (Time: 1 second)
Configuring user environment variables...Completed (Time: 1 second)
Extracting Oracle installation package and patches...Completed (Time: 28 seconds)
Installing Oracle software and patches...Completed (Time: 268 seconds)
Creating listener...Completed (Time: 8 seconds)
Creating database...Completed (Time: 178 seconds)
Optimizing database...Completed (Time: 14 seconds)
Congratulations! Oracle one-click installation completed (Time: 755 seconds). Do you want to restart the host now? [Y/N] Y
Restarting current node host...
Connectivity Test
Check system version:
[root@deepin:/root]# cat /etc/os-release
PRETTY_NAME="Deepin 20.9"
NAME="Deepin"
VERSION_ID="20.9"
VERSION="20.9"
VERSION_CODENAME="apricot"
ID=Deepin
HOME_URL="https://www.deepin.org/"
BUG_REPORT_URL="https://bbs.deepin.org/"
Check Oracle version and patches:
[oracle@deepin:/home/oracle]$ sqlplus -v
SQL*Plus: Release 11.2.0.4.0 Production
[oracle@deepin:/home/oracle]$ opatch lspatches
No interim patches installed in this Oracle home.
Check listener:
[oracle@deepin:/home/oracle]$ lsnrctl stat
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 12-JUL-2024 14:56:48
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 12-JUL-2024 14:34:49
Uptime 0 days 0 hr. 21 min. 58 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/deepin/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=deepin)(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
Connect to database:
[oracle@deepin:/home/oracle]$ sas
SQL*Plus: Release 11.2.0.4.0 Production on Fri Jul 12 14:56:55 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-07-12 14:56:56> 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
Database connection is normal.