Instalação o Oracle 11g R2 usando o pacote Oracle-Validated no Oracle Enterprise Linux
Posted by Emerson on 05:49 with 2 comments
Demonstrarei nesse post a instalação do Oracle 11G R2 usando o pacote oracle-validated.
Esse pacote é instalado através do repositório do yum resolvendo as dependências necessárias para instalação, ficando apenas para o DBA ajustar os demais parametros do SO necessários para o banco de dados funcionar.
Cenário:
SO:Oracle Enterprise Linux 5.4
BD: Oracle 11G R2
Versão: Enterprise
1 - Configurar o Repositorio
[root@oralinux ~]# cd /etc/yum.repos.d/
[root@oralinux ~]# wget http://public-yum.oracle.com/public-yum-el5.repo
2 - Instalar o Oracle Validate
[root@oralinux ~]# yum install oracle-validated
Loaded plugins: security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-validated.i386 0:1.0.0-18.el5 set to be updated
--> Processing Dependency: kernel-headers for package: oracle-validated
--> Processing Dependency: gdb for package: oracle-validated
--> Processing Dependency: gcc-c++ for package: oracle-validated
--> Processing Dependency: gcc for package: oracle-validated
--> Processing Dependency: unixODBC-devel for package: oracle-validated
--> Processing Dependency: compat-db for package: oracle-validated
--> Processing Dependency: elfutils-libelf-devel for package: oracle-validated
--> Processing Dependency: libstdc++-devel for package: oracle-validated
--> Processing Dependency: libXp for package: oracle-validated
--> Processing Dependency: glibc-devel for package: oracle-validated
--> Processing Dependency: glibc-headers for package: oracle-validated
--> Processing Dependency: sysstat for package: oracle-validated
--> Processing Dependency: unixODBC for package: oracle-validated
--> Processing Dependency: libaio-devel for package: oracle-validated
--> Processing Dependency: compat-gcc-34-c++ for package: oracle-validated
--> Processing Dependency: compat-gcc-34 for package: oracle-validated
--> Running transaction check
---> Package compat-db.i386 0:4.2.52-5.1 set to be updated
---> Package compat-gcc-34.i386 0:3.4.6-4 set to be updated
---> Package compat-gcc-34-c++.i386 0:3.4.6-4 set to be updated
---> Package elfutils-libelf-devel.i386 0:0.137-3.el5 set to be updated
--> Processing Dependency: elfutils-libelf-devel-static-i386 = 0.137-3.el5 for package: elfutils-libelf-devel
---> Package gcc.i386 0:4.1.2-46.el5 set to be updated
--> Processing Dependency: libgomp >= 4.1.2-46.el5 for package: gcc
---> Package gcc-c++.i386 0:4.1.2-46.el5 set to be updated
---> Package gdb.i386 0:6.8-37.el5 set to be updated
---> Package glibc-devel.i386 0:2.5-42 set to be updated
---> Package glibc-headers.i386 0:2.5-42 set to be updated
---> Package kernel-headers.i386 0:2.6.18-164.el5 set to be updated
---> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated
---> Package libaio-devel.i386 0:0.3.106-3.2 set to be updated
---> Package libstdc++-devel.i386 0:4.1.2-46.el5 set to be updated
---> Package sysstat.i386 0:7.0.2-3.el5 set to be updated
---> Package unixODBC.i386 0:2.2.11-7.1 set to be updated
---> Package unixODBC-devel.i386 0:2.2.11-7.1 set to be updated
--> Running transaction check
---> Package elfutils-libelf-devel-static.i386 0:0.137-3.el5 set to be updated
---> Package libgomp.i386 0:4.4.0-6.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================================
Installing:
oracle-validated i386 1.0.0-18.el5 el5_u4_base 15 k
Installing for dependencies:
compat-db i386 4.2.52-5.1 el5_u4_base 1.7 M
compat-gcc-34 i386 3.4.6-4 el5_u4_base 4.1 M
compat-gcc-34-c++ i386 3.4.6-4 el5_u4_base 11 M
elfutils-libelf-devel i386 0.137-3.el5 el5_u4_base 24 k
elfutils-libelf-devel-static i386 0.137-3.el5 el5_u4_base 66 k
gcc i386 4.1.2-46.el5 el5_u4_base 5.2 M
gcc-c++ i386 4.1.2-46.el5 el5_u4_base 3.4 M
gdb i386 6.8-37.el5 el5_u4_base 3.4 M
glibc-devel i386 2.5-42 el5_u4_base 2.0 M
glibc-headers i386 2.5-42 el5_u4_base 614 k
kernel-headers i386 2.6.18-164.el5 el5_u4_base 1.0 M
libXp i386 1.0.0-8.1.el5 el5_u4_base 22 k
libaio-devel i386 0.3.106-3.2 el5_u4_base 11 k
libgomp i386 4.4.0-6.el5 el5_u4_base 70 k
libstdc++-devel i386 4.1.2-46.el5 el5_u4_base 2.9 M
sysstat i386 7.0.2-3.el5 el5_u4_base 170 k
unixODBC i386 2.2.11-7.1 el5_u4_base 830 k
unixODBC-devel i386 2.2.11-7.1 el5_u4_base 743 k
Transaction Summary
=================================================================================================================================================================================
Install 19 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 37 M
Is this ok [y/N]: y
Downloading Packages:
(1/19): libaio-devel-0.3.106-3.2.i386.rpm | 11 kB 00:00
(2/19): oracle-validated-1.0.0-18.el5.i386.rpm | 15 kB 00:00
(3/19): libXp-1.0.0-8.1.el5.i386.rpm | 22 kB 00:00
(4/19): elfutils-libelf-devel-0.137-3.el5.i386.rpm | 24 kB 00:00
(5/19): elfutils-libelf-devel-static-0.137-3.el5.i386.rpm | 66 kB 00:00
(6/19): libgomp-4.4.0-6.el5.i386.rpm | 70 kB 00:00
(7/19): sysstat-7.0.2-3.el5.i386.rpm | 170 kB 00:01
(8/19): glibc-headers-2.5-42.i386.rpm | 614 kB 00:01
(9/19): unixODBC-devel-2.2.11-7.1.i386.rpm | 743 kB 00:02
(10/19): unixODBC-2.2.11-7.1.i386.rpm | 830 kB 00:02
(11/19): kernel-headers-2.6.18-164.el5.i386.rpm | 1.0 MB 00:03
(12/19): compat-db-4.2.52-5.1.i386.rpm | 1.7 MB 00:05
(13/19): glibc-devel-2.5-42.i386.rpm | 2.0 MB 00:05
(14/19): libstdc++-devel-4.1.2-46.el5.i386.rpm | 2.9 MB 00:07
(15/19): gcc-c++-4.1.2-46.el5.i386.rpm | 3.4 MB 00:14
(16/19): gdb-6.8-37.el5.i386.rpm | 3.4 MB 00:12
(17/19): compat-gcc-34-3.4.6-4.i386.rpm | 4.1 MB 00:12
(18/19): gcc-4.1.2-46.el5.i386.rpm | 5.2 MB 00:14
(19/19): compat-gcc-34-c++-3.4.6-4.i386.rpm | 11 MB 00:26
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 319 kB/s | 37 MB 01:59
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : kernel-headers 1/19
Installing : glibc-headers 2/19
Installing : glibc-devel 3/19
Installing : libstdc++-devel 4/19
Installing : compat-gcc-34 5/19
Installing : unixODBC 6/19
Installing : compat-gcc-34-c++ 7/19
Installing : libXp 8/19
Installing : compat-db 9/19
Installing : sysstat 10/19
Installing : libgomp 11/19
Installing : gcc 12/19
Installing : gcc-c++ 13/19
Installing : gdb 14/19
Installing : unixODBC-devel 15/19
Installing : libaio-devel 16/19
Installing : elfutils-libelf-devel 17/19
Installing : elfutils-libelf-devel-static 18/19
Installing : oracle-validated 19/19
Installed:
oracle-validated.i386 0:1.0.0-18.el5
Dependency Installed:
compat-db.i386 0:4.2.52-5.1 compat-gcc-34.i386 0:3.4.6-4 compat-gcc-34-c++.i386 0:3.4.6-4 elfutils-libelf-devel.i386 0:0.137-3.el5
elfutils-libelf-devel-static.i386 0:0.137-3.el5 gcc.i386 0:4.1.2-46.el5 gcc-c++.i386 0:4.1.2-46.el5 gdb.i386 0:6.8-37.el5
glibc-devel.i386 0:2.5-42 glibc-headers.i386 0:2.5-42 kernel-headers.i386 0:2.6.18-164.el5 libXp.i386 0:1.0.0-8.1.el5
libaio-devel.i386 0:0.3.106-3.2 libgomp.i386 0:4.4.0-6.el5 libstdc++-devel.i386 0:4.1.2-46.el5 sysstat.i386 0:7.0.2-3.el5
unixODBC.i386 0:2.2.11-7.1 unixODBC-devel.i386 0:2.2.11-7.1
Complete!
[root@oralinux ~]#
3 - Configurar os parametros do kernel
vim /etc/sysctl.conf
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=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
4 - Adicionar as seguintes linhas no arquivo
vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
5 - Criar usuarios e Grupos
groupadd oinstall
groupadd dba
groupadd oper
groupadd asmadmin
useradd -g oinstall -G dba,oper,asmadmin oracle
passwd oracle
6 - Criar a estrutura de instalação e setar as permissões para os usários
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
7 - Definir variáveis no arquivo .bash_profile
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
#ORACLE_HOSTNAME=ol5-112.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; 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
~
8 - Descompactar os arquivos baixados no site da Oracle.com
[oracle@oralinux u01]$ ls -lah
total 4,3G
drwxrwxr-x 7 oracle oinstall 4,0K Nov 22 10:36 .
drwxr-xr-x 25 root root 4,0K Nov 22 10:11 ..
-rwxrwxr-x 1 oracle oinstall 950M Nov 21 16:51 218_linux_11gR2_database_2of2.zip
-rwxrwxr-x 1 oracle oinstall 1,2G Nov 21 16:56 219_linux_11gR2_database_1of2.zip
unzip 219_linux_11gR2_database_1of2.zip
unzip 218_linux_11gR2_database_2of2.zip
9 - Acessar o diretório onde descompactou os arquivos
[oracle@oralinux u01]$ cd /u01/database/
[oracle@oralinux database]$ ls -lah
total 48K
drwxrwxr-x 8 oracle oinstall 4,0K Ago 18 2009 .
drwxrwxr-x 7 oracle oinstall 4,0K Nov 22 10:36 ..
drwxrwxr-x 12 oracle oinstall 4,0K Ago 17 2009 doc
drwxrwxr-x 4 oracle oinstall 4,0K Ago 14 2009 install
drwxrwxr-x 2 oracle oinstall 4,0K Ago 14 2009 response
drwxrwxr-x 2 oracle oinstall 4,0K Ago 14 2009 rpm
-rwxrwxr-x 1 oracle oinstall 4,3K Ago 14 2009 runInstaller
drwxrwxr-x 2 oracle oinstall 4,0K Ago 14 2009 sshsetup
drwxrwxr-x 14 oracle oinstall 4,0K Ago 14 2009 stage
-rwxrwxr-x 1 oracle oinstall 5,3K Ago 17 2009 welcome.html
10 - Com o usuário oracle executar o arquivo runInstaller
[oracle@oralinux database]$ ./runInstaller
Observem que não teremos que passar pelo processo de instalar biblioteca a biblioteca e suas dependências, agilizando a instalação;
A instalação foi concluída com sucesso em aproximadamente uns 20 minutos considerando que o Oracle Enterprise Linux 5 já estava instalado;
Referencias:
Categories: Oracle
Dica: Passo-a-passo para instalar Oracle 11gR1 no Enterprise Linux 5 - 32bits e 64bits:
ResponderExcluirhttp://clientedigital.com.br/instalar-oracle-11gr1-no-enterprise-linux-5/
Muito bom esse how-to Emerson parabéns pelo ótimo material!
ResponderExcluirPorém, no decorrer da instalação o assistente do OUI reclamou de algumas bibliotecas que aparentemente não foram instalada no pacote oracle-validated.
Desta forma eu tive que instalar manualmente as bibliotecas do make, gcc, gcc++, ODBC e libstdc. Para facilitar a instalação destas bibliotecas atualizei o arquivo dos repositórios yum /etc/yum.repos.d/public-yum-el5.repo e adicionei as seguintes linhas:
[ol5_u6_base]
name=Oracle Linux $releasever - U6 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/6/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1
ps: inicialmente não consegui buscar o nome do pacote da libstdc com yum list e consegui encontrar da seguinte maneira:
yum list | grep compat-libstdc