Solved Pre-install commands for RHEL 9 derivatives ( Oracle Linux 9 specifically)?

dachrisat

Verified User
Joined
Jun 7, 2022
Messages
10
I am trying to install DA on a fresh Oracle Linux 9 server. Following the instructions on the pages https://docs.directadmin.com/getting-started/installation/overview.html and https://docs.directadmin.com/getting-started/installation/installguide.html but encountered multiple problems. Some of which are missing dependencies and strange issues like apache2 configure not being able to find systemd.

Initially, I thought it might be due to Oracle Linux 9 not supported but smtalk had replied to my previous thread that it should work.

Despite installing dependencies along the way such as zlib-devel and libnghttp2-devel, disabling "--enable-systemd" in configure.apache2 ( as a temp workaround), I am still encountering issues just building apache2.

I am thinking now perhaps I am missing some prerequisites because in my last DA install many years ago, there were pre-installation commands that had to be executed before DA installation. This is now missing from the pages, does anybody have an up to date list?
 
Last edited:
There are multiple errors, each new one surfacing as I manually fix/workaround the previous, e.g.
Code:
checking for pcre-config... no
configure: error: pcre(2)-config for libpcre not found. PCRE is required and available from http://pcre.org/

*** There was an error while trying to configure Apache 2. Check the /usr/local/directadmin/custombuild/configure/ap2/configure.apache file

Code:
checking for zlib location... not found
checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but can not be built due to prerequisite failures

*** There was an error while trying to configure Apache 2. Check the /usr/local/directadmin/custombuild/configure/ap2/configure.apache file
2025/09/08 22:02:15  info executing task            task=action=notify&message=CustomBuild+installation+has+failed%2C+please+check+the+follow

Code:
checking for pkg-config along /usr/local/lib/pkgconfig:... checking for nghttp2 version >= 1.2.1... FAILED
configure: WARNING: nghttp2 version is too old
no
checking whether to enable mod_http2... configure: error: mod_http2 has been requested but can not be built due to prerequisite failures

*** There was an error while trying to configure Apache 2. Check the /usr/local/directadmin/custombuild/configure/ap2/configure.apache file

Code:
checking whether to enable mod_systemd... checking dependencies
configure: WARNING: Your system does not support systemd.
checking whether to enable mod_systemd... configure: error: mod_systemd has been requested but can not be built due to prerequisite failures

*** There was an error while trying to configure Apache 2. Check the /usr/local/directadmin/custombuild/configure/ap2/configure.apache file

Code:
config.status: executing default commands
configure: summary of build options:

    Server Version: 2.4.65
    Install prefix: /usr/local/apache2
    C compiler:     gcc
    CFLAGS:         -I/usr/local/include
    CPPFLAGS:        -DLINUX -D_REENTRANT -D_GNU_SOURCE
    LDFLAGS:        -L/usr/local/lib
    LIBS:
    C preprocessor: gcc -E

/usr/local/directadmin/custombuild/configure/ap2/configure.apache: line 5: --prefix=/etc/httpd: No such file or directory

*** There was an error while trying to configure Apache 2. Check the /usr/local/directadmin/custombuild/configure/ap2/configure.apache file
 
I tested with a fresh AlmaLinux 9 VM and the installation was able to complete. So it appears there is something specific about an Oracle Linux environment that the setup script is not able to handle despite it being a RHEL derivative.
 
Looking to the scripts used for installation, I noticed that the longer setup.sh in /usr/local/directadmin/scripts appears to do some OS distribution checking and perform different actions.
Code:
        source /etc/os-release

        if [ -z "${VERSION_ID//.*}" ]; then
                # ignore if we cannot detect the version
                return 1
        fi

        declare -A min_supported=(
                [debian]=11
                [ubuntu]=20
                [rhel]=8
                [centos]=8
                [cloudlinux]=8
                [rocky]=8
                [almalinux]=8
        )

On a hunch, I compared the /etc/os-release on Oracle Linux and AlmaLinux and noted there are no strings in the Oracle Linux that would match any of those listed distribution. Whereas in AlmaLinux ID_LIKE="rhel centos fedora" could possibly match rhel and centos.

I modifed the os-release file on Oracle Linux to include rhel centos and ran the DA setup.sh again from start. This time round I was able to get past the Apache2 build issues and seems like on the way to actually complete the installation. It is unclear if the issue is within DA script or the apache2 build script or a combination of other changes I've made to try to fix the problem.
 
Correct way to install the unlisted OS.

Code:
DA_OS_SLUG="rhel8_amd64" bash setup.sh {LICENSE_KEY}
 
DirectAdmin does not officially support Oracle Linux. The problem with Oracle Linux is that it does not report as being RHEL derivative system. If CustomBuild does not detect system as RHEL derivative it will not be able to install any system packages at all. It does not know if to use dnf or apt or what package names to use. If system administrator install all the required system packages then CB will compile the software.

A quick check to see if DA have detected the distro is to check the distro: line in the da ocommand output:

Code:
$ da o
...
distro: rhel9
...

If it says distro: linuxit means DA has no clue what kind of distribution is being used.


You can help DA to detect the system by adjusting the /etc/os-release file. Changing the ID_LIKE="fedora" line into ID_LIKE="rhel fedora"
 
Correct way to install the unlisted OS.

Code:
DA_OS_SLUG="rhel8_amd64" bash setup.sh {LICENSE_KEY}

Unfortunately, this does not work with setup.sh that is downloaded in the first part of the instructions

This script expects the DA_OS_SLUG to be something like linux_amd64.

Code:
DA_OS_SLUG=${DA_OS_SLUG:="linux_${ARCH}"}
DA_PATH=/usr/local/directadmin


case "${1}" in
        --help|help|\?|-\?|h)
                echo ""
                echo "Usage: $0 <license_key>"
                echo ""
                echo "or"
                echo ""
                echo "Usage: DA_CHANNEL=\"alpha\" $0 <license_key>"
                echo ""
                echo "You may use the following environment variables to pre-define the settings:"
                echo "  DA_CHANNEL : Download channel: alpha, current, stable"
                echo "   DA_COMMIT : Exact DA build to install, will use latest from update channel if empty"
                echo "  DA_OS_SLUG : Build targeting specific platform: linux_amd64, linux_arm64, ..."

Trying to use something like rhel8_amd64 will fail with a 40x likely because no such package exists on the DA server.

Code:
Checking for latest build in 'current' release channel...
Downloading 'directadmin_62a3041a32be47aa8d5fa157265f2e9dba3be0fe_rhel8_amd64.tar.gz' package...
curl: (22) The requested URL returned error: 403

################################################################################################## 100.0%
curl: (22) The requested URL returned error: 404
 
We use different OS slugs when we need to have different builds of DA. Right now we always compile only two builds: linux_amd64 and linux_arm64.

A single 64bit Linux binary can work on any supported Linux distribution.

Long time ago we used to have different builds for different Linux distributions. We moved to a single build for all distros in 2023.
 
To conclude after another test installation, for Oracle Linux 9, it appears the following pre-installation tasks are needed
1. Modify /etc/os-release to change ID_LIKE="fedora" to ID_LIKE="rhel fedora"
2. Enable Code Ready Builder Repo, otherwise, setup will fail due to missing libnghttp2-devel
 
Back
Top