Vous êtes sur la page 1sur 29

Martes 12 de febrero del 2013 Se descargo el sistemas operativo UBUNUT , el Oracle 11G Releasse, la Virtual box.

Mircoles 13 de febrero de 2013 Se instalo la virtualbox, dentro de la virtual box cargamos el sistema operativo de UBUNTU, tambin se buscaron tutoriales sobre como instalar el Oracle 11G. Jueves 14 de febrero de 2013 Se intento Instalar oracle desde la terminal, resultados inconclusos
This is the simple how to for installing Oracle Database 11gR2 on Ubuntu 12.04 I have tested all the steps on Ubuntu 12.04 32 bit OS SOURCE HOW TO INSTALL ORACLE DATABASE 11GR2 on UBUNTU 12.04 http://www.techienote.com/tag/oracle-database-11g-r2-on-ubuntu-12-04 Installing Dependencies To install dependencies, run

sudo apt-get update sudo apt-get install gcc make binutils gawk x11-utils rpm buildessential libaio1 libaio-dev libmotif4 libtool expat alien ksh pdksh unixODBC unixODBC-dev sysstat elfutils libelf-dev binutils lesstif2 lsb-cxx libstdc++5

We need to create some softlinks to start the installation. To do so run the following commands,

sudo ln -sf /bin/bash /bin/sh sudo ln -s /usr/bin/awk /bin/awk sudo ln -s /usr/bin/rpm /bin/rpm sudo ln -s /usr/bin/basename /bin/basename sudo ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a sudo ln -s /usr/lib/i386-linux-gnu/libc_nonshared.a /usr/lib/libc_nonshared.a sudo ln -s /lib/i386-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1

sudo ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so.6

Also we need to add oracle user and oinstall, dba, nobody group. Run following commands,

sudo addgroup oinstall sudo addgroup dba sudo addgroup nobody sudo usermod -g nobody nobody sudo useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle sudo mkdir /home/oracle sudo chown -R oracle:dba /home/oracle

We need to do changes in start-up script, run following commands as root

mkdir /etc/rc.d for i in 0 1 2 3 4 5 6 S do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d done

Now we will create the directory for installation, and changes it owner to oracle. Run following commands to do the same

sudo mkdir -p /u01/app/oracle sudo chown -R oracle:dba /u01

We also need to modify the kernel parameter, to do so run following commands as root

echo "#">> /etc/sysctl.conf echo "# Oracle 11gR2 entries">> /etc/sysctl.conf echo "fs.aio-max-nr=1048576" >> /etc/sysctl.conf echo "fs.file-max=6815744" >> /etc/sysctl.conf echo "kernel.shmall=2097152" >> /etc/sysctl.conf echo "kernel.shmmni=4096" >> /etc/sysctl.conf echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf echo "net.ipv4.ip_local_port_range=9000 65500" >> /etc/sysctl.conf echo "net.core.rmem_default=262144" >> /etc/sysctl.conf echo "net.core.rmem_max=4194304" >> /etc/sysctl.conf echo "net.core.wmem_default=262144" >> /etc/sysctl.conf echo "net.core.wmem_max=1048586" >> /etc/sysctl.conf echo "kernel.shmmax=1073741824" >> /etc/sysctl.conf

Note: kernel.shmmax = max possible value, e.g. size of physical memory in bytes. In my case machine is having 2GB so we are specifying 1GB. Adjust the parameter as per your configuration Load new kernel parameters, by running following,

sudo sysctl -p

We have to change shell configuration, to do the same run following commands as root user,

cp /etc/security/limits.conf /etc/security/limits.conf.original echo "#Oracle 11gR2 shell limits:">>/etc/security/limits.conf echo "oracle soft nproc 2048">>/etc/security/limits.conf echo "oracle hard nproc 16384">>/etc/security/limits.conf echo "oracle soft nofile 1024">>/etc/security/limits.conf

echo "oracle hard nofile 65536">>/etc/security/limits.conf

Download Oracle 11g R2 database from Oracle Download Center for linux. I have downloaded both the zip in /home/oracle. We need to extract both the zip to start the installation. To unzip run,

cd /home/oracle unzip linux_11gR2_database_1of2.zip unzip linux_11gR2_database_2of2.zip

Now we will start the installation. You can start the installation from /home/oracle/database. Login as a oracle user.

su oracle

Go to the binaries and start the installation as a oracle user,

