Instalación del servidor oracle xe (express edition) 11g en ubuntu Sacado de https://www.programmersought.com/article/404491792/, con alguna adaptación 1. execute the following command, install alien, used to convert rpm to deb [En vez de vim, que es lo que aparece en la página, he utilizado nano, que es un editor más sencillo] sudo apt-get install alien libaio1 unixodbc nano 2. Download Oracle 11g express edition installation file from Oracle official website http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html [Conectarse a la web de oracle, buscar la versión xe 11g, descargarlo y descomprimirlo. Para versiones posteriores no sé si funcionará.] 3. convert the rpm installation file to a deb file [este es el nombre que debería tener el fichero descargado en su versión xe 11g. Lo convertimos a un fichero deb usando alien] sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm 4. preparation work 4.1. Create a chkconfig script file sudo nano /sbin/chkconfig [Editamos el fichero con nano y pegamos al final el siguiente código. Salir con control-x] #!/bin/bash file=/etc/init.d/oracle-xe if [[ ! `tail -n1 $file | grep INIT` ]]; then echo >> $file echo '### BEGIN INIT INFO' >> $file echo '# Provides: OracleXE' >> $file echo '# Required-Start: $remote_fs $syslog' >> $file echo '# Required-Stop: $remote_fs $syslog' >> $file echo '# Default-Start: 2 3 4 5' >> $file echo '# Default-Stop: 0 1 6' >> $file echo '# Short-Description: Oracle 11g Express Edition' >> $file echo '### END INIT INFO' >> $file fi update-rc.d oracle-xe defaults 80 01 4.2. Save the above file and modify the permissions sudo chmod 755 /sbin/chkconfig 4.3. Execute the following commands free -m sudo ln -s /usr/bin/awk /bin/awk mkdir /var/lock/subsys touch /var/lock/subsys/listener 5. Execute the following command to prevent an error during Oracle installation. (Ignore the error during execution) sudo -s umount /dev/shm sudo rm -rf /dev/shm sudo mkdir /dev/shm mount --move /run/shm /dev/shm sudo mount -t tmpfs shmfs -o size=2048m /dev/shm 5.1 Create the following file sudo nano /etc/rc2.d/S01shm_load 5.2 Copy the following to the new file above [Igual que antes, editamos el fichero y copiamos esto al final, salir con control x] #!/bin/sh case "$1" in start) mkdir /var/lock/subsys 2>/dev/null touch /var/lock/subsys/listener rm /dev/shm 2>/dev/null mkdir /dev/shm 2>/dev/null mount -t tmpfs shmfs -o size=2048m /dev/shm ;; *) echo error exit 1 ;; esac 5.3 Execute the following command sudo chmod 755 /etc/rc2.d/S01shm_load 6. restart the computer 7. install Oracle 11gR2 XE 7.1 Enter the directory where the Oracle 11gR2 XE installation file is located. 7.2 Run the installation package [puede que el fichero no se llame así, comprobar el nombre] sudo dpkg --install oracle-xe-11.2.0-1.0.x86_64.deb 7.3 Running the configuration program sudo /etc/init.d/oracle-xe configure Enter the following configuration information: - Valid HTTP port for the Oracle Application Express (the default is 8080, use 7070) - Valid port for the Oracle database listener (the default is 1521) - Password for the SYS and SYSTEM administrative user accounts - Confirm password for SYS and SYSTEM administrative user accounts - Whether you want the database to start automatically when the computer starts, Y [ahora tardará un ratito continuando con la instalación] 8. Oracle 11gR2 XE necessary configuration before use Environment variable configuration 8.1 Enter user directory cd ~ 8.2 Edit bashrc file nano .bashrc 8.3 Add the following to the end of the .bashrc file [igual que antes] export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe export ORACLE_SID=XE export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh` export ORACLE_BASE=/u01/app/oracle export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export PATH=$ORACLE_HOME/bin:$PATH 8.4 Execute the following command, the current bash environment variable takes effect. [a mí no me ha funcionado] ./.profile [he hecho esto]: . ~/.profile 8.5 Edit the configuration file under the root user to copy the same content to the end of the file. sudo nano /root/.bashrc [de nuevo copiamos el trozo de código anterior, esta vez en el el fichero de root] export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe export ORACLE_SID=XE export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh` export ORACLE_BASE=/u01/app/oracle export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export PATH=$ORACLE_HOME/bin:$PATH 9. restart the computer, Oracle should run normally 10. Run the following command to enter the SQL prompt window. [la contraseña es la que hemos puesto en la instalación] sqlplus sys as sysdba