GNU/Linux CentOS 6.x Installing Oracle 11g DB – QuickStart Guide
Hi! This an Easy and Step-by-Step Guide on Installing the Oracle 11g R2 Database in CentOS 6.x GNU/Linux Desktop/Server.
And version 11g of the Oracle Database, which included built-in testing for changes, the capability of viewing Tables back in time, superior compression of all types of Data and enhanced disaster recovery functions.
The “g” stood for “Grid Computing,” which supports Clusters of Servers that are treated as a single unit.
The Process is somewhat Extended and Advanced so it Demand a Basic Command Line Confidence.
So Just Relax and Take the Time of Reading, Understanding and Executing Carefully the Instructions Contained here.
To the Post Bottom you Find Link to Oracle 11g Database Installation Troubleshooting Guides.
Finally, this Setup is Valid also for All the others Red Hat Linux Based Distros like:
- Red Hat Enterprise Linux
- Rocky Linux
- AlmaLinux
- Oracle Enterprise Linux
- Scientific Linux
-
Download the Oracle 11g R2 Database for Linux:
Oracle 11g R2 .zip for Linux
The Link Contains the List of Oracle 11g r2 Database Releases Open Terminal Window
(Press “Enter” to Execute Commands) Or Login into Server Shell.
Login as SuperUser:
su
Make Network Configuration
Get hostname:
hostname
Get IP:
/sbin/ifconfig
You will Find It Under the lo >> inet Section.
Check if Hostname is Already into the Enabled Hosts File.
cat /etc/hosts
If It’s Not Present then Insert it with:
nano /etc/hosts
Insert: <IP HOSTNAME>.
Example: ‘127.0.0.1 localhost.localdomain’
Ctrl+Shift+v to Paste Content on nano
Ctrl+x to Save and Exit from nano Editor :)Grant Connection to X Server
xhost +<hostIP>
Example: # xhost +127.0.0.1
Installing Required Packages
sudo yum install binutils glibc compat-libstdc++-33 glibc-common glibc-devel glibc-headers elfutils-libelf elfutils-libelf-devel /nelfutils gcc gcc-c++ ksh libaio libaio-devel libgcc libstdc++-devel make numactl-devel sysstat mksh
Add Groups and User
groupadd -g 502 oinstall
groupadd -g 503 dba
groupadd -g 504 oper
groupadd -g 505 asmadmin
useradd -u 502 -g oinstall -G dba,asmadmin,oper oracle
passwd oracle
Make Target Directories
mkdir -p /u01/app/oracle/product/11.2.0/
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Parameters Configuration SetUp
Edit /etc/sysctl.conf file.
nano /etc/sysctl.conf
Then hit Ctrl+x to Save and Exit from nano Editor Add or amend the following lines#### Oracle 11g Kernel Parameters #### fs.suid_dumpable = 1 fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 818227 kernel.shmmax = 4189323264 kernel.shmmni = 4096 kernel.panic_on_oops = 1 # semaphores: semmsl, semmns, semopm, semmni 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
The Values of ‘shmall’ and ‘shmmax’ Need to be Customized following your System Memory Size.
Here above is a Valid Setup for a 8Gb RAM Size!
If you need to Change first Check your Phisical Memory Size with:
cat /proc/meminfo | grep MemTotal
Then ‘shmall’ should be Set as:[RamKb] / 10
And instead ‘shmmax’ as:[RamKb] * 1024 / 2
For further Instructions See Oracle Documentation…
Comment out these lines below that Gives an Error
#net.bridge.bridge-nf-call-ip6tables = 0 #net.bridge.bridge-nf-call-iptables = 0 #net.bridge.bridge-nf-call-arptables = 0
Edit /etc/security/limits.conf file.
nano /etc/security/limits.conf
Add the following lines#### oracle User Settings 4 Oracle 11g ####/noracle soft nproc 2047/noracle hard nproc 16384/noracle soft nofile 1024/noracle hard nofile 65536/noracle soft stack 10240
Disable SELINUX
nano /etc/selinux/config
Disable Secure Linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows.
SELINUX=disabled
Load the New Kernel Parameters
/sbin/sysctl -p
Unzip the Oracle 11g Database, Set oracle as Owner and Relocate it into the oracle’s Home
cd </path/To/linux_11gR2*.zip>
unzip linux_11gR2_database_1of2.zip
unzip linux_11gR2_database_2of2.zip
chown -R oracle:oinstall database
mv database /tmp
Add Environment Variables to oracle’s .bashrc
Login as oracle User
su oracle
Edit .bashrc filenano ~/.bashrc
Insert:
# Oracle Settings TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=<HOSTNAME>; export ORACLE_HOSTNAME ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME ORACLE_SID=<DBSID>; export ORACLE_SID PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib64; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
Replace [HOSTNAME] with IP and [DBSID] with SID Name
In this Example Respectively:HOSTNAME = 127.0.0.1
DBSID = SID
Load New .bashrc Settings
source ~/.bashrc
Last and Optional to Add Full Env-Integration edit also oracle’s .bashrc
nano ~/.bashrc
Inserting
if [ -f ~/.bashrc ]; then source ~/.bashrc fi
Installing the Oracle 11g Database Software
cd /tmp/database
./runInstaller
If you Get: “Check if the DISPLAY variable is set. Failed”. Look Link Below.
Link2+ Oracle 11g Database Troubleshooting.
On the first screen Just Insert your email and Possibly Un-Check the Demand of Security Update Support then Click on Next
If Failed Connection Just Check Remain Uninformed and Follow-Up.
On “Select Installation Option” Select “Install database software only” and Click on Next
.On Step 3 Leave Default “Single instance database installation” and Click on Next
.On Step 4 Select your Language and Click on Next
On Step 5 Leave Default Enterprise Edition and Click on Next
.
On “Installation Location” Set All As Here Below and Click on Next
Oracle Base: /u01/app/oracle
Software Location: /u01/app/oracle/product/11.2.0/dbhome_1
These are the Same Settings Inserted into the .bashrc File…
.On “Create Inventory” if you Setup the Path on .bashrc Like Here Leave Default and Click on Next
.On “Operating System Groups” if you Setup the Path on .bashrc Like Here Leave Default and Click on Next
.On “Prerequisite Checks” you will Get Easily a “Warning Message” about some Missing Requirements
.On the “Summary” Click on “Save Response File” to Take Note of Settings and then Click on Finish
.The Installation Product Procedure should Start…
Executing Scripts
Right Before the End of Process a Pop-Up Window will Show the Path to Two Configuration Scripts you Need to Execute on Terminal!
Next Oracle Should Confirm you of the Successful Installation Achivement.) .
How to Create and Run an Oracle 11g Listener
How to Create an Oracle 11g Database Instance
On a Localhost for Example you Should Access the Enterprise Manager by the Address:
https://127.0.0.1:1158/emAnd you can Login with:
Username: SYS
Password: oracleDatabasePassword
From the Drop-down below Select >> Connect as SYSDBA
You Should be able to Access the Database by the Enterprise Manager!
How to Start and Stop All the Oracle 11g Database Components
Start the Oracle Listener, Database and Manager
Login as Oracle User
su oracle
Start the Listner:
lsnrctl start
Start the Database process:
sqlplus '/ as sysdba'
Insert yourOracleAccountPassword
>startup
Wait until the database is Up!
ORACLE instance started. ... Database opened.
Exit from sqlplus
>exit
Start Database Manager Console
emctl start dbconsole
Access the Oracle Database Manager on Browser
https://127.0.0.1:1158/em
Stop the Oracle Database
Stop the Database process:
sqlplus '/ as sysdba'
>shutdown immediate
>exit
Stop the Listner:
lsnrctl stop
How to Getting-Started with SQLPlus for Oracle 11g DB
If you have Several Oracle Databases Everytime Before to Start a New one you have to Set SID:
export ORACLE_SID=DbSID
Oracle 11g Database Troubleshooting Guides
Enjoy this “Step by Step” Clear Installation and Getting Started…
Good Luck! :)