cd /home/oracle chmod 777 -R database cd database ./runInstaller -ignoreSysPrereqs

Next we go though the installation (I dont have the Oracle Support Password so just skip in here): In Selection Installation Option, choose Create and configure a database: In System Class, choose Server Class (we hope to give a full control during installation): In Node Selection, choose Single instance database installation: In Select Install Type, choose Advanced install: In Select Product Languages, I choose to install English language: In Select Database Edition, I choose Enterprise Edition:

In Specify Installation Location, it should default as below:

Oracle Base: /u01/app/oracle Sofeware Location: /u01/app/oracle/product/11.2.0/dbhome_1

In Create Inventory, it should default as below:

Inventory Directory: /u01/app/oraInventory oraInventory Group Name: oinstall

In Select Configure Type, choose General Purpose / Transaction Processing: (IMPORTANT!) In Specify Database Identifiers, configure as below:

Global database name: orcl.techienote.com Oracle Service Identifier (SID): orcl

In Specify Configuration Options, configure as below:

Memory -> Enable Automatic Memory Management: TRUE Character sets: Use Unicode (AL32UTF8)

In Specify Management Options, choose Use Database Control for database management but keep other else empty: In Specify Database Storage Options, choose File System where: Specify database file location: /u01/app/oracle/oradata In Specify Recovery Options, choose Do not enable automated backups: In Specify Schema Passwords, I am a bit lazy so choose Use the same password for all accounts (dont do this in production server!): In Privileged Operating System Groups, confirm as below:

Database Administrator (OSDBA) Group: dba Database Operator (OSOPER) Group: oinstall

In Preform Prerequisite Checks, just simply ignore all warning message (since we are using Debian but not Oracle officially supported OS): So just confirm everything in Summary: Now following the instructions and run the following commands with root user:

/u01/app/oraInventory/orainstRoot.sh /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

Ok you get it! Confirm with installation progress In previous screen the installer mentioned that we can access Enterprise Manager Database Control URL from https://localhost:1158/em, so now lets open the browser and test it with following account:

User Name: SYS Password: your_secret_password Connect As: SYSDBA

Once login it should show as below: Error which I faced at the time of installation : Error No 1 INFO: Building Client Shared Libraries INFO: Building Client Shared Libraries INFO: The output of this make operation is also available at: '/u01/app/oracle/product/11.2.0/dbhome_1/install/make.log' INFO:

INFO: Start output from spawned process: INFO:

INFO:

INFO: /u01/app/oracle/product/11.2.0/dbhome_1/bin/genclntsh INFO: / INFO: usr INFO: / INFO: bin/ld: cannot find /usr/lib/libpthread_nonshared.a INFO: inside collect2: INFO: ld returned 1 exit status INFO: INFO: genclntsh: Failed to link libclntsh.so.11.1 INFO: make: INFO: *** [client_sharedlib] Error 1 INFO: End output from spawned process. INFO:

INFO: Exception thrown from action: make Exception Name: MakefileException Exception String: Error in invoking target 'client_sharedlib' of makefile '/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oraInventory/logs/installActions2012-05-08_10-11-08PM.log' for details. Exception Severity: 1

Solution for problem 1 is as follows

wget dpkg-deb -x ia32-libs_2.2ubuntu10_amd64.deb ia32-libs cp ia32-libs/usr/lib32/libstdc++.so.5.0.7 /usr/lib/ cd /usr/lib ln -s libstdc++.so.5.0.7 libstdc++.so.5 ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a Error No 2 INFO: / INFO: usr INFO: / INFO: bin INFO: /ld: warning: -z lazyload ignored. /usr/bin/ld: INFO: warning INFO: : -z nolazyload ignored. /usr/bin/ld: /u01/app/oracle/product INFO: /11.2.0/dbhome_1/sysman/lib//libnmectl.a(nmectlt.o): undefined reference to symbol 'B_DestroyKeyObject' INFO:

INFO: /usr/bin/ld: note: 'B_DestroyKeyObject' is defined in DSO /u01 INFO: /app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so so try adding it to the INFO: linker INFO: INFO: command line /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so: could INFO: INFO: not read symbols: Invalid operation collect2: INFO: ld returned 1 exit status INFO:

