Installing Oracle11g in Centos 7 using a one-click script
1. Environmental preparation
1.1 System version: Centos 7.9 (2009)
1.2 Oracle version: Oracle 11g 11.2.0.4
1.3 Network requirements: access to the Internet
1.4 One-click installation:
curl -o oracle_install.sh /files/blogs/827077/oracle_install.sh?t=1722301473 && chmod +x oracle_install.sh && ./oracle_install.sh
PS: This script is mainly to achieve standardized installation within the company to improve efficiency, so many parameters such as SID, password and other elements are fixed. (That is, I'm lazy)
2. Script execution process
2.1 Upload the installation package to any directory
p13390677_112040_Linux-x86-64_1of7.zip 1.3 GB (1395582860 bytes)
MD5 1616F61789891A56EAFD40DE79F58F28
sha-1 983461d6442b0833630475ec4885278588585651
p13390677_112040_Linux-x86-64_2of7.zip 1.1 GB (1151304589 bytes)
MD5 67BA1E68A4F581B305885114768443D3
sha-1 2e628d8cac5d1c6fff15e728b1f227747bf2ded8
2.2 Ensure that software sources are available and that EPEL sources are available
This is the default source, you can see that there are three of them, Base, Extras, Updates. however, since the official source has stopped maintenance, the repolist is 0, i.e. no packages are available, so you need to change the software source.
[root@localhost ~]# yum repolist
Loaded plug-ins:fastestmirror
Determining fastest mirrors
Could not retrieve mirrorlist /?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: ; unknown error"
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
source identifier source name state of affairs
base/7/x86_64 CentOS-7 - Base 0
extras/7/x86_64 CentOS-7 - Extras 0
updates/7/x86_64 CentOS-7 - Updates 0
repolist: 0
Scripts for replacing AliCloud software sources
curl -o /files/blogs/827077/?t=1722300674 && chmod +x && ./
After Replacement
[root@localhost ~]# yum repolist
Loaded plug-ins:fastestmirror
Loading mirror speeds from cached hostfile
* base:
* extras:
* updates:
source identifier source name state of affairs
base/7/x86_64 CentOS-7 - Base - 10,072
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,791
extras/7/x86_64 CentOS-7 - Extras - 526
updates/7/x86_64 CentOS-7 - Updates - 6,173
repolist: 30,562
2.3 Execution of installation scripts
curl -o oracle_install.sh /files/blogs/827077/oracle_install.sh?t=1722301473 && chmod +x oracle_install.sh && ./oracle_install.sh
2.4 Shutting down SELINUX
1) The script prompts whether to shut down SElinux, here select 'y'
2) After modifying the Selinux configuration, you are prompted to restart the computer
[root@localhost ~]# curl -o oracle_install.sh /files/blogs/827077/oracle_install.sh?t=1722301473 & & chmod +x oracle_install.sh & . & . /oracle_install.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 26899 100 26899 0 0 61891 0 --:--:--:--:--:--:61979
SELinux will be disabled and require a reboot. Do you want to continue? (y/n): y
The SELinux configuration has been modified, please reboot the computer and make sure the SELinux status is Disabled.
*******************************************************************
2.5 Execute the script again after reboot
After executing the script again
1) The firewall will release port 1521
2) Hostname set to oracledb
./oracle_install.sh
[root@localhost ~]# . /oracle_install.sh
usage: setenforce [ Enforcing | Permissive | 1 | 0 ]
setenforce [ Enforcing | Permissive | 1 | 0 ]
Enforcing | Permissive | 1 | 0 ] success
SELinux is down.
Firewall has released port 1521
*******************************************************************
The hostname has been set to oracledb.
2.6 Selecting a Character Set
I chose 2: ZHS16GBK. only two character sets are provided here, if you need other character sets, please modify them manually.
*******************************************************************
Please select the character set:
1: AL32UTF8
2: ZHS16GBK
Please enter option (1 or 2): 2
Change the password for user oracle.
passwd: All authentication tokens have been successfully updated.
User oracle has been added with password: oracle
*******************************************************************
2.7 Configuring the installation path
1) Select 'y' - the script will fetch the directory with the largest space on the system and install oracle into the /data/app/oracle directory under the largest directory. The largest partition fetched here is the root directory. If the largest partition is x, then it will install into /x/data/app/oracle.
2) Select 'n' - you can customize the installation directory. Note that when you specify the directory yourself, make sure that the directory has enough space.
*******************************************************************
Do you want to use the default installation path (//data/app/oracle in the largest partition /)? (y/n): y
The installation directory has been created with the correct permissions.
The user has not selected the default path
*******************************************************************
2.8 Modifying the hosts file
The script will get the local IP address and add the IP address and hostname to the hosts file and restart the network service
*******************************************************************
192.168.3.70 oracledb
The hosts file has been updated.
*******************************************************************
Network services have been restarted.
*******************************************************************
2.9 Installing Dependency Packages
There are a few packages that aren't available that don't affect the installation
Start installing dependency packages...
Loaded plugin: fastestmirror
Loading mirror speeds from cached hostfile
* base.
* extras.
* updates.
Package compat-libstdc++-33*.devel is not available.
Package compat-libstdc++-33*.devel is not available.
Package libaio-0.3.109-13.el7.x86_64 is installed and up to date.
Package libaio-devel*.devel is not available.
-
-
- - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
Updated: binutils.x86_64 0:2..el7_9.1
binutils.x86_64 0:2..el7_9.1 glibc.x86_64 0:2.17-326.el7_9.3
Upgraded as a dependency.
glibc-common.x86_64 0:2.17-326.el7_9.3 nspr.x86_64 0:4.35.0-1.el7_9 nss-softokn-freebl.x86_64 0:3.90.0-6.el7_9
nss-util.x86_64 0:3.90.0-1.el7_9
Finished!
Dependency package installation is complete.
*******************************************************************
2.10 Unpacking the installation package
1) Search for files with names beginning with linux.x64_11gR2_database
2) Extract it to the temporary folder /tmp/database/
3) After all packages have been extracted, move /tmp/database/ to /software/database
*******************************************************************
Unpacking: /tmp/linux.x64_11gR2_database_2of7.zip Unpacking complete.
Extracting installation package: /tmp/linux.x64_11gR2_database_1of7.zip Unpacking complete.
Moving database directory contents: /tmp/database/* to /software/database
Deleting the original database directory: /tmp/database
The installation package has been extracted to /software/database.
*******************************************************************
2.11 Configuring relevant parameters
1) Modify kernel parameters /etc/
2) Modify system resource limits /etc/security/
3) Modify the user restriction file /etc//login
4) Modify the installation response file /software/database/response/db_install.rsp
5) Modify the build response file /software/database/response/
6) Modify oracle user environment variables /home/oracle/.bash_profile
*******************************************************************
The kernel parameter configuration has been modified.
net.ipv4.ip_local_port_range = 9000 65500
-max = 6815744
= 10523004
= 6465333657
= 4096
= 250 32000 100128
.rmem_default = 262144
.wmem_default = 262144
.rmem_max = 4194304
.wmem_max = 1048576
-max-nr = 1048576
*******************************************************************
System resource limits have been modified.
*******************************************************************
The user restrictions file has been modified.
*******************************************************************
The contents of the installation response file have been modified.
*******************************************************************
Default path not selected by user
Modified
*******************************************************************
file has been modified.
The .bash_profile file has been modified.
2.12 Starting Installation
1) A "[WARNING] [INS-32055] Master Product Listing is located in the Oracle Base Catalog." Warning, does not affect installation.
(2) "grep: //data/app/oracle/oraInventory/logs/silentInstall*.log: no such file or directory", the script is detecting whether the installation of oracle is successful or not, it is a normal step, do not interrupt. This is a normal step, do not interrupt. The length of time depends on the performance of the server, usually about 5 minutes.
Starting the Oracle Database Installation...
Starting installation:
Starting Oracle Universal Installer...
Checking Temporary Space: Must be greater than 120 MB. Actual is 37,763 MB Passed
Check Swap Space: Must be greater than 150 MB. Actual is 5119 MB Passed
Preparing to start Oracle Universal Installer from the following address /tmp/OraInstall2024-07-30_09-57-10AM. Please wait... \n
Oracle database installation is complete.
Start checking the installation log files...
grep: //data/app/oracle/oraInventory/logs/silentInstall*.log: that file or directory is not there!
[WARNING] [INS-32055] The master product manifest is in the Oracle base directory.
Cause: The master product manifest is in the Oracle base directory.
Action: Oracle recommends placing this master product manifest in a location outside of the Oracle base directory.
The logs for this installation session can be found at the following location: //data/app/oracle/organization/local/installation-session
//data/app/oracle/oraInventory/logs/installActions2024-07-30_09
grep: //data/app/oracle/oraInventory/logs/silentInstall*.log: that file or directory is missing
grep: //data/app/oracle/oraInventory/logs/silentInstall*.log: No such file or directory exists.
grep: //data/app/oracle/oraInventory/logs/silentInstall*.log: There is no such file or directory.
The installation of Oracle Database 11g was successful. Log file -
See '//data/app/oracle/oraInventory/logs/silentInstall2024-07-30_09' for details.
Execute the following script as root user.
1. //data/app/oracle/oraInventory/
2. /data/app/oracle/product/11.2.0/db_1/
Successfully Setup Software.
2.13 Execute post-installation scripts
After successful installation, the above two scripts will be executed automatically
Installation was successful. Installation log file \r is checking the installation log file -
Execute the following script as the root user:
1. //data/app/oracle/oraInventory/
2. //data/app/oracle/product/11.2.0/db_1/
Execute //data/app/oracle/oraInventory/
Change permissions //data/app/oracle/oraInventory/.
Add read and write permissions for the group.
Remove global read, write and execute permissions.
Changed group name //data/app/oracle/oraInventory to oinstall.
Execution of the script is complete.
Execute //data/app/oracle/product/11.2.0/db_1/.
Check /data/app/oracle/product/11.2.0/db_1/install/root_oracledb_2024-07-30_09 for the output of root script
2.14 Configuring Listening
After the post-installation script execution is complete, the automatic configuration of the listener begins
Starting to configure listening...
Last login: Tue Jul 30 09:57:09 CST 2024
Command line arguments are being synthesized.
Parameter "silent" = true
Parameter "responsefile" = /software/database/response/
Syntax analysis of command line arguments completed.
Oracle Net Services Configuration.
Completes the summary file configuration.
Oracle Net Listener Startup.
Running listener control.
/data/app/oracle/product/11.2.0/db_1/bin/lsnrctl start LISTENER
Listener control is complete.
The listener has been successfully started.
Listener configuration completed.
Oracle Net Services configuration completed successfully. The exit code is 0
\n
Listening creation is complete.
*******************************************************************
2.15 Silent Library Building
The response file has been modified above, and here you can directly choose whether or not to build a library according to your needs
Is it necessary to create instances? (y/n): y
Starting to build the library...
Last login: 2 Jul 30 09:59:41 CST 2024
Copying database files
1% Completed
3% Completed
11% Completed
18% Completed
26% Completed
37% Completed
Creating and launching Oracle instances
40% Completed
45% Completed
50% Completed
55% Completed
56% Completed
60% Completed
62% Completed
Database creation in progress
66% Completed
70% Completed
73% Completed
85% Completed
96% Completed
100% Completed
For more information, see log file "/data/app/oracle/cfgtoollogs/dbca/orcl/".
The silent build is complete.
*******************************************************************
2.16 Configuring bootstrapping for oracle services and listeners
*******************************************************************
Created symlink from /etc/systemd/system// to /etc/systemd/system/.
Added bootloader
*******************************************************************
2.17 Exporting installation information
*******************************************************************
Server Information
*******************************************************************
Hostname: oracledb
Local IP: 192.168.3.70
oracle user password: oracle
*******************************************************************
Database Information
*******************************************************************
GDBNAME:orcl
SID:orcl
PORT:1521
sys user password:oracle
system user password:oracle
Character set:ZHS16GBK
*******************************************************************
Script execution is complete.