image
The RSA Distributor of The Year - EMEA - 2012 My employer, COMPUTERLNKS ME, The RSA Distributor in Middle East and Africa has been awarded as "The RSA Distributor of The Year" for the product I manage, RSA - The Security Division of EMC in Middle East and Africa. Read the Full Story
image
The Service Partner of The Year - Kaspersky Lab - 2011 My employer, ValueSYS, Kaspersky Distributor in North Africa has been awarded as "The Service Partner of The Year" for the product I manage, Kaspersky Anti-virus in North Africa. Read the Full Story
image
All Content Under Creative Common License! All Content is under Creative Common License: Attribution - Noncommercial - No Derviative Works 3.0 Unported - to share under conditions Read the Full Story
image
The Most Innovative Partner Award - Kaspersky Lab - 2010 ValueSYS, my employer won the award of "The Most Innovative Partner of 2010" for the product I manage, Kaspersky Anti-virus in North Africa. Read the Full Story
* * * *
image image image image

This article summarizes the steps with commands to install Oracle on Linux x86 systems, the steps are applicable to RHEL and SLES.

 
Of course, you can combine the below commands in scripts and automate the whole process of install Oracle on Linux.
 
# Verify memory & file system requiements 
# ( 512 RAM & 1 GB Swap & 2.5 GB Disk Space)
# ------------------------------------------
# grep MemTotal /proc/meminfo
# grep SwapTotal /proc/meminfo
# Ensure GCC and C++ Packages category installed, orarun for SUSE only.
 
# Create System Users & Groups
# ----------------------------
groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba oracle
echo "oracle:oracle" > oracle
chpasswd < oracle
 
# Create Directories
# ------------------
mkdir -p /u01/app/oracle
mkdir -p /u02/oradata
chown -R oracle:oinstall /u01/app/oracle /u02/oradata
chmod -R 775 /u01/app/oracle /u02/oradata
 
# Set Oracle required Kernel Parameters
# -------------------------------------
cat >> /etc/sysctl.conf <<EOF
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
EOF
/sbin/sysctl -p
# /sbin/chkconfig boot.sysctl on # for SuSE releases.
# Run the following to test kernel parameters
#/sbin/sysctl -a | grep shm
#/sbin/sysctl -a | grep sem
#/sbin/sysctl -a | grep file-max
#/sbin/sysctl -a | grep ip_local_port_range
 
# Set Shell Limits for Oracle Users
# ---------------------------------
cat >> /etc/security/limits.conf <<EOF
oracle               soft    nproc   2047
oracle               hard    nproc   16384
oracle               soft    nofile  1024
oracle               hard    nofile  65536
EOF
 
cat >> /etc/pam.d/login <<EOF
session    required     /lib/security/pam_limits.so
EOF
 
# For RHEL, use the following:
# --------------------------------------
# cat >> /etc/profile <<EOF
# if [ \$USER = "oracle" ]; then  
#   if [ \$SHELL = "/bin/ksh" ]; then
#       ulimit -p 16384
#       ulimit -n 65536
#   else
#       ulimit -u 16384 -n 65536
#   fi
#   umask 022
# fi
# EOF
#
# cat >> /etc/csh.login <<EOF
# if ( \$USER == "oracle" ) then
#    limit maxproc 16384
#    limit descriptors 65536
#    umask 022
# endif
# EOF
 
# For SLES, use the following:
# -----------------------------
# cat >> /etc/profile.local <<EOF
# if [ \$USER = "oracle" ]; then  
#    if [ \$SHELL = "/bin/ksh" ]; then
#        ulimit -p 16384
#        ulimit -n 65536
#    else
#        ulimit -u 16384 -n 65536
#    fi
#   umask 022
# fi
# EOF
#
# cat >> /etc/csh.login.local <<EOF
# if ( \$USER == "oracle" ) then
#   limit maxproc 16384
#   limit descriptors 65536
#   umask 022
# endif
# EOF
 
# Environment Variables for Oracle User
# -------------------------------------
echo "ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE" >> /home/oracle/.bashrc
echo "ORACLE_SID=demo1; export ORACLE_SID" >> /home/oracle/.bashrc
echo "LD_ASSUME_KERNEL=2.4.19; export LD_ASSUME_KERNEL" >> /home/oracle/.bashrc
 
