Translations of this page:
  • en

Menu

This is an old revision of the document!


Installing Core Dependencies

This step installs essential utilities needed for subsequent installations.

sudo apt update && sudo apt upgrade -y
sudo apt install zip unzip software-properties-common wget curl ca-certificates -y

PHP Installation (Specified: PHP 8.4)

The Ondrej Sury PPA is used for installing and managing PHP versions. We will target PHP 8.4 as specified. You can check the available versions and their support status on the official PPA page: ondrej/php PPA

Adding Repository

The PPA must be added to your system's sources list.

sudo add-apt-repository ppa:ondrej/php -y
sudo apt update

Installing PHP and Required Modules

DokuWiki requires specific PHP modules (extensions). The following command installs PHP 8.4 alongside the necessary modules for DokuWiki's functionality (e.g., image manipulation, multi-byte string handling, XML parsing, and internationalization).

sudo apt install -y php8.4 php8.4-fpm php8.4-cli php8.4-gd php8.4-mbstring php8.4-xml php8.4-zip php8.4-intl
Note: We include php-fpm for use with high-performance web servers like Nginx or Apache via mod_fcgid or mod_proxy_fcgi. If you encounter issues, ensure `php8.4` is available in the PPA at the time of installation, as this version may be a development or future release.

MariaDB Server Installation

MariaDB is the recommended drop-in replacement for MySQL.

Installation

sudo apt install mariadb-server -y
sudo systemctl start mariadb
sudo systemctl enable mariadb

Initial Security Setup

Then, secure the installation by running the following script. Execute all steps carefully.

sudo mysql_secure_installation

* 1- Enter current password for root (enter for none):

  • Action: Press ENTER (the root MariaDB user has no password by default after installation).

* 2- Switch to unix_socket authentication [Y/n]:

  • Action: Type n. We will set a password instead.

* 3- Change the root password? [Y/n]:

  • Action: Type Y and set a strong password.
  • RESPONSE:
    1. New password: SET A STRONG PASS
    2. Re-enter new password: RE-ENTER PASS

* 4- Remove anonymous users? [Y/n]:

  • Action: Type Y. Anonymous users are a security risk.

* 5- Disallow root login remotely? [Y/n]:

  • Action: Type Y. Highly Recommended for security unless absolutely required.

* 6 - Remove test database and access to it? [Y/n]:

  • Action: Type Y.

* 7 - Reload privilege tables now? [Y/n]:

  • Action: Type Y. This applies the changes immediately.

MariaDB Service Status

When installed from the default repositories, MariaDB will start running automatically. To test the MariaDB's status, you can run the following command:

sudo systemctl status mariadb

You should see a similar output as following one:

● mariadb.service - MariaDB 10.11.13 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: enabled)
     Active: active (running) since Mon 2025-12-08 09:24:15 CET; 33min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 13685 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 11 (limit: 244840)
     Memory: 78.8M (peak: 85.0M)
        CPU: 640ms
     CGroup: /system.slice/mariadb.service
             └─13685 /usr/sbin/mariadbd

Test the Connectivity

mysql -u root -pTypeThePasswordThatYouSet

If the installation successfully happened, you should see the following message:

user@domain:~$ mysql -u root -pTypeThePasswordThatYouSet
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 38
Server version: 10.11.13-MariaDB-0ubuntu0.24.04.1 Ubuntu 24.04
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]>

You can just type the following command for exit the MySQL console:

MariaDB [(none)]> EXIT;
Edit this page
Back to top