Kmaiti

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 1 October 2010

How to install oracle database 10g on linux server?

Posted on 00:20 by Unknown
Guys, I referred following steps to do the same :


Oracle 10G Installations on linux 64 or 32 arch) :-

==========

1. Minimum Requirement 40 GB Hard disk and 512 RAM.
2. Check following latest packages has been installed on 32 bit linux machine :-

Note : Please note that try search in google like "download name + rpm". As an example : download Imlib _ + rpm. Then download latest rpm and use "rpm -Uvh package name " to install them. Always try download from pbone.com

.....................
Binutils-2.15.92.0.2-10.EL4
Compat-db-4.1.25-9
Control-center-2.8.0-12
Gcc-3.4.3-9.EL4
Gcc-c++-3.4.3-9.EL4
Glibc-2.3.4-2
Glibc-common-2.3.4-2
Gnome-libs-1.4.1.2.90-44.1
Libstdc++-3.4.3-9.EL4
Libstdc++-devel-3.4.3-9.EL4
Make-3.80-5
Pdksh-5.2.14-30
Sysstat-5.0.5-1
Xscreensaver-4.18-5.rhel4.2
libaio-0.3.9
.......................

3. For 64 bit architechture following packages must be there :

Note : please note that try search in google like "download name + x86_64.rpm". As an example : download Imlib _ x86_64.rpm. Then download latest rpm and use "rpm -Uvh package name " to install them. Always try download from pbone.com. It's very fast and reliable.

====
gcc-3.4.4-2.x86_64.rpm
gcc-c++-3.4.4-2.x86_64.rpm
Libstdc++-devel-3.4.4-2.x86_64.rpm
Cpp-3.4.4-2.x86_64.rpm
Glibc-devel-2.3.4-2.13.x86_64.rpm
Glibc-headers-2.3.4-2.13.x86_64.rpm
Glibc-kernheaders-2.4-9.1.98.EL.x86_64.rpm
gnome-libs-1.4.1.2.90-44.1.x86_64.rpm
Compat-db-4.1.25-9.x86_64.rpm
ORBit-0.5.17-14.x86_64.rpm
Gtk+-1.2.10-33.x86_64.rpm
Imlib-1.9.13-23.x86_64.rpm
Libpng10-1.0.16-1.x86_64.rpm
Gdk-pixbuf-0.22.0-16.el4.x86_64.rpm
Libungif-4.1.3-1.x86_64.rpm
sysstat-5.0.5-1.x86_64.rpm
====

3a). Make sure following Kernel parameters has been tuned :

=====
shmmax = 2147483648
shmmni = 4096
shmall = 2097152
shmseg = 10
semmsl = 250
semmns = 32000
semopm = 100
semmni = 128
file-max = 65536
ip_local_port_range = 1024 65000
rmem_default = 262144
rmem_max = 262144
wmem_default = 262144
wmem_max = 262144
=======

Run :
=======
/sbin/sysctl -p
=======

3b) Add the following lines to the /etc/security/limits.conf file:

==========
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
==========

Add the following line to the /etc/pam.d/login file, if it does not already exist:

==========
session required pam_limits.so
==========

Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows:

=========
SELINUX=disabled
=========

4. Creating Oracle User Accounts :
As a root user :

=========
groupadd dba
groupadd oinstall
useradd -c "Oracle software owner" -g oinstall -G dba oracle
passwd oracle
=========

Note : //option -G : oracle is supplemntary user in the group dba

5. Creating directories :

=========
mkdir /u01/app /u01/app/oracle /u01/oradata
chown oracle:oinstall /u01/app /u01/app/oracle /u01/oradata
chmod 775 /u01/app /u01/app/oracle /u01/oradata
=========

6. Download the oracle database source file for 64 or 32 bit linux machine. Here is the site :

-----
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
-----

a). Download the Oracle 10g release 2 (10.2.0.1.0) software from Oracle website.
Extract the files using following command: For 32bit installation archive

