Database Install

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 30

Tiger vnc rpm download:

https://bintray.com/tigervnc/stable/tigervnc/1.6.0#files/el6/RPMS/x86_64
https://bintray.com/tigervnc/stable/tigervnc/1.6.0#files/el6/RPMS/noarch
Download all files to a specific directory, copy them on the Linux VM and install them using
rpm –Uvh *
Start the VNC server using
vncserver

Download the VNC Viewer to your desktop:


https://www.realvnc.com/download/viewer/

Start using the vi/vim editor from Linux.


Use:
http://www.lagmonster.org/docs/vi.html
to learn the basics of this editor.

Download and install putty on your desktop:


http://www.putty.org/
You can connect to the VM Box using the putty tool:
Oracle configuration for Linux Installation:
Using vi, edit the list of files below and add the changes indicated in the document, if they don’t exist already
/etc/security/limits.conf
#Oracle requested parameters
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536

/etc/pam.d/login:
session required pam_limits.so

/etc/sysconfig/ntpd:
add the -x option in the line below, as follows:
OPTIONS=”-x -u ntp:ntp ...”

Start the ntpd service if not yet started:


chkconfig ntpd on
service ntpd start

Add the needed OS users and groups. Execute the following commands:

groupadd -g 1000 oinstall


groupadd -g 1020 asmadmin
groupadd -g 1021 asmdba
groupadd -g 1022 asmoper
groupadd -g 1031 dba
groupadd -g 1032 oper

useradd -u 1100 -g oinstall -G asmadmin,asmdba,dba,asmoper grid


useradd -u 1200 -g oinstall -G dba,asmdba,oper oracle

#4. Create the Oracle directories:

mkdir -p /u01/app/12.1.0.2/grid
mkdir -p /u01/app/grid
mkdir -p /u01/app/oracle

chown grid:oinstall /u01/app/12.1.0.2/grid


chown grid:oinstall /u01/app/grid
chown oracle:oinstall /u01/app/oracle
chown grid:oinstall /u01
chmod 775 /u01/
setfacl -m g:oinstall:rwx /u01/app
#5. Oracle users profiles:

root .bash_profile in /root

ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/12.1.0.2/grid
ORACLE_SID=+ASM
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH ORACLE_HOSTNAME

grid .bash_profile in /home/grid

ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/12.1.0.2/grid
ORACLE_SID=+ASM
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH ORACLE_HOSTNAME

oracle .bash_profile in /home/oracle

ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1
ORACLE_SID=test pune un nume cu maxim 8 caractere, fara cifre

ORACLE_UNQNAME=test - pune un nume cu maxim 8 caractere, fara cifre


LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH ORACLE_HOSTNAME
ORACLE_UNQNAME

#6. Disable selinux and iptables


Turn off selinux:
echo 0 > /selinux/enforce
Edit /etc/selinux/config.
SELINUX=disabled

Turn off iptables:


chkconfig iptables off
service iptables stop

Change the passwords for users grid and oracle:


passwd oracle
[provide the oracle password when asked]

passwd grid
[provide the grid password when asked]
# apoi dau lui oracle drepturi de proprietar
chown oracle:oinstall -r database
chown oracle:oinstall -r grid
Grid Infrastructure Installation
The below commands, if prefixed with #, it means they are executed by root. If prefixed with $, it means they are
executed by grid or oracle.

#1. Open a VNC Session and connect to the VM Box Machine. Remember, to connect to the VM Box, you should
normally use the <IP>:1 string, as indicated below:

#2. Once the session starts, start two shells by right clicking in the desktop and selecting Open in Terminal. You can
open a session in the same terminal by clicking Ctrl+Shift+T

#3. In one session you will be connected as root all the time. Run
$xhost +
in this session. - trebuie sa dea access control disabled, clients can connect from any host

#4. In the other session, we install the grid infrastructure using the grid user. So run
#su – grid
in this second session.

#5. In the grid session, change directories to the place where the oracle software is residing:
$ cd /opt/software/oracle/

#6. If the ownership of the file is root, change it to grid. Do the same for the parent directory:
# chown grid.oinstall /opt/software/oracle
# chown grid.oinstall <file name>

#7. Change the ownership of the database file to oracle:


# chown oracle.oinstall <file name>

#8. Unzip the file used to install the grid infrastructure:


$ unzip <file name>

#9. Change the directory to the fresh created grid directory:


$ cd grid
#10. Check if the X output is properly redirected in the grid session:
$ xclock
#11. Start the grid infrastructure installation:
$ ./runInstaller

