Is Oracle Linux a viable alternative to CentOS

By now you are all aware of the RedHat/IBM decision to destroy CentOS as a viable stable platform. Oracle has been suggested on many Forums as an alternative.

While some responses on forums indicate a belief that Oracle Linux is based on CentOS and therefore would also be unstable in the future the Oracle blogs themselves indicate their builds are from the RedHat sources not CentOS, and generally they release updates to RHEL faster than done previously by CentOS.

Oracle themselves are aware they have been touted as an option, and have even published a script that can be used to convert a running CentOS system to a Oracle system, for CentOS8 to Oracle Linux 8 that script is located at https://github.com/oracle/centos2ol. DO NOT USE THAt SCRIPT, see update notes at end of this post.

The key thing is the script is for CentOS systems already running, what about deploying Oracle Linux 8 from scratch then. The main issues I have are

  • the install DVD media is 8.6Gb, double the size of CentOS
  • desktop installs require accepting a license agreement, hands off install may be difficult
  • oracle logos are all over the place
  • there is no ‘epel-release’ package, you must instead ‘dnf install oracle-epel-release-el8’, that is not obvious but obviously must be installed to obtain most of the packages everyone needs such as nrpe or even utilities like iftop
  • where I refer to a ‘desktop’ install in this post it is the default install software selection of ‘server with gui’; as in a bit of a rush as I was only installing to test for this post I did not change the default to ‘Workstation’
  • there appear to be no publically available Oracle Linux cloud images (see below paragraph)

Many CentOS users would deploy to an in-house cloud, normally OpenStack. Images that will work under OpenStack are listed at https://docs.openstack.org/image-guide/obtain-images.html and Oracle Linux is not one of them. The CentOS stable images before Redhat moved CentOS to “stream” are there. Also listed are RHEL ones but a Redhat Enterprise license subscription is needed to download those. So the options now are Debian, Fedora, Ubuntu, SUSE or unoffical images for BSD based servers.
Oracle Linux images seem to be only provided for “Oracle cloud” and not publicly available for those running OpenStack. A google search finds lots of examples on how to run OpenStack on Oracle Linux servers, nothing on how to run Oracle Linux under OpenStack. Sorry Oracle, most corporations have OpenStack as internally hosted ‘lab’ cloud systems, no AWS/Google/Azure/Oracle interfaces in a ‘lab’ environment.

However I have checked and ‘cloud-init’ is a package available with Oracle Linux so it should be simple to create your own custom images. Or if you don’t want the effort launch a CentOS8 instance, use the Oracle provided script to convert it to OL8, remove all the files indicating cloud-init has already run, shutdown and snapshot to use as a new cloud image.

For desktop users it should be noted that neither of the addtional required steps for CentOS8 or RHEL8 (enabling powertools or codeready-builder) recommended to be issued as part of enabling the rpmfusion repositories work on Oracle Linux 8. However even without those the repositories seem to work (at least I was able to install vlc) although not being able to complete all the setup steps for the repository may result in issues later on. Obviously rpmfusion is a repository that must be accessable to use the system as a ‘desktop’. Setup instructions for that are still at https://rpmfusion.org/Configuration.
Update:26Dec2020: the OL equivalent to powertools is ol8_codeready_builder

Podman and Docker

For developers podman and buildah are installed by default on a desktop install (and server installs with ‘container management tools’ selected), and if you prefer docker Oracle have an article on installing docker on OL8 at https://oracle-base.com/articles/linux/docker-install-docker-on-oracle-linux-ol8which does not work without an additional flag as OL8 packages installed for podman are incompatible with the docker ones. You must allow existing packages to be removed, using the –allowerasing option to install docker works and shows

===========================================================================================================
 Package                    Arch    Version                                       Repository          Size
===========================================================================================================
Installing:
 docker-ce                  x86_64  3:20.10.1-3.el8                               docker-ce-stable    27 M
Installing dependencies:
 containerd.io              x86_64  1.4.3-3.1.el8                                 docker-ce-stable    33 M
     replacing  runc.x86_64 1.0.0-68.rc92.module+el8.3.0+7866+f387f528
 docker-ce-cli              x86_64  1:20.10.1-3.el8                               docker-ce-stable    33 MCentOS-8-x86_64-1905-dvd1.iso
 docker-ce-rootless-extras  x86_64  20.10.1-3.el8                                 docker-ce-stable   9.1 M
 libcgroup                  x86_64  0.41-19.el8                                   ol8_baseos_latest   70 k
Removing dependent packages:
 buildah                    x86_64  1.15.1-2.0.1.module+el8.3.0+7866+f387f528     @AppStream          28 M
 cockpit-podman             noarch  18.1-2.module+el8.3.0+7866+f387f528           @AppStream         4.9 M
 podman                     x86_64  2.0.5-5.0.1.module+el8.3.0+7866+f387f528      @AppStream          51 M
 podman-catatonit           x86_64  2.0.5-5.0.1.module+el8.3.0+7866+f387f528      @AppStream         752 k

