Deploying Oracle Database 11g Release 2 on CentOS Linux Systems

System Preparation and Kernel Tuning

Establish dedicated system accounts and directory structures before initiating the deployment. Use a privileged terminal session to execute the following group and user provisioning commands:

groupadd dbadmin_grp
groupadd dboper_grp
useradd -g dbadmin_grp -G dboper_grp -m odbsvc
passwd odbsvc
id odbsvc

Designate storage locasions for binaries, inventory, and temporary extraction files. Assign strict ownership to ensure proper execution rights:

mkdir -p /u01/app/oracle
mkdir -p /u01/app/oraInventory
mkdir -p /u01/tmp/db_extract

chown -R odbsvc:dbadmin_grp /u01/app
ls -l /u01/app

Adjust the operating system identification string to bypass Oracle's platform validation routine:

sed -i 's/^.*$/RedHatServer-7/' /etc/redhat-release
cat /etc/redhat-release

Disable network interference and mandatory access controls. The SELinux adjustment requires a subsequent reboot:

systemctl stop firewalld
systemctl disable firewalld
sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

Optimize kernel parameters for database workloads. Append the following directives to /etc/sysctl.conf:

net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

Activate the changes immediately:

sysctl -p

Enforce resource consumption boundaries for the database service account within /etc/security/limits.conf:

odbsvc soft nproc 2047
odbsvc hard nproc 16384
odbsvc soft nofile 1024
odbsvc hard nofile 65536

Define runtime environment variables in the service account profile (~/.bash_profile):

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=primarydb
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LANG=C
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
source ~/.bash_profile

Package Deployment and Initialization

Extract the compressed distribution archives into the designated staging directory. Ensure permissions are corrected post-extraction:

cd /u01/tmp/db_extract
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
su - root -c "chown -R odbsvc:dbadmin_grp /u01/tmp/db_extract/database"

Transition to the target user and trigger the graphical setup wizard:

su - odbsvc
cd /u01/tmp/db_extract/database
./runInstaller

Follow the wizard prompts: select "Install database software only", configure for a single-instance environment, specify the previously created base path, assign the server character set (e.g., AMERICAN_AMERICA.ZHS16GBK), define strong credentials for administrative accounts, bypass missing dependency warnings during pre-checks, and proceed to completion. Upon successful installation, switch to root privileges and execute the mandatory configuration scripts located in the inventory and home directories respectively.

Service Automation and Boot Configuration

Enable automatic startup routines by modifying the central parameter file:

vi /etc/oratab
# Change line from: primarydb:/u01/app/oracle/product/11.2.0/dbhome_1:N
# To:               primarydb:/u01/app/oracle/product/11.2.0/dbhome_1:Y

Integrate startup commands into the system initialization sequence. Open the local execution script with elevated privileges:

vi /etc/rc.d/rc.local

Insert the following lines to initialize the network listener and database instance sequentially:

su - odbsvc -lc "/u01/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start"
su - odbsvc -lc "/u01/app/oracle/product/11.2.0/dbhome_1/bin/dbstart"

Verify the script is executable by the init system:

chmod +x /etc/rc.d/rc.local

Network Diagnostics and Connectivity Fixes

External client tools may encounter connection refusal errors due to dynamic listener registration delays. Resolve this by configuring static address binding in the listener configuration:

# $ORACLE_HOME/network/admin/listener.ora
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
       (GLOBAL_DBNAME = primarydb)
       (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
       (SID_NAME = primarydb)
    )
 )
LISTENER =
   (DESCRIPTION =
      (ADDRESS =
         (PROTOCOL = TCP)
            (HOST = <SERVER_IP_ADDRESS>)
            (PORT = 1521)
      )
   )
ADR_BASE_LISTENER = /u01/app/oracle

Align the client-side connection descriptor to match the server definition:

# $ORACLE_HOME/network/admin/tnsnames.ora
REMOTE_DB =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = <SERVER_IP_ADDRESS>)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = primarydb)
    )
  )

Apply the updated network configuration:

lsnrctl reload

If connections yield memory allocation failures indicating an unstarted instance, manually boot the database engine:

sqlplus / as sysdba
SQL> startup

Tags: Oracle Database Linux Installation centos Database Administration System Configuration

Posted on Thu, 04 Jun 2026 16:19:30 +0000 by anikin