# RHEL4 Only to workaround Supported Operating System Release.
# cp /etc/redhat-release /etc/redhat-release.orig
# cat > /etc/redhat-release << EOF
# Red Hat Enterprise Linux AS release 3 (Taroon)
# EOF
 
# Oracle Installation
# -------------------
# - Download Oracle installation cd
# - gunzip <filename>
# - cpio -idvm < <filename>
# - Start Installer
# - cd Disk1
# - ./runInstaller
#
# - Welcome - Next - OS group: oinstall - Specify Credentials - run orainstRoot.sh as root 
# - accept defaults for file locations - Installation Type: Enterprise Edition
# - Database Configuration - Configure Starter Database - Select General Purpose
# - Global Database Name: demo1.valuesys.net - Select create db with sample schema
# - Select Database Mangement Option and Use Database Control
# - Select File System: /u02/oradata - Select Don't Enable Automated Backup
# - Select Use the same password for all accounts - Enter password twice. - INSTALL
# - at end of Installation - EXIT.
 
# Create Additional FileSystem for Oracle
# ---------------------------------------
# - Create and mount parition at /u03
# mkdir -p /u03/oradata/demo1
# chown -R oracle:oinstall /u03/oradata
# chmod -R 775 /u03/oradata
# - Create TableSpace on new file system
# sqlplus > Login as system user
#
# SQL> create tablespace data1
# 2  datafile '/u03/oradata/demo1/data1_01.dbf' size 100M
# 3  extent management local
# 4  segment space management auto;
#
# SQL> create table demotab (id number(5) not null primary key,
# 2  name varchar2(50) not null,
# 3  amount number(9,2))
# 4  tablespace data1;
#
# Creating and Configuring Automatic Storage Management
# -----------------------------------------------------
# - Download and Install the suitable ASMlib package
# rpm -Uvh \
# > oracleasm-2.4.9-e-smp-1.0.0-1.i686.rpm \
# > oracleasmlib-1.0.0-1.i386.rpm \
# > oracleasm-support-1.0.0-1.i386.rpm
# - Configure ASM by: $oracleasm configure
# - Enable ASMlib: $oracleasm enable
# - Create Disks for ASM
# oracleasm createdisk VOL1 /dev/sdb
# oracleasm createdisk VOL1 /dev/sdc
# test: oracleasm listdisks
# - Login to dbca to create ASM instance and build database that uses ASM Disk Storage.
 
# Accessing the Oracle Database
#------------------------------
# - Using SQL Plus
# $ export ORACLE_BASE=/u01/app/oracle
# $ export ORACLE_SID=demo1
# $ export ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1
# $ export PATH=$PATH:$ORACLE_HOME/bin
# sqlplus and login as sysdba, will give you sql> prompt
# - Ultra Search URL: http://aaziem.valuesys.net:5620/ultrasearch
# - Ultra Search Administration Tool URL: http://aaziem.valuesys.net:5620/ultrasearch/admin
# - iSQL*Plus URL: http://aaziem.valuesys.net:5560/isqlplus
# - iSQL*Plus DBA URL: http://aaziem.valuesys.net:5560/isqlplus/dba
# - Enteprise Manager 10g Database Control URL: http://aaziem.valuesys.net:5500/em
# - Using Oracle Enterprise Manager
# http://ds1.orademo.org:5500/em - Login as SYS, password and connect as SYSDBA
# Control Oracle Enterprise Manager
# cd /u01/app/oracle/product/10.1.0/Db_1/bin
# emctl start|stop dbconsole
# Reconfigure Enterprise Manager Assistance Console: emca -r
#
# - Using iSQLPlus (Web Based SQLPlus)
# http://ds1.orademo.org:5560/isqlplus - login as SYSTEM, password 
# Control: $isqlplusctl start | stop
#
# - Start and Shutdown Database through Console
# $sqlplus - Login as sysdba and password
# sql> startup (Start DB) | sql> shutdown immediate
#
# - List Oracle Processes
# ps -fuoracle
 
Enjoy!
 

 

Share on Myspace