Oracle Linux

It is always worth looking around for the latest info and updates, for example VirtualBox guest addition RPMs for Oracle Linux UEK4 kernel! | Oracle Simon Coter Blog explains how you can now install the Guest Additions via RPM which is much easier than before.

The summary instructions for installing Oracle Linux 7.2 in VirtualBox are as follows:

  • Download Oracle 7.2 ISO
  • Install in VirtualBox
  • Start terminal
  • su -
  • yum install kernel-devel kernel-uek-devel (this grabs gcc as a dependency)
  • reboot
  • Install the VirtualBox Guest Additions
  • Execute the following (as root): usermod -a -G vboxsf <username>
However, chances are you did this because you want to install Oracle Database, so, after the above, do the following:
  • Download Oracle Express Edition from Oracle Database Express Edition Downloads
  • Extract the zip files as follows: unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
  • Switch user to root
  • Then change into the "Disk1" directory
  • Install the rpm file: rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
  • As prompted by the installer execute the following: /etc/init.d/oracle-xe configure
  • It is recommended you accept the defaults but specify a strong password
  • Switch back to your user
  • add "/u01/app/oracle/product/11.2.0/xe/bin" to the path in your .bash_profile
  • Once complete launch "Get Started With Oracle Express Edition" from the Linux Desktop
Alternatively you might need to install a full version of Oracle 11g Release 2 for example, rather than XE, so here are some notes:
  • Download Oracle Enterprise Edition from Oracle Database Software Downloads | Oracle Technology Network | Oracle, assuming you are licensed to do so
  • Login as root to do the following
  • Execute: groupadd -g 500 osdba
  • Execute: groupadd -g 501 osoper
  • Execute: groupadd -g 502 oinstall
  • Change back to your normal user
  • Extract both downloaded archives to the same directory
  • Change into the database directory and execute "runInstaller"
  • I had some user interface issues where windows display too small, hence I did a product only install
  • Locate and run "netca" to configure a listener
  • Start the listener as follows: lsnrctl start LISTENER
  • Also configure local name resolution with "netca"
  • Execute "dbca" to create a new database, the user interface gives all the options you need
  • You can use Enterprise Manager, assuming you selected it via http://localhost:1158/em
Personally I like using Oracle's SQL Developer, so do the following:
  • Download SQL Developer from Oracle SQL Developer Downloads
  • Switch user to root
  • Install a Java JDK: yum install java-1.8.0-openjdk-devel.x86_64
  • Find the Java Home directory: ls -l /etc/alternatives/javac
  • Execute the following: rpm -ivh sqldeveloper-4.1.3.20.78-1.noarch.rpm
  • Start SQL Developer via a terminal, it will prompt for the JDK's Home directory: sqldeveloper