INFO: make[1]: Leaving directory `/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib'

INFO: make[1]: *** [/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/emdctl] Error 1 make: *** [emdctl] Error 2

INFO: End output from spawned process. INFO:

INFO: Exception thrown from action: make Exception Name: MakefileException Exception String: Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk'. See '/u01/app/oraInventory/logs/installActions2012-05-08_10-11-08PM.log' for details. Exception Severity: 1 Solution for problem 2 is as follows export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1/ sed -i 's/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g' $ORACLE_HOME/sysman/lib/ins_emagent.mk

sed -i 's/^\(\$LD \$LD_RUNTIME\) \(\$LD_OPT\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/bin/genorasdksh sed -i 's/^\(\s*\)\(\$(OCRLIBS_DEFAULT)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/srvm/lib/ins_srvm.mk sed -i 's/^\(TNSLSNR_LINKLINE.*\$(TNSLSNR_OFILES)\) \(\$(LINKTTLIBS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/network/lib/env_network.mk sed -i 's/^\(ORACLE_LINKLINE.*\$(ORACLE_LINKER)\)

Viernes 15 de febrero de 2013 Cargamos Oracle 11G Con Wine, y corri el programa(Maestra nos dijo que no). Sbado 16 de febrero de 2013 Volvimos a reinstalar UBUNTU e intentamos reinstalar Oracle 11G con otro tutorial diferente obteniendo resultados inconclusos

Instalar Oracle 11gR2 de 32 bits en Ubuntu 11.04


El primer paso para instalar Oracle 11gR2 en Ubuntu es verificar cual es la versin de Ubuntu que tienes instalada en tu equipo y revisar si la versin instalada es de 32 o 64 bits. Para obtener la versin de Ubuntu se puede ejecutar cualquiera de las siguientes sentencias por consola. $ cat /etc/issue.net $ lsb_release -a Una vez que conocemos la versin de Ubuntu debemos ejecutar la siguiente sentencia para saber si el Ubuntu instalado es de 32 o 64 bits. $ uname -a En mi caso la respuesta que obtengo es : Linux nombre_equipo 2.6.38-13-generic #52-Ubuntu SMP Tue Nov 8 16:48:07 UTC 2011 i686 i686 i386 GNU/Linux En este caso debuelve i686 y adems i386 por lo cual sabemos que el sistema operativo es de 32 bits. Otra opcin es que devuelva algo parecido a: Linux nombre_equipo 2.6.38-13-generic #52-Ubuntu SMP Tue Nov 0 16:48:07 UTC 2011 x86_64 GNU/Linux En este caso al devolver x86_64 implica que el sistema operativo es de 64 bits. Nota: Es importante mencionar que Ubuntu no es oficialmente soportado por Oracle en la versin 11gR2. Ahora que se ha comprobado que el sistema operativo instalado es de 32 bits se debe descargar Oracle 11gR2 para linux de 32 bits desde la siguiente ubicacin.

www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html En esta pgina se debe aceptar la licencia (Accept Liccense Agreement) y luego seleccionar File1 y File2 para Linux x86, la versin utilizada para este documento es Oracle Database 11g Release 2 Standard Edition, Standard Edition One, and Enterprise Edition. Descomprime los archivos en tu directorio home (/home/nombre_usuario), para esto se deben ejecutar las siguiente lneas en la consola al interior del directorio home. $ unzip linux_11gR2_database_1of2.zip $ unzip linux_11gR2_database_2of2.zip La descompresin de estos archivos quedar en el directorio /home/nombre_usuario/database. Luego se deben instalar algunos paquetes de Ubuntu que son necesarios para la instalacin y ejecucin de Oracle, muchos de estos paquetes ya se encuentran instalados, pero de todos modos los escribir para que se verifique si es necesario el paquete o no. Esta operacin se debe realizar como usuario root para lo cual se debe ejecutar el sisguiente comando. $ sudo su Luego se debe verificar si el paquete se encuentra instalado, para esto se debe ejecutar por consola el siguiente comando. # aptitude search nombre_del_paquete Si el primer carcter de la lnea es i significa que el paquete ya se encuentra instalado y si el primer caracter es una p quiere decir que no existen rastros del paquete en el sistema, por lo tanto, cuando aparece la i no es necesario instalar el paquete, mientras que si aparece una p, es necesario instalarlo. Para instalar un paquete en Ubuntu se debe ejecutar la siguiente lnea por consola. # apt-get install nombre_del_paquete Los nombres de los paquetes que se van a instalar son los siguientes y deben ser remplazados en nombre_del_paquete para las dos sentencias anteriores. gcc make binutils gawk x11-utils rpm libmotif4 libtool expat alien ksh pdksh elfutils libelf-dev binutils lesstif2 lsb-cxx lsb-rpm libstdc++5

build-essential unixODBC libaio1 libaio-dev unixODBC-dev sysstat

Con el paquete libstdc++5 existe un pequeo inconveniente, Ubuntu 11.04 tiene instalada la versin 6 de este paquete, por lo cual se debe realizar una instalacin manual de este paquete. El primer paso es descarga el paquete de Internet para lo cual se puede utilizar la siguiente lnea de comando, los siguientes paso, este paso se puede realizar como usuario normal de linux, no es necesario realizarlo como usuario root.

$ wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.620_i386.deb
Luego se debe desempaquetar el archivo utilizando la siguiente lnea de comandos. $ dpkg-deb -x libstdc++5_3.3.6-20_i386.deb Despus se debe realizar la copia del siguiente archivo. $ sudo cp ia32-libs/usr/lib/libstdc++.so.5.0.7 /usr/lib Por ltimo se debe ubicar en el directorio donde se copio el archivo y crear un link de este archivo como se puede observar en las siguientes dos lneas. $ cd /usr/lib $ sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5 Ahora que se han descargado todos los paquetes necesarios para la instalacin de Oracle 11gR2, es necesario crear los siguientes links, esto se debe realizar como usuarioroot. # ln -sf /bin/bash /bin/sh # ln -s /usr/bin/awk /bin/awk # ln -s /usr/bin/rpm /bin/rpm # ln -s /usr/bin/basename /bin/basename # ln -s /usr/lib/i386-linux-gnu/libpthread_mpmshared.a /usr/lib/libpthread_nonshared.a # ln -a /usr/lib/i386-linux-gnu/libc_nonshared.a /urs/lib/libc_nonshared.a # ln -a /lib/i386-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1 # ln -a /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so.6 Ahora es necesaria la creacin del usuario y los grupos que se utilizaron para la instalacin de Oracle. Todos estos pasos se deben realizar como usuario root. # addgroup oinstall # addgroup dba # addgroup nobody # usermod -g nobody nobody # useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle # mkdir /home/oracle # chown -R oracle:dba /home/oracle # mkdir /etc/rc.d

Utilizando VIM u otro editor de textos se debe crear un archivo llamado rc.sh, con las siguientes lneas. Esta operacin no es necesario realizarla como usuario root. #!/bin/sh for i in 0 1 2 3 4 5 6 S do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d done Para continuar con la instalacin se debe ejecutar el archivo y las siguientes lneas como usuario root. # sh rc.sh # mkdir -p /u01/app/oracle # chown -R oracle:dba /u01 # mv /home/nombre_usuario/database /media/database # chown -R oracle:oinstall /media/database Ahora se deben cambiar algunos archivos de configuracin del sistema. Para esto se debe continuar como usuario root agrega las siguientes lneas al final del archivo /etc/sysctl.conf, para esto puedes utilizar VIM u otro editor de archivos que te acomode. fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.core.rmem_default = 4194304 net.core.rmem_max = 4194304 net.core.wmem_default = 1048576 net.core.wmem_max = 1048576 net.ipv4.ip_local_port_range = 9000 65500 fs.aio-max-nr = 1048576 Despus se deben agregar las siguientes lneas al final del archivo /etc/security/limits.conf, esto se debe realizar igual que el proceso anterior. oracle soft nproc 2047 oracle hard nproc 16384 oracle hard nofile 65536 oracle soft nofile 1024 Ahora se debe agregar la siguiente lnea en /etc/pam.d/login por encima de la lnea session required pam_limits.so, esto se debe realizar como usuario root y con el editor de texto que ms te acomode. session required /lib/security/pam_limits.so

Luego se deben activar las nuevas opciones /etc/sysctl.conf con el siguiente comando, esta operacin se debe realizar como usuario root. # sysctl -p Despus se deben ejecutar las siguientes sentencias como usuario root. # init 3 # DISPLAY=:0; export DISPLAY; xhost +; Despus es necesario ejecutar los siguientes pasos como usuario root, para instalar Oracle 11gR2 debemos cambiar al usuario oracle. # su oracle # DISPLAY=:0; export DISPLAY # xclock Esto mostrar una ventana con el reloj y entonces presiona ctrl -c en la terminal para cerrar la ventana. $ cd /media/database $ ./runInstaller -ignoreSysPrereqs Con estos ltimos comandos se inicia la instalacin de Oracle 11gR2. En estos momentos se desplegar una ventana para comenzar la instalacin de modo grfico. 1.- Se confiran las actualizaciones de seguridad. Si deseas obtener actualizaciones de seguridad puedes ingresar un correo electrnico y una contrasea de My Oracle Support y luego presionas siguiente, en caso que no desees actualizaciones puedes desseleccionar el checkbox de Deseo recibir actualizaciones de seguridad a travs de My Oracle Support y luego presionas el botn siguiente. 2.- Seleccionar opciones de instalacin. En esta ventana se debe seleccionar la opcin Crear y Configurar Base de Datos y luego se debe presionar el botn siguiente. 3.- Clase de Sistema En esta ventana se debe seleccionar si se instalar en un servidor o en un computador de escritorio, en el caso de esta instalacin se realizar como Clase de Escritorio, luego se debe presionar el botn siguiente. 4.- Configuracin de instalacin tpica

En la configuracin de instalacin se dejan todos los datos como vienen por defecto y se agrega una clave para el usuario system, como mnimo 8 caracteres entre los cuales deben haber maysculas, minsculas, numeros y caracteres especiales tipo -, _, ., etc. Una vez que los datos han sido completados se presiona el botn siguiente. 5.- Crear Inventario En esta interfaz se dejan todos los valores como vienen y se presiona el botn siguiente 6.- Realizar Comprobacin de Reuisitos En esta interfaz se selecciona el checkbox Ignorar Todo y luego se presiona el botn siguiente. 7.- Resumen Se presenta el resumen de la instalacin, en este punto se presiona el botn terminar. 8.- Instalar Producto En esta interfaz comienza el proceso de instalacin del motor de base de datos. Despus de un alto porcentaje de avance se despliega una ventana indicando que la creacin de la base de datos ha terminado, en la cual se debe presionar el botn aceptar. Luego se regresa al proceso de instalacin el cual ha pesar de indicar que ha avanzado el 100% del proceso, aun quedan proceso en curso y pendientes. Pero a pesar de que no se ven avances, de todos modos se debe dejar que la instalacin siga su curso. Despus aparece un mensaje indicando dos archivos que deben ser ejecutados, en esta ventana se debe presionar el botn Aceptar. 9.- Terminar Se despliega un mensaje indicando que la base de datos se instalo correctamente, en esta ventana se debe presionar el botn Cerrar para terminar el proceso de instalacin. Por defecto el nombre de la base de datos es orcl, este nombre puede ser modificado en el paso 4 de la instalacin. Despus de finalizar la instalacin se deben ejecutar los siguientes comandos como usuario root. # sh /u01/app/oraInventory/orainstRoot.sh # sh /u01/app/oracle/product/11.2.0/dbname_1/root.sh El segundo comando (root.sh) nos preguntar algo parecido a lo siguiente Enter the full pathname a the local bin directory: [/usr/local/bin]: a lo cual respondemos presionando la tecla Enter. Luego es necesaria la creacin de un script de inicio, para lo cual se debe actualizar o crear segn corresponda el archivo /etc/init.d/oracledb, como usuario root utilizando tu editor favorito. El archivo debe contener las siguientes lneas. #!/bin/bash

# #/etc/init.d/oracledb # #Run-level Startup script for the Oracle Listener and Instances #It relies on the information on /etc/oratab export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbname_1 export ORACLE_OWNR=oracle export PATH=$PATH:$ORACLE_HOME/bin if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ] then echo Oracle startup: cannot start exit 1 fi case $1 in start) #Oracle listener and instance startup echo -n Starting Oracle: su $ORACLE_OWNR -c $ORACLE_HOME/bin/lsnrctl start su $ORACLE_OWNR -c $ORACLE_HOME/bin/dbstart $ORACLE_HOME touch /var/lock/oracle echo OK ;; stop) #Oracle listener and instance shutdown echo -n Shutdown Oracle: su $ORACLE_OWNR -c $ORACLE_HOME/bin/lsnrctl stop su $ORACLE_OWNR -c $ORACLE_HOME/bin/dbshut $ORACLE_HOME rm -f /var/lock/oracle echo OK ;; reload|restart) $0 stop $0 start ;; *) echo Usage: `basename $0` start|stop|restart|reload exit 1 esac exit 0 ################################################## Despus cambiamos los permisos del archivo y actualizamos los archivos de inicio con los siguientes comandos, estos comandos deben ser ejecutados como root.

# chmod a+x /etc/init.d/oracledb # update-rc.d oracledb default 99 Una vez finalizados estos pasos la base de datos ha quedado instalada y lista para ser usuada, pero se debe mencionar que al reinicar Ubuntu, Oracle no se iniciar de forma automtica, sino que se debe ejecutar el siguiente comando, como usuario normal del sistema. $ sudo /etc/init.d/oracledb start Si usted desea que Oracle se inicie automticamente al iniciar Ubuntu debe modificar el archivo /etc/oratab cambiando la N en la lnea orcl por Y, esta operacin debe ser realizada con tu editor favorito como usuario root. orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y Ahora solo falta que pruebes tu coneccin a la base de datos con cliente de base de datos favorito (SQL Plus, SQL Developer, DataStudio, etc.) y comenzar a utilizar tu base de datos.

Lunes 18 de febrero de 2013 Volvimos a reinstalar UBUNTU e intentamos reinstalar Oracle 11G con otro tutorial diferente obteniendo resultados inconclusos

Downloading Oracle 11g 64 bits for Linux


First, download Oracle 11gR2 Enterprise/Standard Edition for Linux x86-64 from Oracle website.

Then

extract

the

downloaded

file:

unzip linux.x64_11gR2_database_1of2.zip unzip linux.x64_11gR2_database_2of2.zip

A new folder named database will be extracted.

Preparing the system


Second, read the HTML documentation of the quick install guide you can found in the extracted folder at this place: database/doc/install.112/e10860/toc.htm

For the rest of this howto, we suppose Oracle will be installed at /opt/oracle Root directory in a freshly newly installed Linux Ubuntu distribution.

We will have to:

Create required users and groups accounts Set required system parameters in /etc/sysctl.conf Installing complementary packages

Creating system accounts

Creating Oracle Inventory group: sudo groupadd oinstall

Creating Oracle DBA group: sudo groupadd dba

Creating Oracle user home and account: sudo mkdir -p /opt/oracle sudo useradd -g oinstall -G dba sudo passwd oracle sudo chown -R oracle:oinstall /opt/oracle -d /opt/oracle -s /bin/bash oracle

For Oracle 10g, it was required to add nobody user group, this is no more required with 11g as it is no more described in 11g quick installation guide.

Updating kernel parameters

This is one of the longest task of this installation. Because you will have to check your current config. Check commands in Oracle documentation for this, section 6 Configuring Kernel Parameters. Then, edit the file /etc/sysctl.conf as described below:

sudo gedit /etc/sysctl.conf

Add the following lines to get minimal values required by Oracle, adjusting if required, depending of your configuration:

# # Oracle 11g # kernel.sem = 250 32000 100 128 kernel.shmall = 2097152 kernel.shmmni = 4096 # Replace kernel.shmmax with the half of your memory in bytes # if lower than 4Go minus 1 # 1073741824 is 1 GigaBytes kernel.shmmax=1073741824

# Try sysctl -a | grep ip_local_port_range to get real values 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 = 1048576

# Max value allowed, should be set to avoid IO errors fs.aio-max-nr = 1048576 # 512 * PROCESSES / what really means processes ?

fs.file-max = 6815744

# To allow dba to allocate hugetlbfs pages # 1001 is your oinstall group, id. grep oinstall /etc/group will give this value vm.hugetlb_shm_group = 1001

About HUGE

TLB.

Since Ubuntu Karmic (it was not required on Ubuntu Jaunty) kernel parameters have changed and this was required for 10g.

Without these parameters your Oracle instance won't be able to create shared memory segment and Not You tested have on to will Ubuntu replace 12.04 value but refuse this is now the described group ID to in of 11g the start. documentation. oinstall group.

the

of 1001 with

Read this great howto install Oracle on debian to know more about huge tlb parameter. Then, run the command below to set these kernel parameters: sudo sysctl -p

Now, update /etc/security/limits.conf: sudo gedit /etc/security/limits.conf

And add the following parameters: # Oracle oracle oracle oracle oracle oracle soft hard soft hard soft nproc nproc nofile nofile stack 2047 16384 1024 65536 10240

Check that /etc/pam.d/login contains a line like this one: session required pam_limits.so

Now, update /etc/profile: sudo gedit /etc/profile

And add the following lines: if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi

Installing additional packages

If not already done, update your distribution with the latest packages: sudo apt-get update sudo apt-get dist-upgrade

Install the following additional packages: sudo apt-get install alien sudo apt-get install autoconf sudo apt-get install automake sudo apt-get install autotools-dev

sudo apt-get install binutils sudo apt-get install bzip2 sudo apt-get install doxygen sudo apt-get install elfutils sudo apt-get install expat sudo apt-get install gawk sudo apt-get install gcc sudo apt-get install gcc-multilib sudo apt-get install g++-multilib

# This will help preventing prevent from runInstaller terrific ./runInstaller: line 54: ./install/.oui: No such file or directory error message sudo apt-get install ia32-libs

sudo apt-get install ksh sudo apt-get install less sudo apt-get install lesstif2 sudo apt-get install lesstif2-dev sudo apt-get install lib32z1 sudo apt-get install libaio1 sudo apt-get install libaio-dev sudo apt-get install libc6-dev sudo apt-get install libc6-dev-i386 sudo apt-get install libc6-i386 sudo apt-get install libelf-dev sudo apt-get install libltdl-dev sudo apt-get install libmotif4

sudo apt-get install libodbcinstq4-1 libodbcinstq4-1:i386 sudo apt-get install libpth-dev sudo apt-get install libpthread-stubs0 sudo apt-get install libpthread-stubs0-dev sudo apt-get install libstdc++5 sudo apt-get install lsb-cxx sudo apt-get install make sudo apt-get install openssh-server sudo apt-get install pdksh sudo apt-get install rlwrap sudo apt-get install rpm sudo apt-get install sysstat sudo apt-get install unixodbc sudo apt-get install unixodbc-dev sudo apt-get install unzip sudo apt-get install x11-utils sudo apt-get install zlibc

Preventing from installation errors


To prevent from error genclntsh: Failed to link libclntsh.so.11.1 in make file for rdbms/lib/ins_rdbms.mk beacause of missing library: /usr/bin/ld: cannot find /usr/lib64/libpthread_nonshared.a inside we need to create a symlink for /usr/lib64: sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64

To

help

preventing

from

error lib//libagtsh.so:

undefined

reference

to

`nnfyboot' in make: rdbms/lib/dg4odbc] Error 1 sudo ln -sf /bin/bash /bin/sh sudo ln -s /usr/bin/awk /bin/awk sudo ln -s /usr/bin/rpm /bin/rpm sudo ln -s /usr/bin/basename /bin/basename To prevent from # /lib64/libgcc_s.so.1: File or directory does not exists, while creating lib/liborasdkbase.so.11.1 in ins_rdbms.mk, execute the command: cd /lib64 sudo ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 .

