bitacora
TRANSCRIPT
Martes 12 de febrero del 2013
Se descargo el sistemas operativo UBUNUT , el Oracle 11G Releasse, la Virtual box.
Miércoles 13 de febrero de 2013
Se instalo la virtualbox, dentro de la virtual box cargamos el sistema operativo de UBUNTU, también 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.04http://www.techienote.com/tag/oracle-database-11g-r2-on-ubuntu-12-04
Installing DependenciesTo install dependencies, run
sudo apt-get update
sudo apt-get install gcc make binutils gawk x11-utils rpm build-essential 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 don’t 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 (don’t 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 let’s 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 LibrariesINFO: Building Client Shared LibrariesINFO: 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: usrINFO: /INFO: bin/ld: cannot find /usr/lib/libpthread_nonshared.aINFO: insidecollect2:
INFO: ld returned 1 exit statusINFO:
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: makeException Name: MakefileExceptionException 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-libscp ia32-libs/usr/lib32/libstdc++.so.5.0.7 /usr/lib/cd /usr/libln -s libstdc++.so.5.0.7 libstdc++.so.5ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a
Error No 2
INFO: /INFO: usrINFO: /INFO: binINFO: /ld: warning: -z lazyload ignored./usr/bin/ld:INFO: warningINFO: : -z nolazyload ignored./usr/bin/ld: /u01/app/oracle/productINFO: /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: makeException Name: MakefileExceptionException 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.mksed -i 's/^\(\$LD \$LD_RUNTIME\) \(\$LD_OPT\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/bin/genorasdkshsed -i 's/^\(\s*\)\(\$(OCRLIBS_DEFAULT)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/srvm/lib/ins_srvm.mksed -i 's/^\(TNSLSNR_LINKLINE.*\$(TNSLSNR_OFILES)\) \(\$(LINKTTLIBS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/network/lib/env_network.mksed -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).
Sábado 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 versión de Ubuntu que tienes instalada en tu equipo y revisar si la versión instalada es de 32 o 64 bits. Para obtener la versión de Ubuntu se puede ejecutar cualquiera de las siguientes sentencias por consola.
$ cat /etc/issue.netó$ lsb_release -a
Una vez que conocemos la versión 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 además i386 por lo cual sabemos que el sistema operativo es de 32 bits. Otra opción 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 versión 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 ubicación.
www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
En esta página se debe aceptar la licencia (Accept Liccense Agreement) y luego seleccionar File1 y File2 para Linux x86, la versión 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 líneas en la consola al interior del directorio home.
$ unzip linux_11gR2_database_1of2.zip$ unzip linux_11gR2_database_2of2.zip
La descompresión de estos archivos quedará en el directorio /home/nombre_usuario/database.
Luego se deben instalar algunos paquetes de Ubuntu que son necesarios para la instalación y ejecución 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 operación 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 carácter de la línea 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 línea 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 libmotif4 elfutils
make libtool libelf-dev
binutils expat binutils
gawk alien lesstif2
x11-utils ksh lsb-cxx
rpm pdksh lsb-rpm
build-essential unixODBC libstdc++5
libaio1 unixODBC-dev
libaio-dev sysstat
Con el paquete libstdc++5 existe un pequeño inconveniente, Ubuntu 11.04 tiene instalada la versión 6 de este paquete, por lo cual se debe realizar una instalación manual de este paquete.El primer paso es descarga el paquete de Internet para lo cual se puede utilizar la siguiente línea 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.6-20_i386.deb
Luego se debe desempaquetar el archivo utilizando la siguiente línea de comandos.
$ dpkg-deb -x libstdc++5_3.3.6-20_i386.deb
Después 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 líneas.
$ 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 instalación 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 creación del usuario y los grupos que se utilizaron para la instalación 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 líneas. Esta operación no es necesario realizarla como usuario root.
#!/bin/shfor i in 0 1 2 3 4 5 6 Sdoln -s /etc/rc$i.d /etc/rc.d/rc$i.ddone
Para continuar con la instalación se debe ejecutar el archivo y las siguientes líneas 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 configuración del sistema. Para esto se debe continuar como usuario root agrega las siguientes líneas al final del archivo /etc/sysctl.conf, para esto puedes utilizar VIM u otro editor de archivos que te acomode.
fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.core.rmem_default = 4194304net.core.rmem_max = 4194304net.core.wmem_default = 1048576net.core.wmem_max = 1048576net.ipv4.ip_local_port_range = 9000 65500fs.aio-max-nr = 1048576
Después se deben agregar las siguientes líneas al final del archivo /etc/security/limits.conf, esto se debe realizar igual que el proceso anterior.
oracle soft nproc 2047oracle hard nproc 16384oracle hard nofile 65536oracle soft nofile 1024
Ahora se debe agregar la siguiente línea en /etc/pam.d/login por encima de la línea “session required pam_limits.so”, esto se debe realizar como usuario root y con el editor de texto que más te acomode.
session required /lib/security/pam_limits.so
Luego se deben activar las nuevas opciones /etc/sysctl.conf con el siguiente comando, esta operación se debe realizar como usuario root.
# sysctl -p
Después se deben ejecutar las siguientes sentencias como usuario root.
# init 3# DISPLAY=:0; export DISPLAY; xhost +;
Después 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 instalación de Oracle 11gR2. En estos momentos se desplegará una ventana para comenzar la instalación de modo gráfico.
1.- Se confiran las actualizaciones de seguridad.
Si deseas obtener actualizaciones de seguridad puedes ingresar un correo electrónico y una contraseña 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 través de My Oracle Support” y luego presionas el botón siguiente.
2.- Seleccionar opciones de instalación.
En esta ventana se debe seleccionar la opción “Crear y Configurar Base de Datos” y luego se debe presionar el botón 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 instalación se realizará como “Clase de Escritorio”, luego se debe presionar el botón siguiente.
4.- Configuración de instalación típica
En la configuración de instalación se dejan todos los datos como vienen por defecto y se agrega una clave para el usuario system, como mínimo 8 caracteres entre los cuales deben haber mayúsculas, minúsculas, numeros y caracteres especiales tipo -, _, ., etc.Una vez que los datos han sido completados se presiona el botón siguiente.
5.- Crear Inventario
En esta interfaz se dejan todos los valores como vienen y se presiona el botón siguiente
6.- Realizar Comprobación de Reuisitos
En esta interfaz se selecciona el checkbox “Ignorar Todo” y luego se presiona el botón siguiente.
7.- Resumen
Se presenta el resumen de la instalación, en este punto se presiona el botón terminar.
8.- Instalar Producto
En esta interfaz comienza el proceso de instalación del motor de base de datos.Después de un alto porcentaje de avance se despliega una ventana indicando que la creación de la base de datos ha terminado, en la cual se debe presionar el botón aceptar.Luego se regresa al proceso de instalación 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 instalación siga su curso. Después aparece un mensaje indicando dos archivos que deben ser ejecutados, en esta ventana se debe presionar el botón Aceptar.
9.- Terminar
Se despliega un mensaje indicando que la base de datos se instalo correctamente, en esta ventana se debe presionar el botón Cerrar para terminar el proceso de instalación.
Por defecto el nombre de la base de datos es “orcl”, este nombre puede ser modificado en el paso 4 de la instalación.
Después de finalizar la instalación 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 creación de un script de inicio, para lo cual se debe actualizar o crear según corresponda el archivo /etc/init.d/oracledb, como usuario root utilizando tu editor favorito. El archivo debe contener las siguientes líneas.
#!/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/oracleexport ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbname_1export ORACLE_OWNR=oracleexport PATH=$PATH:$ORACLE_HOME/bin
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]thenecho “Oracle startup: cannot start”exit 1fi
case “$1” instart)#Oracle listener and instance startupecho -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/oracleecho “OK”;;stop)#Oracle listener and instance shutdownecho -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/oracleecho “OK”;;reload|restart)$0 stop$0 start;;*)echo “Usage: `basename $0` start|stop|restart|reload”exit 1esac
exit 0##################################################
Después 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 automática, 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 automáticamente al iniciar Ubuntu debe modificar el archivo “/etc/oratab” cambiando la “N” en la línea orcl por “Y”, esta operación 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 conección 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 -d /opt/oracle -s /bin/bash oracle
sudo passwd oracle
sudo chown -R oracle:oinstall /opt/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 will refuse to start.
Not tested on Ubuntu 12.04 but this is now described in 11g documentation.
You have to replace the value of 1001 with the group ID of the oinstall group.
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 soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 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 ORA-00845:
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,--no-
as-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 to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit 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 ………
Miércoles 20 de febrero de 2013
Jueves 21 de febrero de 2013