cd /usr/local/src/

unzip 10201_database_linux32.zip

b) For 64bit installation archive

gunzip 10201_database_linux_x86_64.cpio.gz
cpio -idmv <10201_database_linux_x86_64.cpio

For RHEL 5, Centos 5: Modify database/install/oraparam.ini file and add "redhat-5" to "Certified Versions" section.
Example:

[Certified Versions]
Linux=redhat-3,SuSE-9,redhat-4,UnitedLinux-1.0,asianux-1,asianux-2,redhat-5

8. Login as root and issue the following command:

=======
xhost +
=======
Note : Either use only + or use mc ip where x windows has. + will search all attached mc where x windows has.

9. Login as the oracle user and add the following lines at the end of the .bash_profile file:

-----------------------
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TSH1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
-------------

10. cd /home/oracle
. .bash_profile //activating current settings for oracle user

Installation :


11. Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable : like

........................
su - oracle
DISPLAY=:0.0; export DISPLAY

or : DISPLAY=localhost:0.0; export DISPLAY

You may have to execute as a oracle user :

export TMP=/oratmp
export TEMPDIR=/oratmp
..............


12. Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory:

Go to database directory :

cd /usr/local/src/database
./runInstaller


13. You may see x11 windows could not find error. In that case make it sure that one x11 machine has connected to your server.

If it goes fine, try to proceed further to install oracle via GUI.
==============================

A) Post-Instalation Tasks : Auto Startup and Shutdown of Database and Listener :-

Login as root and modify /etc/oratab file and change last character to Y for apropriate database.

ORCL:$ORACLE_BASE/product/10.2.0/db_1:Y

As root user create new file "oracle" (init script for startup and shutdown the database) in /etc/init.d/ directory with following content:

===============
#!/bin/bash
#
# oracle Init file for starting and stopping
# Oracle Database. Script is valid for 10g and 11g versions.
#
# chkconfig: 35 80 30
# description: Oracle Database startup script

# Source function library.

. /etc/rc.d/init.d/functions

ORACLE_OWNER="oracle"
ORACLE_HOME="$ORACLE_BASE/product/10.2.0/db_1"

case "$1" in
start)
echo -n $"Starting Oracle DB:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
echo "OK"
;;
stop)
echo -n $"Stopping Oracle DB:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
echo "OK"
;;
*)
echo $"Usage: $0 {start|stop}"
esac
==============


Execute (as root) following commands (First script change the permissions, second script is configuring execution for specific runlevels):

chmod 750 /etc/init.d/oracle
chkconfig --add oracle --level 0356


2. Auto Startup and Shutdown of Enterprise Manager Database Control :-

As root user create new file "oraemctl" (init script for startup and shutdown EM DB Console) in /etc/init.d/ directory with following content:

================
#!/bin/bash
#
# oraemctl Starting and stopping Oracle Enterprise Manager Database Control.
# Script is valid for 10g and 11g versions.
#
# chkconfig: 35 80 30
# description: Enterprise Manager DB Control startup script

# Source function library.

. /etc/rc.d/init.d/functions

ORACLE_OWNER="oracle"
ORACLE_HOME="$ORACLE_BASE/product/10.2.0/db_1"

case "$1" in
start)
echo -n $"Starting Oracle EM DB Console:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole"
echo "OK"
;;
stop)
echo -n $"Stopping Oracle EM DB Console:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
echo "OK"
;;
*)
echo $"Usage: $0 {start|stop}"
esac
===============


Execute (as root) following commands (First script change the permissions, second script is configuring execution for specific runlevels):

chmod 750 /etc/init.d/oraemctl
chkconfig --add oraemctl --level 0356