Oracle 11g also needs libstdc++5 in 32bits version that is not provided with Ubuntu Pangolin. There are many ways to install it, I have followed this howto to install libstdc++5 on Ubuntu Karmic Below is the summary of this HOWTO: mkdir /tmp/libstdc++5 cd /tmp/libstdc++5 wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.... wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3....

sudo dpkg --force-architecture -i libstdc++5_3.3.6-17ubuntu1_i386.deb sudo mv /usr/lib/libstdc++.so.5* /usr/lib32/

sudo dpkg -i libstdc++5_3.3.6-17ubuntu1_amd64.deb

Now reboot your system to be sure these parameters will be taken in account for the next part of the installation.

Others configurations

Connect as Oracle user and set some default startup file sudo su - oracle cd touch .bashrc ln -s .bashrc .bash_profile

Edit .bashrc file: vi .bashrc

And add the following line: umask 022

Execute the .bashrc file or restart a bash shell source .bashrc

Installing Oracle
Now we can start the installation of the Oracle 10g archive.

Allow others users to connect to your X session, by entering in a bash shell: xhost +

Then, login as oracle user: su - oracle

Go in the extracted database folder and run the following commands:

export DISPLAY=:0 ./runInstaller

Then,

Oracle

installer

should

start

in

graphic

mode.

