Tuesday, May 16, 2017

Install oracle 11g on Scientific Linux 6,Oracle Teacher Sourav,Kolkata 09748184075

installing oracle 11g on scientific linux 6

as root

yum -y install openssh-server

service sshd start

chkconfig sshd on

yum -y install nano

nano /etc/group

make the line look like this

wheel:x:10:root,sourav

save and exit

nano /etc/pam.d/su

uncomment the following two lines to make sourav as powerful 

as root

# Uncomment the following line to implicitly trust users in 

the "wheel" group.

auth            sufficient      pam_wheel.so trust use_uid

# Uncomment the following line to require a user to be in the 

"wheel" group.

auth            required        pam_wheel.so use_uid


save and exit


stop and disable iptables by

/etc/rc.d/init.d/iptables stop 

chkconfig iptables off 


stop and disable ip6tables by

/etc/rc.d/init.d/ip6tables stop 

chkconfig ip6tables off

disable selinux

by 

nano /etc/sysconfig/selinux

change the line 

SELINUX=enforcing to

SELINUX=disabled

save and exit

set the hostname to oracle.sourav by

nano /etc/hosts

127.0.0.1       oracle.sourav   sourav  localhost.localdomain 

localhost
::1             localhost6.localdomain6 localhost6

save and exit

nano /etc/sysconfig/network

make the file look like this

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=oracle.sourav


save and exit

i am using dhcp so my network card file should look like this

 nano /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=dhcp

ONBOOT=yes

NM_CONTROLLED=no

PEERDNS=no

DNS1=8.8.8.8

DNS2=4.2.2.2


save and exit

to set the dns

  nano /etc/resolv.conf

# Generatedby NetworkManager
search google.com
nameserver 8.8.8.8
nameserver 4.2.2.2


save and exit

to stop the NetworkManager

 service NetworkMnager stop

to make sure NetworkManager won't start at the next reboot

 chkconfig NetworkManager off


to restart the network

/etc/rc.d/init.d/network restart 

 chkconfig network on 


let's reboot and let's see if everything going just fine

ok everything is fine

one more thing 

let us disable ipv6 as it is not needed here

 echo "install ipv6 /bin/true" > /etc/modprobe.d/disable-

ipv6.conf

ok everything is set 

now let's try to install oracle's dependencies 

yum -y install binutils compat-libstdc++-33 elfutils-libelf 

elfutils-libelf-devel glibc glibc-common glibc-devel gcc 

gcc-c++ libaio libaio-devel libgcc libstdc++ libstdc++-devel 

make sysstat unixODBC unixODBC-devel 

after installing now let's set some kernel parameters

nano /etc/sysctl.conf 

comment out those three lines

#net.bridge.bridge-nf-call-ip6tables = 0
#net.bridge.bridge-nf-call-iptables = 0
#net.bridge.bridge-nf-call-arptables = 0


and also comment out 

#kernel.shmmax = 4294967295


and



#kernel.shmall = 268435456


at the end add this section

net.ipv4.ip_local_port_range = 9000 65500
fs.file-max =65536
kernel.shmall = 10523004
kernel.shmmax = 6465333657
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=1048576 



save and exit

using the sysctl -p check out the output

it should be like

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.ip_local_port_range = 9000 65500
fs.file-max = 65536
kernel.shmall = 10523004
kernel.shmmax = 6465333657
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576


ok now let's create an user for oracle

groupadd -g 200 oinstall 

groupadd -g 201 dba 

useradd -u 440 -g oinstall -G dba -d /usr/oracle oracle 

passwd oracle

set the password

nano /etc/pam.d/login


add this line

session   required   pam_limits.so

before the line

session    optional     pam_keyinit.so force revoke

save and exit

nano /etc/security/limits.conf 

add these lines at the end


before # End of file

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


save and exit

nano /etc/profile

at the end add these lines

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


save and exit

now switch to the user oracle

su oracle

cd ~

chmod 755 /usr/oracle 


mkdir /usr/oracle/app 


chmod 775 /usr/oracle/app 

mkdir /usr/oracle/oradata 

chmod 775 /usr/oracle/oradata

nano ~/.bash_profile 

at the end add these lines

umask 022
export ORACLE_BASE=/usr/oracle/app

save and exit

mkdir tmp

using winscp copy the oracle 11g installation files in the 

target machine

ok before trying to install oracle as root you need

to execute the command xhost + in the target machine

 unzip linux_11gR2_database_1of2.zip

 unzip linux_11gR2_database_2of2.zip

Now to avoid pdksh error

go to

/usr/oracle/tmp/database/stage/cvu/cv/admin

Edit cvu_config and change the following line 

CV_ASSUME_DISTID=OEL4 to CV_ASSUME_DISTID=OEL6

save and exit

source://https://unix.stackexchange.com/questions/29554/pdksh

-missing-from-rhel-6-and-centos-6


now

./database/runInstaller  as oracle

you will be presented with an error 

environment does not meet minimum requirements error

probably a bug but i still tried installing java and some 

more

steps but the same error shows up,so i ignored it and

went on

abiding by the default settings 

now when asked 

run this script 
/usr/oracle/oraInventory/orainstRoot.sh 
as root

and 

 /usr/oracle/app/product/11.2.0/dbhome_1/root.sh 

as root

and press enter for defaults

after it's done press ok

the installation should complete successfully
nano ~/.bash_profile 

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
 export PATH=$PATH:$ORACLE_HOME/bin



source ~/.bash_profile 

rm -rf tmp 


source:https://www.server-world.info/en/note?os=Scientific_Linux_6&p=oracle11g&f=2

No comments:

Post a Comment