3. You may consider to use rlwrap for comfortable work with sqlplus and rman utility :-
RPM package for RedHat compatible (x86) distribution you can download here.
RPM package for RedHat compatible (x86_64) distribution you can download here.
su -
# rpm -ivh rlwrap*.rpm
# exit
echo "alias sqlplus='rlwrap sqlplus'" >> /home/oracle/.bash_profile
echo "alias adrci='rlwrap rman'" >> /home/oracle/.bash_profile
. /home/oracle/.bash_profile
=================

That's it try :)
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • unable connect to socket: No route to host (113)
    Guys, This error message usually comes when you try to access remote linux desktop using vncviewer. Please check the firewall in the linux s...
  • NDMP communication failure error
    Guys, Issue : Netbackup server sends alert NDMP communication failure once everyday. But there is no issue to run scheduled backup jobs. Env...
  • How to verify UDP packet communication between two linux system?
    Guys, Today, I had to check UDP packet communication between linux and a windows system. Main purpose of the windows system was to capturing...
  • what does it mean by "cman expected_votes="1" two_node="1" in cluster.conf ?
    For two node clusters ordinarily, the loss of quorum after one out of two nodes fails will prevent the remaining node from continuing (if bo...
  • configure: error: could not find library containing RSA_new
    Guys, It seems you have enabled the SSL option during configuring the package. Please either resolve that dependency or disable the SSL opti...
  • Details about NFS timeout on Red Hat Enterprise Linux 5
    There are two mount options for timeouts of an NFS request. # timeo: a timeout value. the unit is 1/10 seconds. # retran...
  • How to configure NFSv4 with kerberos on linux?
    Guys, Please refer the following steps to do the same : Used Environment : kerberos(i.e NFSv4) server : RHEL 5.5, 64 bit arch NFS client : R...
  • How to redirect output of script to a file(Need to save log in a file and file should be menioned in the script itself?
    Expectation : @subject Steps : 1. Create a bash script. 2. add line : exec > >(tee /var/log/my_logfile.txt) That's it. All output ...
  • What is "WCHAN" attribute at "ps -alwww" on linux ?
    WCHAN : Name of the kernel function in which the process is sleeping, a "-" if the process is running, or a "*" if the p...
  • Steps to develop patch and apply it to original source file
    1. Create test.c  Above file contains : -------- [kamalma@test-1 C_Programming]$ cat test.c #include #include int main()  {  printf("\n...

Categories

  • ACL
  • ESX
  • Linux
  • Storage
  • UCS

Blog Archive

  • ►  2013 (5)
    • ►  May (1)
    • ►  April (3)
    • ►  February (1)
  • ►  2012 (10)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ►  2011 (86)
    • ►  December (3)
    • ►  November (2)
    • ►  September (19)
    • ►  August (9)
    • ►  July (5)
    • ►  June (9)
    • ►  May (12)
    • ►  April (3)
    • ►  March (4)
    • ►  February (5)
    • ►  January (15)
  • ▼  2010 (152)
    • ►  December (9)
    • ►  November (34)
    • ▼  October (20)
      • Fatal error: Out of memory (allocated +) (tried t...
      • DATABASE ERROR: CONNECTION FAILED! + roundcube
      • How to install roundcube in the cpanel server?
      • How to migrate Plesk data manually with Plesk Migr...
      • How to reduce server's load?
      • How to check server's resource usage?
      • How to login into the server using bash script?
      • How to recursively change the permission of the fi...
      • How to get system information using bash script?
      • Meaning of special characters in bash scripting?
      • How to create fork bomb?
      • Who is using more cpu resources on the linux server?
      • How to send mail using bash script?
      • Addition, multiplication etc in bash script?
      • How to fetch line by line from the file using bash...
      • Convert mp4 file to flv ?
      • How to convert mpg file to flv file using ffmpeg o...
      • How to Install PAE kernel?
      • Can't connect to X11 window server using ':0.0' as...
      • How to install oracle database 10g on linux server?
    • ►  September (14)
    • ►  August (24)
    • ►  July (19)
    • ►  June (3)
    • ►  May (25)
    • ►  April (3)
    • ►  January (1)
Powered by Blogger.