For the rest of the installation, we suppose you will choose the following options:

Installing Oracle 11g Enterprise edition in advanced mode Installing server class Oracle base directory: /opt/oracle/Oracle11gee Oracle home: /opt/oracle/Oracle11gee/product/11.2.0/dbhome_1 Oracle inventory: /opt/oracle/oraInventory Oracle database global name and SID: orcl Character set: Unicode AL32UTF8 Memory: Uncheck activate automatic memory management to prevent from ORA00845: MEMORY_TARGET not supported on this system. Antoher solution could be to remove /de/shm symbolic link and mount it as a bind to /run/shm: mount --bind /run/shm /dev/shm. But this no more seems to be an issue on 12.04, was ok as automatic with my last installation.

Oradata directory: /opt/oracle/Oracle11gee/oradata

Once you will reach the "pre-reqs" screen, check "Ignore all" to continue the installation.

Then, you will encounter issues.

Solving compilation/link errors


Some issues should appear during installation.

If you have not created the symbolic links above, you will have to solve error lib//libagtsh.so: undefined reference to `nnfyboot' in make: rdbms/lib/dg4odbc] Error 1. For this, create the symbolic links and execute the commands: export ORACLE_HOME=/opt/oracle/Oracle11gee/product/11.2.0/dbhome_1 cd $ORACLE_HOME/lib ln -s libclient11.a libagtsh.a $ORACLE_HOME/bin/genagtsh $ORACLE_HOME/lib/libagtsh.so 1.0

