check iptables:
service iptables stop
chkconfig iptables off
service network restart
----------------------------------------------------------------------
Config Host file:
vi /etc/hosts
10.8.90.32 db.ssd.net db
----------------------------------------------------------------------
Create oracle user and set password :
groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
useradd -u 500 -g oinstall -G dba,oper oracle
passwd oracle
----------------------------------------------------------------------
service iptables stop
chkconfig iptables off
service network restart
----------------------------------------------------------------------
Config Host file:
vi /etc/hosts
10.8.90.32 db.ssd.net db
----------------------------------------------------------------------
Create oracle user and set password :
groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
useradd -u 500 -g oinstall -G dba,oper oracle
passwd oracle
----------------------------------------------------------------------
Making the required path:
mkdir -p /oracle/product/11.2.0/db_1
mkdir -p /oradata
mkdir -p /oraInventory
mkdir -p /software
chown -R oracle:oinstall /oracle
chown -R oracle:oinstall /oradata
chown -R oracle:oinstall /oraInventory
chown -R oracle:oinstall /software
chmod -R 775 /oracle
chmod -R 775 /oradata
chmod -R 775 /oraInventory
chmod -R 775 /software
----------------------------------------------------------------------
Config .bash_profile with oracle user:
[oracle@db ~]$ vi .bash_profile
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_HOME_LISTNER=$ORACLE_HOME; export ORACLE_HOME_LISTNER
ORACLE_TERM=xterm; export ORACLE_TERM
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
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/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/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
umask 022
----------------------------------------------------------------------
Install packages:
yum install cloog-ppl-0.15.7-1.2.el6.*
yum install compat-libcap1-1.10-1.*
rpm -Uvh compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm
yum install cpp-4.4.7-3.el6.x86_64.rpm
yum install gcc-*
yum install glibc-devel-2.12-1.107.el6.*
rpm -Uvh glibc-headers-2.12-1.107.el6.x86_64.rpm
rpm -Uvh kernel-headers-2.6.32-358.el6.x86_64.rpm
yum install libXmu-*
yum install libXt*
yum install libXxf86misc-*
yum install libXxf86vm-*
yum install libaio-devel-0.3.107-10.el6.*
yum install libdmx-1.1.2-2.el6.x86_64.rpm
rpm -Uvh libstdc++-devel-4.4.7-3.el6.x86_64.rpm
rpm -Uvh mpfr-2.4.1-6.el6.x86_64.rpm
rpm -Uvh make-3.81-20.el6.x86_64.rpm
rpm -Uvh ppl-0.10.2-11.el6.x86_64.rpm
yum install xorg-x11-utils-7.5-6.el6.x86_64.rpm
yum install xorg-x11-xauth-1.0.2-7.1.el6.x86_64.rpm
yum install libXv*
rpm -Uvh libXxf86dga-1.1.3-2.el6.x86_64.rpm
yum groupinstall "X Window System"
rpm -Uvh libcap-devel-2.16-5.5.el6.x86_64.rpm
rpm -Uvh libcap-ng-devel-0.6.4-3.el6_0.1.x86_64.rpm
rpm -Uvh libcap-2.16-5.5.el6.x86_64.rpm
yum install -y libcap*.i686
yum install -y libcap*.x86_64
yum install elfutils-libelf-devel-0.152-1.el6.*
--Download rpm pdksh-5.2.14-30.x86_64.rpm and then install
rpm -ivh pdksh-5.2.14-30.x86_64.rpm
----------------------------------------------------------------------
Config sysctl.conf file:
# vi /etc/sysctl.conf
vm.swappiness = 0
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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
# set to the appropriate private eth devices
net.ipv4.conf.em3.rp_filter = 2
net.ipv4.conf.em4.rp_filter = 2
# sysctl -p
----------------------------------------------------------------------
Configure limits.conf and login files:
# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
# vi /etc/pam.d/login
session required pam_limits.so
----------------------------------------------------------------------
Installation of oracle software:
----------------------------------------------------------------------
Create a Listener for oracle:
----------------------------------------------------------------------
Create Database with DBCA:
----------------------------------------------------------------------
After finished installation of database, you can check your db:
#sqlplus "/ as sysdba"
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
------- -----------------
ORCL READ WRITE
----------------------------------------------------------------------
Auto Start oracle service :
with user root create dbora file :
$ cd /etc/init.d
touch dbora
vi dbora
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
ORA_HOME=/oracle/product/11.2.0/db_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
;;
esac
after that you save above file:
$chmod 775 /etc/init.d/dbora
$chkconfig dbora --add
$chkconfig dbora on
$vi /etc/oratab
change orcl:/oracle/product/11.2.0/db_1:N to orcl:/oracle/product/11.2.0/db_1:Y
Now after reboot your server you'll see oracle service automatically comes up.
No comments:
Post a Comment