In acest articolul voi descrie instalarea Oracle Database 11g Release 2 (11.2) (64-bit) pe Oracle Linux 6 (64-bit). Articolul se bazează pe o instalare de server,  cu SELinux și firewall-ul dezactivat. Setup-ul instalării Oracle Linux a fost descris aici. Nu voi descrie pașii instalării deoarece vom folosi aceeași distribuție Oracle Enterprise Linux 6.3 x64 cu mențiunea ca în timpul instalării a fost selectat grupul de pachete „Basic Server” iar în plus a mai fost instalat pachetul „X Windows System”.

Înainte de a începe…

Configuram interfața de rețea

[root@OracleVM ~]# ls -l /etc/sysconfig/network-scripts/
total 196
-rw-r--r--. 3 root root   174 Nov 19 10:46 ifcfg-eth0
-rw-r--r--. 1 root root   254 Apr 27  2012 ifcfg-lo

[...]

[root@OracleVM ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
NM_CONTROLLED=yes
ONBOOT=no
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no

modificam ONBOOT=yes

Oprim firewal-ul

[root@OracleVM ~]# service iptables stop
[root@OracleVM ~]# chkconfig iptables off

Dezactivam secure linux

[root@OracleVM ~]# nano /etc/selinux/config

editam în:
SELINUX=disabled

dupa aceste modificari este necesar un reboot.

Public Repository

Trebuie sa specific ca repository-ul public este oferit fără nici un fel de suport. Dacă aveți nevoie de suport, vă rugăm să luați în considerare achiziționarea Oracle Support Linux prin magazinul online, sau prin reprezentantul dvs. de vânzări.

[root@OracleVM ~]# cd /etc/yum.repos.d
[root@OracleVM yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo

Instalam ultimele actualizări

[root@OracleVM yum.repos.d]# yum upgrade

OBS: „yum upgrade” va instala aceleasi actualizari ca si „yum update” dar spre deosebire de acesta va dezinstala pachetele marcate ca „obsolete” de catre dezvoltator.

[root@OracleVM yum.repos.d]# yum clean all

Instalam pachetul rlwrap

Mai multe detalii aici.

Descarcarea kiturilor

Descarcarea kiturilor de baza de date se face fie de pe Oracle Technology Network, fie de pe My Oracle Support:

Pre installation setup

Vom folosi pachetul oracle-rdbms-server-11gR2-preinstall, mai multe detalii puteti gasi aici.

[root@OracleVM u01]# yum install oracle-rdbms-server-11gR2-preinstall
Loaded plugins: security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-6.el6 will be installed
--> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: gcc for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: libaio-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: libstdc++-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: glibc-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: ksh for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-1 will be installed
---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed
---> Package gcc.x86_64 0:4.4.6-4.el6 will be installed
--> Processing Dependency: cpp = 4.4.6-4.el6 for package: gcc-4.4.6-4.el6.x86_64
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.6-4.el6.x86_64
---> Package gcc-c++.x86_64 0:4.4.6-4.el6 will be installed
--> Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++-4.4.6-4.el6.x86_64
---> Package glibc-devel.x86_64 0:2.12-1.80.el6_3.6 will be installed
--> Processing Dependency: glibc-headers = 2.12-1.80.el6_3.6 for package: glibc-devel-2.12-1.80.el6_3.6.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.80.el6_3.6.x86_64
---> Package ksh.x86_64 0:20100621-16.el6 will be installed
---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed
---> Package libstdc++-devel.x86_64 0:4.4.6-4.el6 will be installed
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
---> Package cpp.x86_64 0:4.4.6-4.el6 will be installed
---> Package glibc-headers.x86_64 0:2.12-1.80.el6_3.6 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.80.el6_3.6.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.80.el6_3.6.x86_64
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
--> Running transaction check
---> Package kernel-uek-headers.x86_64 0:2.6.32-300.39.1.el6uek will be installed
---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package                         Arch   Version                Repository  Size
================================================================================
Installing:
oracle-rdbms-server-11gR2-preinstall
x86_64 1.0-6.el6              ol6_latest  15 k
Installing for dependencies:
cloog-ppl                       x86_64 0.15.7-1.2.el6         ol6_latest  93 k
compat-libcap1                  x86_64 1.10-1                 ol6_latest  17 k
compat-libstdc++-33             x86_64 3.2.3-69.el6           ol6_latest 183 k
cpp                             x86_64 4.4.6-4.el6            ol6_latest 3.7 M
gcc                             x86_64 4.4.6-4.el6            ol6_latest  10 M
gcc-c++                         x86_64 4.4.6-4.el6            ol6_latest 4.7 M
glibc-devel                     x86_64 2.12-1.80.el6_3.6      ol6_latest 970 k
glibc-headers                   x86_64 2.12-1.80.el6_3.6      ol6_latest 600 k
kernel-uek-headers              x86_64 2.6.32-300.39.1.el6uek ol6_latest 716 k
ksh                             x86_64 20100621-16.el6        ol6_latest 684 k
libaio-devel                    x86_64 0.3.107-10.el6         ol6_latest  13 k
libstdc++-devel                 x86_64 4.4.6-4.el6            ol6_latest 1.5 M
mpfr                            x86_64 2.4.1-6.el6            ol6_latest 156 k
ppl                             x86_64 0.10.2-11.el6          ol6_latest 1.3 M

Transaction Summary
================================================================================
Install      15 Package(s)

Total download size: 25 M
Installed size: 61 M

Editarea fisierului hosts

[root@OracleVM u01]# nano /etc/hosts
<adresa IP>    <numele masinii>

Dezarhivam kitul

[root@OracleVM u01]# chown -R oracle /u01/

[root@OracleVM u01]#su oracle

[oracle@OracleVM u01]$ unzip p10404530_112030_Linux-x86-64_1of7.zip

[oracle@OracleVM u01]$ unzip p10404530_112030_Linux-x86-64_2of7.zip

Crearea directoarelor

[oracle@OracleVM u01]$ mkdir -p /u01/app/oracle/product/11.2.0/db_1
[oracle@OracleVM u01]$ chown -R oracle:oinstall /u01
[oracle@OracleVM u01]$ chmod -R 775 /u01

Edităm profilul

[oracle@OracleVM u01]$ nano ~/.bash_profile

#Oracle settings
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin;  export PATH
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'

Încărcăm profilul:

[oracle@OracleVM u01]$ . ~/.bash_profile

Export display

[oracle@OracleVM u01]$ export DISPLAY=your_ip_host:0.0

Instalarea

[oracle@OracleVM u01]$cd database

[oracle@OracleVM database]$ ./runInstaller

Startup script

modificați oratab

[oracle@OracleVM database]$ nano /etc/oratab

din

orcl:/u01/app/oracle/product/11.2.0/dbhome_1:N

în

orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y

Creați scriptul de mai jos:

[root@OracleVM u01]# nano /etc/init.d/dbora

#!/bin/sh
# 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=/u01/app/oracle/product/11.2.0/dbhome_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"
touch /var/lock/subsys/dbora
;;
'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"
rm -f /var/lock/subsys/dbora
;;
esac

iar in final adaugati serviciul in run levels:

[root@OracleVM init.d]# chkconfig --add dbora

Asta este tot!

Pentru mai multe informații consultați documentația oficiala disponibilă la adresa: http://docs.oracle.com/cd/E11882_01/install.112/e24321/toc.htm

Pașii pentru instalarea PSU-ului 11.2.0.3.3 sunt descriși în articolul  Applying Patch Set Update 11.2.0.3.3 to 11.2.0.3.0 on linux x86-64

Puteți vedea capturi din timpul instalării Oracle database 11.2.0.3.0 în imaginile de mai jos:












 

One comment

Lasă un răspuns

Completează mai jos detaliile despre tine sau dă clic pe un icon pentru autentificare:

Logo WordPress.com

Comentezi folosind contul tău WordPress.com. Dezautentificare / Schimbă )

Poză Twitter

Comentezi folosind contul tău Twitter. Dezautentificare / Schimbă )

Fotografie Facebook

Comentezi folosind contul tău Facebook. Dezautentificare / Schimbă )

Fotografie Google+

Comentezi folosind contul tău Google+. Dezautentificare / Schimbă )

Conectare la %s