Está en la página 1de 4

Instalacion de oracle 11g r2 en ubuntu comando total paquetes 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 lsb-rpm libstdc++5 comando total link de las carpetas y las compiladores. 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_nonshared.a /usr/lib/libpthread_nonshared.a ln -s /usr/lib/i386-linux-gnu/libc_nonshared.a /usr/lib/libc_nonshared.a ln -s /lib/i386-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1 ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so.6 creacion de grupo, carpetas y de asigancion de recursos a usuario oracle comando total. addgroup oinstall addgroup dba addgroup nobody usermod -g nobody nobody useradd -g oinstall -G dba -p oracle -d /home/oracle -s /bin/bash oracle mkdir /home/oracle chown -R oracle:dba /home/oracle 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 mkdir -p /u01/app/oracle chown -R oracle:dba /u01 copiamos la database a /home/oracle/ modificamos el archivo /etc/sysctl.conf con el siguiente contenido. 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 modificamos el archivo /etc/security/limits.conf

oracle soft nproc 2047 oracle hard nproc 16384 oracle hard nofile 65536 oracle soft nofile 1024 modificamos el siguiente archivo /etc/pam.d/login session required /lib/security/pam_limits.so actualizamos los cambios con sysctl -p cambiamos y asignamos display en la consola. init 3 DISPLAY=:0; export DISPLAY; xhost +; damos contrasea al usuario oracle passwd oracle nos logeamos como oracle con su - oracle DISPLAY=:0 ; export DISPLAY xclock si todo esta bien los comando puestos deberian devolver una pequea ventana con un reloj, el cual cerramos con la tecla control y c procedmos a entrar a cd /home/oracle/database chmod -R 777 database ./runInstaller -ignoreSysPrereqs ahora seguimos la instalacin normal. 1. Configure Security Updates: You want to get security updates you can register with your mail id or else ignore it. 2. Installation option: select "Create and configure a database" 3. System Class: select "Desktop Class" 4. Typical Installation: Update your Administrative password. 5. Pre-requisite Checks: Select "Ignore All" and press next.

and now onwards go with defaults. Till it creates the database Note: If you want SCOT user, at the password management option activate the user SCOT. By default at the end of the installation you will get the database named "orcl". After Installation completes lets do some cross checkings & little config changes: As a root run the following commands: bash /u01/app/oraInventory/orainstRoot.sh bash /u01/app/oracle/product/11.2.0/dbhome_1/root.sh ahora realizamos un script para que la base pueda iniciar sin problemas /etc/init.d/oracledb. Bash total. #!/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/dbhome_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 ##################################################### Run following commands as a root. chmod a+x /etc/init.d/oracledb update-rc.d oracledb defaults 99 Testing: connect to the user oracle from root: su - oracle Run the following commands to connect to the sqlplus as an oracle user. . oraenv ORACLE_SID = [oracle] ? orcl //output, give the orcl at the '?' sqlplus '/as sysdba' Now you will be having the sql prompt. To make the Oracle start at the system boot: in /etc/oratab change the 'N' on orcl line to Y as follows; orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y

También podría gustarte