#12. If you get this error:

Then change the /etc/hosts and add your computer name and ip address, connected as root:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.15 dragos.mossit.ro

Then restart the installation.

#13. Select Skip Software Updates:


#14. Install Oracle Grid Infrastructure Software Only
#15. Don’t change anything, leave English:

#16. Have the groups below selected, if not already there:


#17. Specify the $ORACLE_BASE and $ORACLE_HOME (software location), if not already set as below:

#18. Specify the Inventory location, if not set already:


#19. The prerequisite checks would show something similar to:

We have to fix these:

#19.1 To install the packages that are not available, we copy the V77197-01.iso to the Linux VM using winscp, in a
location of choice, eg: /opt/software/linux.

#19.2. Then we mount the file system using a command similar to the one below:
mkdir /mnt/linux
mount -t iso9660 -o loop /opt/software/linux/V77197-01.iso /mnt/linux/

#19.3. Install the missing packages:


cd /mnt/linux/Packages/
rpm –Uvh libaio-devel-0.3.107-10.el6.x86_64.rpm
rpm –Uvh ksh-20120801-28.el6.x86_64.rpm

#19.4 Click Fix and Check again:


#19.5. Execute the recommended script connected as root:

# /tmp/CVU_12.1.0.2.0_grid/runfixup.sh
#19.6 Oracle will repeat the checks.
Some of the prerequisites can be ignored:

#20. Summary before the installation. Just click install:


#21. Now you wait for the installation to be completed:

#21. In the end, you will be required to run 2 scripts:


#22. Execute the 2 scripts:
# /u01/app/oraInventory/orainstRoot.sh
And
# /u01/app/12.1.0.2/grid/root.sh
The second script is indicating to run another script:
To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
//app/12.1.0.2/grid/perl/bin/perl -I/app/app/12.1.0.2/grid/perl/lib -I/app/app/12.1.0.2/grid/crs/install
/app/app/12.1.0.2/grid/crs/install/roothas.pl
After the execution, it should prompt:
Successfully configured Oracle Grid Infrastructure for a Standalone Server

#23. Click OK and wait for the installation to complete:

#24. The grid infrastructure for stand alone server is now complete.

#25. You can check the status of the GI using:


crsctl check has
crsctl stat res –t

#26. The last thing to do is to add a new listener service, connected as grid:
$ srvctl add listener -l listener_grid -o $ORACLE_HOME -p tcp:1721
$ srvctl status listener -l listener_grid
Listener LISTENER_GRID is enabled
Listener LISTENER_GRID is not running
srvctl start listener -l listener_grid
$ srvctl status listener -l listener_grid
Listener LISTENER_GRID is enabled
Listener LISTENER_GRID is running on node(s): dragos
Database Installation

#1. Open a new shell using Ctrl+Shift+T. You should have now 3 shells opened from the same terminal, one for
root, another for grid and one for oracle

#2. As oracle, go to the software location and unzip the database files.
$ cd /opt/software/oracle
$ unzip <file 1>
$ unzip <file 2>
In case you get permission denied errors, run as root the below:
# setfacl -m g:oinstall:rwx /opt/software/oracle

#3. Move to the database directory and start the installer:


$ cd database
$ ./runInstaller

#4. Click Next and ignore the error that pops up.
#5. Select “Skip Software Updates” and Next:

#6. Select “Install database software only”.


#7. Select “Single instance database installation”

#8. Select “Advanced Install”


#9. Select English as language:

#10. Select “Enterprise Edition”


#11. Select the $ORACLE_BASE and $ORACLE_HOME (software location):

#12. Fill in the OS Groups, if not already selected:


#13. Start the installation:

#14. Wait for the installation to complete:


#15. Execute the recommended script connected as root:

# /app/app/oracle/product/12.1.0.2/dbhome_1/root.sh
Press Enter for any question asked.

The database software is now installed.


Create a new database:
As the oracle user, in the same session where the software was installed or a new one, similarly set:
#1. Execute dbca:
$ dbca

#2. Select “create a database”

#3. Select the template: “General Purpose or Transaction Processing”


#4. Give the database name; specify a domain. The SID will be set by default to the database name without domain,
don’t change it.
#5. Specify the usage of Enterprise Manager:

#6. Specify a common password for all the users:


#7. Set the database files destination:

#8. Make sure Fast Recovery Area is enabled. Do not change the parameters:
#9. Do not enable sample schemas:

#10. Database sizing should be left on default:


#11. Just click next:

#12. Click finish and let the database be created:

#14. The database creation is complete.

You might also like