Installation: RHEL/RockyLinux/ CentOS

  • Installation instructions for RHEL, RockyLinux, CentOS and alike systems with SELinux in enforcing mode.
    Based on the official installation instructions:
    https://github.com/OpenXE-org/OpenXE/blob/master/SERVER_INSTALL.md
    https://github.com/OpenXE-org/OpenXE/blob/master/INSTALL.md
    Installation instructions for RHEL, RockyLinux, CentOS and alike systems.

    Tested on a RockyLinux 9 VM with SELinux in enforcing mode.


    Based on the official installation instructions:

    - SERVER_INSTALL.md

    - INSTALL.md

    1 Setup


    Add the following lines to /etc/php.ini


    Add remis php imap module

    Code
    cat << 'EOF' > /etc/php.d/50-imap.ini
    extension=/opt/remi/php80/root/usr/lib64/php/modules/imap.so
    EOF


    Install further packages and configure mariadb

    Code
    sudo su -
    dnf install zip wget mod_ssl openssl git
    # mariadb
    dnf install mariadb-server
    systemctl start mariadb
    systemctl enable mariadb
    mysql_secure_installation
    Zitat


    2 SELinux

    2.1 Booleans and user mappings

    2.2 Custom SELinux policy

    1. Create module file with rules

    Code
    sudo su -
    mkdir ~/selinux
    cd ~/selinux
    cat << EOF > openxe.cil
    (allow user_t hugetlbfs_t (file (write)))
    EOF

    2. Load it into the SELinux server with a priority of e.g. 200

    Code
    semodule -X 200 -i openxe.cil
    semodule --list=full | grep openxe
    # If necessary, you can also remove (semodule -r) or temporarily disable (semodule -d) the old module.


    3 Git

    Clone openxe instead downloading zip (enables UI system upgrade)

    Zitat

    https://github.com/OpenXE-org/OpenXE/blob/master/INSTALL.md

    Check if crontab was created: crontab -u apache -l

    Check if SELinux is blocking: ausearch -i -m avc,user_avc,selinux_err,user_selinux_err -ts today | audit2allow


    4 Apache

    Set hostname

    Code
    sudo su -
    vi /etc/hostname

    and add index.php to DirectoryIndex in httpd.conf and allow htaccess overrides in /etc/httpd/conf/httpd.conf


    Reload apache after editing the file

    Code
    systemctl reload httpd


    5 Custom ssl certificates

    Using for example Let's Encrypt wildcard certificates via DNS challenge.

    Code
    sudo su -
    mkdir -p /etc/pki/tls/openxe
    cp /path/to/your-domain.com.fullchain.pem /etc/pki/tls/openxe/your-domain.com.fullchain.pem
    cp /path/to/your-domain.com.key /etc/pki/tls/openxe/your-domain.com.key
    systemctl reload httpd
    restorecon -F -r -vv /


    Backup /etc/httpd/conf.d/ssl.conf and remove the whole default <VirtualHost _default_:443> part

    Add the following as the new default


    6 Firewall

    Code
    sudo su -
    firewall-cmd --list-all
    firewall-cmd --permanent --zone=public --add-port=80/tcp
    firewall-cmd --permanent --zone=public --add-port=443/tcp
    firewall-cmd --reload
    firewall-cmd --list-all


    7 External access

    As ssl was setup on the VM's apache, for controlled "external" access and if you have a reverse proxy, it can be configured using a tcp router and passthrough.

    e.g. Traefik's dynamic conf file could look like the following:



    8 Hints

    For OnlineShop sync, add "Prozessstarter": `artikeluebertragen`

    Zitat

    see xentral docs for other Prozessstarter names.


    9 OpenXE upgrade

    OpenXE UI: System -> Upgrade

Teilen