Showing posts with label Oracle Database 11g. Show all posts
Showing posts with label Oracle Database 11g. Show all posts

Tuesday, June 30, 2015

Installing DB 11g on Virtual Box part 2

9.-  Add the following groups

sudo groupadd -g 501 oinstall
sudo groupadd -g 502 dba
sudo groupadd -g 503 oper
sudo groupadd -g 504 asmadmin
sudo groupadd -g 506 asmdba
sudo groupadd -g 505 asmoper

10.- If you don't have the user created yet:

sudo useradd -u 502 -g oinstall -G dba,asmdba,oper oracle

if the user already exists:

sudo usermod -g oinstall -G dba,asmdba,oper oracle

if you want to change the user password:

passwd oracle

11.- For the 11GR2 version add the following line to this file "/etc/security/limits.d/90-nproc.conf"
# Change this
*          soft    nproc    1024

#to this:
* - nproc 16384


12.- Add the following property to the file "/etc/selinux/config"
SELINUX=permissive

13.- Restart OS.

14.- Disable firewall

15.- Create directories
sudo mkdir -p /u01/app/oracle/product/11gr2/db_1

16.- Change Group
sudo chown -R oracle:oinstall /u01

17.- If your installation is remote, set the display for launching windows
xhost +alexdb.oracle.com

alexdb.oracle.com being added to access control list

18.- Add the following lines to your db owner user

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

ORACLE_HOSTNAME=yourhost; export ORACLE_HOSTNAME
ORACLE_UNQNAME=yoursid; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11gr2/db_1; export ORACLE_HOME
ORACLE_SID=yoursid; 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; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

19.- Run the installer
./runInstaller

If you have missing libraries, install them with yum

Example:

sudo yum install compat-libstdc++-33
yum install libaio.i686 libaio-devel.i686 compat-libstdc++-33.i686 libstdc++.i686
yum install libaio libaio-devel compat-libstdc++-33 libstdc++
yum install unixODBC
yum install unixODBC-devel
yum install elfutils-libelf-devel
yum install pdksh

Finish your installation, executing the following sentences:

sh /u01/app/oraInventory/orainstRoot.sh
sh /u01/app/oracle/product/11gr2/db_1/root.sh 

if you want your db starting every time your machine restart, add this line to /etc/oratab

your_sid:/u01/app/oracle/product/11gr2/db_1:y

Enterprise Manager Database Control URL - (yoursid) :
https://localhost:1158/em

Thursday, June 18, 2015

Installing DB 11g on Virtual Box

1.- Add oracle to sudoers.

2.- Add hostname to hosts file

<IP-address>  <fully-qualified-machine-name>  <machine-name>

3.- Add or amend the following lines in the "/etc/sysctl.conf" file, use an editor or vi command.

fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# 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=1048586

4.- Let's check the file 
ls -la /etc/sysctl.conf


5.- Save the file.

6.- Recompile kernel parameters

/sbin/sysctl -p

7.- Add the following lines to the "/etc/security/limits.conf" file.

oracle              soft    nproc   16384
oracle              hard    nproc   16384
oracle              soft    nofile  4096
oracle              hard    nofile  65536
oracle              soft    stack   10240

8.- Check if the following libraries are present

rpm -Uvh binutils-2*x86_64*
rpm -Uvh glibc-2*x86_64* nss-softokn-freebl-3*x86_64*
rpm -Uvh glibc-2*i686* nss-softokn-freebl-3*i686*
rpm -Uvh compat-libstdc++-33*x86_64*
rpm -Uvh glibc-common-2*x86_64*
rpm -Uvh glibc-devel-2*x86_64*
rpm -Uvh glibc-devel-2*i686*
rpm -Uvh glibc-headers-2*x86_64*
rpm -Uvh elfutils-libelf-0*x86_64*
rpm -Uvh elfutils-libelf-devel-0*x86_64*
rpm -Uvh gcc-4*x86_64*
rpm -Uvh gcc-c++-4*x86_64*
rpm -Uvh ksh-*x86_64*
rpm -Uvh libaio-0*x86_64*
rpm -Uvh libaio-devel-0*x86_64*
rpm -Uvh libaio-0*i686*
rpm -Uvh libaio-devel-0*i686*
rpm -Uvh libgcc-4*x86_64*
rpm -Uvh libgcc-4*i686*
rpm -Uvh libstdc++-4*x86_64*
rpm -Uvh libstdc++-4*i686*
rpm -Uvh libstdc++-devel-4*x86_64*
rpm -Uvh make-3.81*x86_64*
rpm -Uvh numactl-devel-2*x86_64*
rpm -Uvh sysstat-9*x86_64*
rpm -Uvh compat-libstdc++-33*i686*
rpm -Uvh compat-libcap*


In the next post i'm going to finish the main configuration.