Wednesday, January 06, 2010

Instalação do Oracle EM Grid Control 10.2.0.5 em Linux x86 - Part 1

Olá,
A partir deste post vou compartilhar com os leitores do blog a instalação do Oracle EM Grid Control que nada mais é que o EM Database Control extendido a gerenciar,coletar e processar estatíscas através  do Agent a mais de uma instance ou database.Vale lembrar que também é possível monitorar outros tipos de “alvos” além do banco de dados como Servidores Web e outros sistemas operacionais como Linux.A função do Agent(residente no target) é coletar as informações e enviar ao repositório do Grid Control por meio de uma série de serviços  do OMS ligado ao repositório .Mas não vamos entrar em detalhe hoje!
Abaixo uma imagem para representar melhor a arquitetura do Grid Control.
image

Instalação do Grid Control 10.2.0.5 on OEL 5
A primeira instalação a ser feita é a da mídia base “full”  que contém todos serviços a serem instalados,portanto a instalação a ser feita é da versão 10.2.0.1.1 e posteriormente a aplicação do patch para a 10.2.0.5 .
Abaixo o local de download e informções sobre as mídias de instalação .
http://www.oracle.com/technology/software/products/oem/index.html
Grid Control(full)
http://www.oracle.com/technology/software/products/oem/htdocs/linuxsoft.html
Patch 10.2.0.5 do Grid
http://www.oracle.com/technology/software/products/oem/htdocs/linuxsoft.html
Agent 10.2.0.5( para isntalar nos targets(alvos)
http://www.oracle.com/technology/software/products/oem/htdocs/agentsoft.html
Observações :
- A Oracle disponibiliza praticamento todos os seus softwares gratuitamente para fins de estudo pessoais
- Esta instalação tenta simular um ambiente real,mas limitado a capaciade de hardware e software utilizados.
- Esta instalação começa depois de já ter configurado o sistema operacional  Linux,parâmetros de kernel ,pacotes ,usuários e grupos e etc.
Dicas
Certifique-se de que os  requisitos do sistema estão ok com o sistema operacional,hardware e arquitetura tais como :
-  pacotes necessários  estão instalados
- Nome do host configurado bem como /etc/hosts
- Memória RAM ,Swap e área temporária suficientes
- Software Oracle compatível com o S.O e Hardware
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Criando o diretório para as midias do grid control:
[root@suecia u01]# ls -l
total 4
drwxrwxr-x 2 oracle oinstall 4096 Jan  6 11:34 app
[root@suecia u01]# mkdir sw
[root@suecia u01]# chmod -R 777 /u01/sw
[root@suecia u01]# 
[root@suecia u01]# 
Enviei as mídias via WinSCP para o diretório acima.
Descompactando as midias :
Para descompactar use o comando
unzip nomedoarquivo
ex.
unzip V16617-01.zip
[root@suecia /]# cd /u01/sw/
[root@suecia sw]# ls -ltrh
total 4.0K
drwxr-xr-x 3 oracle oinstall 4.0K Jan  6 12:20 grid_control
[root@suecia sw]# cd grid_control
[root@suecia grid_control]# ls -l
total 4016004
drwxrwxr-x 3 oracle oinstall       4096 Jan  6 12:20 Disk1
-rw-r--r-- 1 oracle oinstall 1138311452 Feb 23  2009 V15627-01_1of2.zip
-rw-r--r-- 1 oracle oinstall 1137845265 Feb 23  2009 V15627-01_2of2.zip
-rw-r--r-- 1 oracle oinstall 1832188952 May  9  2009 V16617-01.zip
[root@suecia grid_control]# 
Depois da extração da midia do grid 10.2.x que possui a instalação full para Linux.
[oracle@suecia grid_control]$ ls -ltrh
total 3.9G
-rw-r--r--  1 oracle oinstall 1.1G Feb 23  2009 V15627-01_1of2.zip
-rw-r--r--  1 oracle oinstall 1.1G Feb 23  2009 V15627-01_2of2.zip
drwxrwxr-x 10 oracle oinstall 4.0K May  8  2009 Disk1
-rw-r--r--  1 oracle oinstall 1.8G May  9  2009 V16617-01.zip
[oracle@suecia grid_control]$ mkdir 10.2_base
[oracle@suecia grid_control]$ ls
10.1  Disk1  V15627-01_1of2.zip  V15627-01_2of2.zip  V16617-01.zip
[oracle@suecia grid_control]$ mv Disk1/ 10.2_base/
[oracle@suecia grid_control]$ ls -l
total 4016004
drwxr-xr-x 3 oracle oinstall       4096 Jan  6 12:24 10.2_base
-rw-r--r-- 1 oracle oinstall 1138311452 Feb 23  2009 V15627-01_1of2.zip
-rw-r--r-- 1 oracle oinstall 1137845265 Feb 23  2009 V15627-01_2of2.zip
-rw-r--r-- 1 oracle oinstall 1832188952 May  9  2009 V16617-01.zip
[oracle@suecia grid_control]$ 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Instalação via OUI :
[oracle@suecia Disk1]$ ls -l
total 44
drwxrwxr-x  4 oracle oinstall 4096 May  8  2009 dcommon
drwxrwxr-x  6 oracle oinstall 4096 May  8  2009 doc
-rwxrwxr-x  1 oracle oinstall 5488 May  8  2009 index.htm
drwxrwxr-x  5 oracle oinstall 4096 Apr 21  2009 install
drwxrwxr-x  4 oracle oinstall 4096 Apr 21  2009 libskgxn
drwxrwxr-x  5 oracle oinstall 4096 Apr 21  2009 oms
drwxrwxr-x  5 oracle oinstall 4096 Apr 21  2009 rdbms
drwxrwxr-x  2 oracle oinstall 4096 Apr 21  2009 response
-rwxrwxr-x  1 oracle oinstall 1457 Apr 21  2009 runInstaller
drwxrwxr-x 10 oracle oinstall 4096 Apr 21  2009 stage
[oracle@suecia Disk1]$ xclock
Warning: Missing charsets in String to FontSet conversion
[oracle@suecia Disk1]$ ./runInstaller 
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be enterprise-4, enterprise-5, redhat-3, redhat-4, redhat-5, redhat-5.1, SuSE-9, SuSE-10, UnitedLinux-1.0, asianux-1 or asianux-2
                                      Passed
All installer requirements met.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-01-06_12-29-34PM. Please wait ...[oracle@suecia Disk1]$ 
clip_image001
clip_image002
clip_image003
clip_image004
clip_image005
clip_image006
clip_image007
clip_image008
clip_image009
clip_image010
Executar no shell como root please!
[root@suecia /]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory to 770.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete
[root@suecia /]# /u01/app/db10g/allroot.sh
Starting to execute allroot.sh ......... 
Starting to execute /u01/app/db10g/root.sh ......
Running Oracle10 root.sh script...
\nThe following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/db10g
Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...
\nCreating /etc/oratab file...
Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
/etc/oracle does not exist. Creating it now.
Finished execution of  /u01/app/db10g/root.sh ......
Starting to execute /u01/app/oms10g/root.sh ......
Running Oracle10 root.sh script...
\nThe following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oms10g
Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying coraenv to /usr/local/bin ...
Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished execution of  /u01/app/oms10g/root.sh ......
Starting to execute /u01/app/agent10g/root.sh ......
Running Oracle10 root.sh script...
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/agent10g
Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Finished execution of  /u01/app/agent10g/root.sh ......
[root@suecia /]# 
clip_image011
Acima pegamos um erro na instalação e está aqui compartilhado para que se alguem passar pelo mesmo possa resolvê-lo da melhor forma possível.
Dica do meu amigo DBA  Bruno Murassaki
Corrigindo os erros :
[root@suecia /]#  ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
[root@suecia /]# chmod 755 /usr/lib/libgdbm.so.2.0.0
[root@suecia /]# chmod 755 /usr/lib/libdb.so.2
[root@suecia /]# 
Voltando ao OUI  e clicando em “retry”
clip_image012
clip_image013
Oh não! Outro erro!
Desta vez vamos o Metalink !
Corrigindo os erros de acordo com o Metalink :
[oracle@suecia ~]$ cd /u01/app/oms10g/
[oracle@suecia oms10g]$ ls
agentdeploy     cfgtoollogs  deconfig     install.platform  jdk   mesg     oraInst.loc  precomp   soap         sysman    webservices
allroot.sh      chgip        diagnostics  inventory         jlib  network  oui          rdbms     sqlj         uddi      wireless
Apache          clone        dsa          j2ee              jre   nls      owm          relnotes  sqlplus      uix       xdk
assistants      config       has          javacache         jsp   OPatch   perl         rlmgr     srvm         upgrade
backup_restore  datadirect   iaspt        javavm            ldap  opmn     plsql        root.sh   sso          wcs
bin             dcm          install      jdbc              lib   oracore  portal       slax      syndication  webcache
[oracle@suecia bin]$ ./dcmctl updateConfig -ct ohs
[oracle@suecia bin]$ 
Novamente clicando em “retry”e  retornando ao OUI
clip_image014
clip_image015
clip_image016
Como visto terminamos a instalação do EM Grid Control 10.2.0.1.1.
Mas como subir os serviços?
Como subir os serviços necessários do Grid
Porcure por sua ORACLE_BASE até achar as 3 HOMES abaixo :
# Start everything
db10g/bin/dbstart
oms10g/opmn/bin/opmnctl startall
agent10g/bin/emctl start agent
# Stop everything
agent10g/bin/emctl stop agent
oms10g/opmn/bin/opmnctl stopall
db10g/bin/dbshut
Caso banco não efetue shutdown com dbshut verifique novamente ou efetue shutdown como SYSDBA tradicionalmente via SQLPLUS!
Após subir todos os serviços pude acessar o console do Grid Control.
Pode ver que está tudo ok e o próprio host está sendo monitorado e note também que  ao final da página do navegador está a temperatura e  a previsão do tempo em São Paulo !!!!
clip_image017
Normalmente edito o .bash_profile do usuário Oracle depois.
Alguma das variáveis de ambiente para o .bash_profile  do usuário oracle:
[oracle@suecia ~]$ more .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
##############################################
##Modificado por Julio C. Correa em 07/01/2010
##############################################
##Variaveis de ambiente  para o grid server
export ORACLE_BASE=/u01/app
export ORACLE_HOME=/u01/app/db10g
export ORACLE_SID=emrep
export PATH=$PATH:$ORACLE_HOME/bin
##Comandos para acessar mais rapido as outras HOMES
alias omshome='cd /u01/app/oms10g'
alias agenthome= 'cd /u01/app/agent10g'
[oracle@suecia ~]$
No próximo post vamos fazer a aplicação do patch 10.2.0.5,afinal ainda estamos na 10.2..0.1.1 !
Abs,
Júlio César Corrêa

6 comments:

Erick Freitas said...

Julio, bom dia !!

Seguindo o seu post obtive o mesmo erro citado na parte do Agent Configuration Assistant.

Apliquei a correção sugerida e não funcionou. Tem mais alguma sugestão ?

Obrigado pela atenção.

Erick

Unknown said...

Erick,

Bom dia.

Para entender melhor você pode enviar aqui mesmo no comentário em qual assistente ele parou e a mensagem de erro?

Talvez seja problema em outro ponto.

Abs,

Erick Freitas said...

- Agent Configuration Assistant

- - OUI-25031
- Configuration assistant "Agent Configuration Assistant" failed
-----------------------------------------------------------------------------
The "/u01/OracleHomes/agent10g/cfgtoollogs/configToolFailedCommands" script contains all commands that failed,
were skipped or were cancelled. This file may be used to run these configuration assistants outside of OUI.
Note that you may have to update this script with passwords (if any) before executing the same.
-----------------------------------------------------------------------------

Essa informação que você precisa ?

Obrigado !

Erick

Unknown said...

Posta o que tem dentro do arquivo /u01/OracleHomes/agent10g/cfgtoollogs/configToolFailedCommands informado.

Erick Freitas said...

# Copyright (c) 1999, 2005, Oracle. All rights reserved.
oracle.sysman.emcp.agent.AgentPlugIn

Unknown said...

Dificil hein.
Tenta remover e intalar novamente.Tenha atençao mesmo com os prereqs.

Quando o produto è homologado é porquu foi testado,normalmente até os workarounds estão no metalink ou temos que partir para a busca.