Oracle Enterprise Linux, aka Oracle Linux, is a RedHat Enterprise Linux work-alike based on RPM packages, that varies a bit from APT package based Linuxes like Ubuntu and Debian.
While they’re both Linuxes, they differ in a bunch of significant ways. This article will collect list these differences briefly, so you can use your Debian/Ubuntu knowledge to learn OEL/RHEL/CentOS/Fedora.
Installation
Debian comes in two flavors: Small and Full. Ubuntu comes in four flavors: Desktop, Server, IoT (embedded ARM), and Cloud.
Oracle Enterprise Linux, now known as Oracle Linux, is available mainly as a server, without a GUI. It used to be all purpose, but now, it leans server. The installer is 8GB, but there’s a much smaller minimal installer. Downloads at Oracle.
Oracle offers two kernel options, UEK and RHCK. UEK is supposed to be smaller and tested more.
The installer is a series of dialog boxes with a GUI. It’s not hard, but the UI is not linear, so you should plan to do a few installs to get the hang of it.
If you are using the minimal installer, you will need to specify the repository to get the Base OS. The URL is:
http://yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/x86_64/
Networking
Debian uses a mixture of Debian-style config files that use ifup and ifdown, along with NetworkManager. OEL uses NetworkManager, mainly.
So on Debian, when you set up a server, I tend to use the config files to configure the Ethernet cards. On OEL, you edit files that are used to configure NetworkManager, or use the nmcli
command, or nmtui
tool.
On Debian, I use ufw
to operate the firewall. The underlying system is still IPTABLES, but UFW presents a much simpler interface.
On Oracle Linux, we use the firewalld
command firewall-cmd
.
Set the Timezone
My installation had the timezone set to EDT. Change it with:
tzselect
Package Management
Debian uses apt
. Apt uses the underlying program dpkg
, which installs .pkg files.
OEL is a RedHat/Fedora variant, and uses .rpm files. The commands used are dnf
, which is the new version of yum
, which is a higher-level form of rpm
, which installs .rpm files.
The commands are similar, almost identical:
dnf help dnf install <packagename> dnf search <string> dnf info <packagename> dnf clean all dnf autoremove dnf upgrade dnf update dnf list --installed | less In APT, these are: apt help apt install <packagename> apt search <string> apt info <packagename> apt autoclean apt autoremove apt upgrade apt update apt list --installed | less
Where the two systems differ a lot are how the repositories are managed. With Ubuntu, you use files in /etc/apt/sources.list.d/, or add lines to sources.list. The process is partly automated by using the command add-apt-repository
and supply a PPA url. Example:
add-apt-repository ppa:ondrej/php
With OEL, you put files in /etc/yum.repos.d/. This is automated by a dnf plugin config-manager:
dnf config-manager --add-repo <URL>
After performing an installation, the first URL to add is the AppStream:
dnf config-manager --add-repo http://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/
The appstream contains a lot of common software.
If you get this error during an install:
RPM: error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
RPM: error: cannot open Packages index using db5 - (-30969)
RPM: error: cannot open Packages database in /var/lib/rpm
Do this:
rpm --rebuilddb
rpm --initdb
Docker
You need to install from the Docker repos, because the included docker packages are an emulation of the Docker CLI, using no docker daemon.
Follow the instructions Install Docker Engine on CentOS at Docker.
Python
The default install of Python is Python 3.6, which is fine.
dnf install python dnf install python-pip
PHP
You should install PHP like this:
dnf install php
That installs PHP 7.2. Then go to Get Composer and get a copy of composer directly.
Node JS
dnf install nodejs
That installs node and npm.
GCC
dnf install gcc-toolset-10