Now we will encounter many errors due to indirect library linking:

To

solve

error #

libnnz11.so:

could

not

read

symbols:

Invalid

operation

/sysman/lib/ins_emagent.mk, enter the command: export ORACLE_HOME=/opt/oracle/Oracle11gee/product/11.2.0/dbhome_1 sed -i 's/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g' $ORACLE_HOME/sysman/lib/ins_emagent.mk

To solve error # nsglsn.c:(.text+0xc29): undefined reference to `ons_subscriber_close' /network/lib/ins_net_server.mk, enter the command: sed -i 's/^\(TNSLSNR_LINKLINE.*\$(TNSLSNR_OFILES)\) \(\$(LINKTTLIBS)\)/\1 -Wl,-no-as-needed \2/g' $ORACLE_HOME/network/lib/env_network.mk

To solve error # libocrutl11.so: undefined reference to `lfifcp' rdbms/lib/ins_rdbms.mk, enter the commands: sed -i 's/^\(ORACLE_LINKLINE.*\$(ORACLE_LINKER)\) \(\$(PL_FLAGS)\)/\1 -Wl,--noas-needed \2/g' $ORACLE_HOME/rdbms/lib/env_rdbms.mk

You also need to execute the following commands to prevent from later errors: sed -i 's/^\(\$LD \$LD_RUNTIME\) \(\$LD_OPT\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/bin/genorasdksh sed -i 's/^\(\s*\)\(\$(OCRLIBS_DEFAULT)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/srvm/lib/ins_srvm.mk

Finishing the installation


The install process will finally ask you to execute scripts as root user, just do so: # sudo /opt/oracle/oraInventory/orainstRoot.sh sudo /opt/oracle/Oracle11gee/product/11.2.0/dbhome_1/root.sh

You should be able to access database web interface through the URL https://localhost:1158/em

Now,

add

the

following

variable

declaration

in

your

oracle

user .profile, .bashrc or .bash_profile scripts: export ORACLE_HOME=/opt/oracle/Oracle11gee/product/11.2.0/dbhome_1 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib export PATH=$PATH:$ORACLE_HOME/bin

Then start a new shell or execute one of the updated files: source .bashrc

Starting and stopping Oracle


We should now be able to start Oracle database if you had choosed to create one during installation. If you have not yet created any oracle instance and database use

the $ORACLE_HOME/bin/dbcaassistant to do so.

Starting up the database

Once your server have been restarted, your database may not start. To solve this issue, first check in/etc/oratab that it has the 'Y' flag, if not, set it. sudo gedit /etc/oratab

And replace N by Y orcl:/opt/oracle/Oracle11gee/product/11.2.0/dbhome_1:Y

Finally, to manually start Oracle, run these commands as oracle user

dbstart $ORACLE_HOME

Connecting to the database

Now, just try to connect to the freshly started database: oracle@makina-oracle:~$ sqlplus system@orcl

SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 8 11:18:50 2012

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Enter password:

Connected Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 64bit

to: Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select 'Oracle 11gee is running on Ubuntu 12.04 64 bits' as Welcome from dual;

WELCOME ----------------------------------------------Oracle 11gee is running on Ubuntu 12.04 64 bits

SQL>

Shutting down the database

Just entry the following commands with Oracle user:

Martes 19 de febrero de 2013 Volvimos a reinstalar UBUNTU e intentamos reinstalar Oracle 11G con otro tutorial diferente obteniendo resultados

Mircoles 20 de febrero de 2013

Jueves 21 de febrero de 2013

Vous aimerez peut-être aussi