Install Admidio with LAMP Stack on Rocky Linux 8 to run a private membership portal with Apache, PHP 8.2, and MariaDB. This guide takes about 15–20 minutes on a fresh VPS and finishes with HTTPS and a browser-based setup.
Prerequisites
- Rocky Linux 8.10, updated through the official repositories.
- A fresh VPS with at least 2 GB RAM and 10 GB of available disk space for the application, database, uploads, and backups.
- A root account or a sudo-enabled user connected through SSH.
- A domain such as
YOUR_DOMAINwith an A record pointing to the server; ports 80 and 443 must be reachable. - A VPSLake Linux VPS with a public IPv4 address.
- A unique database password and a separate strong password for the first Admidio administrator.
Admidio 5.0.16 requires PHP 8.2 or newer and supports MariaDB 10.0 or newer. Rocky Linux 8’s AppStream includes PHP 8.2, while its MariaDB package satisfies the database requirement; the current release and requirements are listed on the official Admidio download page.
Step 1: Install Apache, PHP, MariaDB, and firewall tools
Rocky Linux 8 defaults to an older PHP stream, so select PHP 8.2 before installing the web stack and the extensions Admidio uses.
sudo dnf -y update
sudo dnf module reset php -y
sudo dnf module enable php:8.2 -y
sudo dnf install -y httpd mariadb-server php php-cli php-common php-curl php-gd php-intl php-mbstring php-mysqlnd php-opcache php-pdo php-xml php-zip unzip curl policycoreutils-python-utils firewalld mod_ssl
sudo systemctl enable --now firewalld httpd mariadb
sudo firewall-cmd --permanent --zone=public --add-service=ssh
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
The php package supplies Apache’s PHP module on this LAMP setup, so PHP-FPM is not needed. Check that Rocky enabled the intended stream and that both services are running.
php -v
sudo systemctl is-active httpd mariadb
PHP 8.2.x (cli) ...
active
active
The official Rocky Linux PHP documentation also uses the PHP 8.2 AppStream and firewalld service rules for this release.
Step 2: Prepare a local MariaDB database
A separate database account limits Admidio’s access to one schema and keeps MariaDB closed to the public network.
Run the hardening assistant and remove anonymous accounts, remote root access, and the test database when prompted.
sudo mariadb-secure-installation
Create the schema and account. Replace YOUR_DB_PASSWORD before executing the block; use a long password that is not reused anywhere else.
sudo mariadb <<'SQL'
CREATE DATABASE admidio CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'admidio'@'localhost' IDENTIFIED BY 'YOUR_DB_PASSWORD';
GRANT ALL PRIVILEGES ON admidio.* TO 'admidio'@'localhost';
FLUSH PRIVILEGES;
SQL
Do not add a MariaDB rule to firewalld. Apache and MariaDB share this server, so the application can use the local socket or localhost without exposing port 3306.
Step 3: Create the Apache virtual host
The virtual host gives Admidio its own document root and allows the rewrite rules shipped in its .htaccess files.
Replace YOUR_DOMAIN in the following block with the real hostname before running it.
sudo mkdir -p /var/www/admidio
sudo tee /etc/httpd/conf.d/YOUR_DOMAIN.conf > /dev/null <<'APACHE'
<VirtualHost *:80>
ServerName YOUR_DOMAIN
DocumentRoot /var/www/admidio
<Directory /var/www/admidio>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
DirectoryIndex index.php index.html
ErrorLog /var/log/httpd/YOUR_DOMAIN-error.log
CustomLog /var/log/httpd/YOUR_DOMAIN-access.log combined
</VirtualHost>
APACHE
sudo apachectl configtest
sudo systemctl reload httpd
Syntax OK
If DNS has not propagated yet, Apache can still be configured now; the domain must resolve to this VPS before you request a certificate.
Step 4: Download Admidio and apply SELinux-safe permissions
Download the release ZIP from the project’s official distribution path, then keep application code read-only to the web server and make only Admidio’s data directory writable.
cd /tmp
curl -fL -o admidio-5.0.16.zip 'https://sourceforge.net/projects/admidio/files/Admidio/5.0.x/admidio-5.0.16.zip/download'
rm -rf /tmp/admidio-unpack
mkdir /tmp/admidio-unpack
unzip -q admidio-5.0.16.zip -d /tmp/admidio-unpack
src=$(find /tmp/admidio-unpack -mindepth 1 -maxdepth 2 -type f -name index.php -print -quit)
test -n "$src"
sudo cp -a "$(dirname "$src")"/. /var/www/admidio/
Admidio writes its configuration, uploads, and generated files under adm_my_files. The persistent file-context rules below let Apache read the code while allowing writes only in that directory.
sudo chown -R root:apache /var/www/admidio
sudo find /var/www/admidio -type d -exec chmod 0755 {} \;
sudo find /var/www/admidio -type f -exec chmod 0644 {} \;
sudo chown -R apache:apache /var/www/admidio/adm_my_files
sudo find /var/www/admidio/adm_my_files -type d -exec chmod 0750 {} \;
sudo find /var/www/admidio/adm_my_files -type f -exec chmod 0640 {} \;
sudo semanage fcontext -a -t httpd_sys_content_t '/var/www/admidio(/.*)?'
sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/admidio/adm_my_files(/.*)?'
sudo restorecon -Rv /var/www/admidio
sudo apachectl configtest
sudo systemctl reload httpd
The final Apache check should again show Syntax OK. Unlike a broad writable web root, these modes preserve SELinux enforcement and reduce the damage a compromised PHP file could cause.
Step 5: Run the Admidio browser installer
The web wizard checks the PHP environment, creates Admidio’s tables, and writes its configuration using the database account from Step 2.
Open http://YOUR_DOMAIN/ in a browser. Select a language, then enter the following database values:
- Database type: MariaDB or MySQL
- Database host:
localhost - Database name:
admidio - Database user:
admidio - Database password: the value used for
YOUR_DB_PASSWORD - Database port: the default value
Continue with the organization name, sender email address, and a new administrator account. When the wizard reaches its completion page, sign in once and remove the downloaded archive.
rm -f /tmp/admidio-5.0.16.zip
If the installer reports that adm_my_files is not writable, stop and fix the ownership and SELinux labels from Step 4 before continuing.
Step 6: Enable HTTPS with Let’s Encrypt
The portal can contain names, email addresses, and other member information, so switch the working HTTP site to HTTPS after the domain resolves correctly.
Install Certbot from EPEL and let its Apache plugin create the certificate and redirect.
sudo dnf install -y epel-release
sudo dnf install -y certbot python3-certbot-apache
sudo certbot --apache --redirect --agree-tos --no-eff-email -m ADMIN_EMAIL -d YOUR_DOMAIN
Replace ADMIN_EMAIL and YOUR_DOMAIN with real values. Port 80 must remain reachable while Let’s Encrypt validates the domain.
Test the renewal process without replacing the live certificate.
sudo certbot renew --dry-run
Congratulations, all simulated renewals succeeded
Verify the installation
These checks confirm that PHP has the important extensions, MariaDB contains the application database, the services are active, and Apache answers over TLS.
php -m | grep -E 'curl|gd|intl|mbstring|PDO|pdo_mysql|SimpleXML|zip'
sudo mariadb -e "SHOW DATABASES LIKE 'admidio';"
sudo systemctl is-active httpd mariadb
curl -I https://YOUR_DOMAIN/
curl
gd
intl
mbstring
PDO
pdo_mysql
SimpleXML
zip
admidio
active
active
HTTP/1.1 200 OK
Troubleshooting
No matching module streams for php:8.2
The package metadata is stale, or the server is not using the Rocky Linux 8 AppStream repository. Confirm the release and refresh DNF before selecting the stream again.
cat /etc/rocky-release
sudo dnf clean all
sudo dnf makecache
sudo dnf module list php
sudo dnf module enable php:8.2 -y
Apache returns 403 Forbidden
Check that the request uses YOUR_DOMAIN, the virtual host points to /var/www/admidio, and SELinux has the expected labels. Reapply the persistent contexts instead of disabling SELinux.
sudo apachectl -S
sudo restorecon -Rv /var/www/admidio
ls -Zd /var/www/admidio /var/www/admidio/adm_my_files
sudo ausearch -m AVC -ts recent
The application directory should have httpd_sys_content_t, while adm_my_files should have httpd_sys_rw_content_t.
The installer says could not find driver
PHP is running, but the MariaDB PDO driver is absent from the active stream. Install the missing extensions and reload Apache so its PHP module sees them.
sudo dnf install -y php-mysqlnd php-xml php-zip php-gd php-curl php-intl php-mbstring
sudo systemctl restart httpd
php -m | grep -E 'PDO|pdo_mysql|SimpleXML|zip'
Access denied for user 'admidio'@'localhost'
The password entered in the browser does not match the MariaDB account, or the account was created for a different host. Reset it locally and enter the new value in the installer.
sudo mariadb <<'SQL'
ALTER USER 'admidio'@'localhost' IDENTIFIED BY 'NEW_DB_PASSWORD';
FLUSH PRIVILEGES;
SQL
Replace NEW_DB_PASSWORD before running the command and do not put the new password in a public ticket or shell history.
Hardening
- Keep Rocky Linux and Admidio updated, and back up both the
admidiodatabase and/var/www/admidio/adm_my_filesbefore upgrades. - Leave only SSH, HTTP, and HTTPS enabled in
firewalld; do not expose MariaDB to the internet. - Use a different password for the Admidio administrator, database user, and VPS account, then enable available account protections in Admidio.
- Review the per-site Apache logs in
/var/log/httpd/when investigating failed requests or repeated login attempts.
FAQ
Is Rocky Linux 8 compatible with the current Admidio release?
Yes. The current Admidio release needs PHP 8.2 or newer, and Rocky Linux 8 provides PHP 8.2 through AppStream. Updating Rocky first is important because an untouched installation may still select the older PHP 7.2 stream.
Does Admidio need PHP-FPM on Apache?
No. This guide uses Apache’s PHP module from the Rocky package set, which is sufficient for a single-site LAMP installation. PHP-FPM is useful for a different Apache or Nginx design, but adding it here would create an unnecessary second PHP path to maintain.
Can I install Admidio using the VPS IP instead of a domain?
You can use the IP for an initial HTTP test, but a domain is the practical production choice. Let’s Encrypt normally validates a hostname, and the certificate command in this guide expects a DNS record pointing to the VPS.
What should I back up after installation?
Back up the MariaDB admidio schema and the complete /var/www/admidio/adm_my_files directory. The data directory contains the generated configuration and member uploads, while the database contains the organization and account records.