Transaction Summary

So while most developers will be using podman on their desktops servers would normally run docker (in prod as a docker swarm) or kubernetes as the container environments. However the –allowerasing option does install a working docker so you can use either.

I would have added a comment to the article highlighting that requirement but going to the article comments page results in the error “Prepared Statement Error: Table ‘./oraclebasecms/cms_page_comment_uuids’ is marked as crashed and should be repaired “; I would hope the Oracle Linux development teams do a better job that the website database teams. But the steps are

dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf install -y docker-ce --nobest --allowerasing

I have tried an image built on Fedora33 with podman that runs happily under docker on centOS8, and yes testing shows it also runs happily on Oracle Linux 8 with the UEK kernel.

Puppet

Puppet agent also installs perfectly well with

rpm -Uvh https://yum.puppet.com/puppet7-release-el-8.noarch.rpm
dnf search puppet-agent
dnf install puppet-agent

Minimal changes were needed to puppet rules on my configuration server as I already had a lot of ‘exceptions’ coded for packages missing in CentOS8 so was just a case of changing all rules that refered to centos from … $facts[‘os’][‘name’] == “CentOS” and $facts[os][release][major] == “8” … to … ($facts[‘os’][‘name’] == “CentOS” or $facts[‘os’][‘name’] == “OracleLinux”) and $facts[os][release][major] == “8” …; up until this point I do not have enough mixed server OSs to use case statements like I should :-)

Once I had sorted out the new name Oracle uses for the ‘epel-release’ starting the puppet agent installed and configured all the applications and tools I use on a CentOS8 server without issue on the Oracle Linux server.

I have not tried puppetserver, just the agent. testing puppetserver will be a migration from C8 to OL8 on that machine and will probably be the last converted.

Other tools

Testing puppet also installed a lot of other tools such as the bacula-client, nrpe etc. which all seemed to start correctly.

I like to ssh into remote servers with X-11 forwarding on to run GUI apps. To allow that from a OL8 server install, “dnf -y install gdm”. It is enabled after install by default but to start it without rebooting “systemctl start gdm”. Annoyingly that makes the console GUI so also “dnf -y install gnome-terminal xterm” to get any work done… after rebooting the console behaves and remains in tty mode while gdm runs and allows remote users sshing in to run gui apps.

What I have not tested – disclaimer

As noted tools like bacula-client install and start correctly; however I do not have the storage available to actually test a backup works. Similarly with other applications I do not want activity generated from the OL8 test systems I have been throwing up and tearing down.

Just because an application starts does not mean it will work. But it seems promising.

Summary

A basic summary is that OracleLinux does seem to be able to replace CentOS from a fresh install point of view, everything seems to be there. Do not use the conversion scriot, see updates below.

Next steps

My next post is likely to be on running the conversion script created by Oracle on a C8 test system I fire up. They recommend disabling all non-core repositories and I have quite a few such as docker and puppet; so that will be interesting. I will try on a fresh C8 install, then a really complicated KVM instance, and see what happens. If it turns into a mess I will certainly post on it (assuming the mess is not on this webserver of course… backup time).

Update 2020/12/25 20:21: do not use the oracle provided conversion script. I created a test CentOS8 KVM instance from install media CentOS-8-x86_64-1905-dvd1.iso using a standard server install, no third party repositories were used. A git clone of the conversion script project (following the download script only links results in the webpage being saved rather than the script so you have to clone or download the git project) and running the script results in the test system rebooting into emergency mode; the test system is unusable. That script is truely a BETA. The error on boot is “Failed to switch root: Specified switch root path ‘/sysroot’ does not seem to be an OS tree. os-release file is missing.” and there will be a follow up post on my investigations into that.

So the summary update is, if you are willing to install from scratch and migrate applications Oracle Linux is an option for replacing CentOS servers; but despite posts made by Oracle on it being easy to convert a CentOS system to Oracle Linux it is not yet safe to attempt to do so. VM replacement rather than conversion is the only safe option… buit then if you are switching to Ubunto, Debian or SUSE you will be following the replacement rather than conversion path anyway.

About mark

At work, been working on Tandems for around 30yrs (programming + sysadmin), plus AIX and Solaris sysadmin also thrown in during the last 20yrs; also about 5yrs on MVS (mainly operations and automation but also smp/e work). At home I have been using linux for decades. Programming background is commercially in TAL/COBOL/SCOBOL/C(Tandem); 370 assembler(MVS); C, perl and shell scripting in *nix; and Microsoft Macro Assembler(windows).
This entry was posted in Unix. Bookmark the permalink.