How to Install phpBB on AlmaLinux

In this tutorial, we are going to explain in step-by-step detail how to install phpBB on AlmaLinux.

phpBB is an open-source forum written in PHP, used for creating topics, forums and etc. The name “phpBB” is an abbreviation of the PHP Bulletin Board. A wide community of people uses it to stay in touch with each other. phpBB offers hundreds of style and image packages for customizing the board that users can create in a couple of minutes. In this installation, we will use the LAMP stack.

Installing phpBB on AlmaLinux with the LAMP stack is a straightforward process and may take up to 20 minutes. Let’s get things done!


  • A server with AlmaLinux as OS and a Minimum of 4GB of RAM
  • Valid domain pointed to the servers IP address
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we start with the installation process, we need to update the system packages to the latest version available.

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install Apache

To install the Apache Web server execute the following command:

sudo dnf install httpd -y

Once installed, start and enable the service.

sudo systemctl enable httpd && sudo systemctl start httpd

Check if the service is up and running:

sudo systemctl status httpd

You should receive the following output:

[root@host ~]# sudo systemctl status httpd
● httpd.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
     Active: active (running) since Fri 2022-11-25 09:53:20 CST; 1h 47min ago
       Docs: man:httpd.service(8)
   Main PID: 557 (httpd)
     Status: "Total requests: 26; Idle/Busy workers 100/0;Requests/sec: 0.00405; Bytes served/sec:   8 B/sec"
      Tasks: 213 (limit: 24796)
     Memory: 40.1M
        CPU: 5.438s
     CGroup: /system.slice/httpd.service
             ├─557 /usr/sbin/httpd -DFOREGROUND
             ├─580 /usr/sbin/httpd -DFOREGROUND
             ├─581 /usr/sbin/httpd -DFOREGROUND
             ├─583 /usr/sbin/httpd -DFOREGROUND
             └─584 /usr/sbin/httpd -DFOREGROUND

Nov 25 09:53:20 host.test.vps systemd[1]: Starting The Apache HTTP Server...

Step 3. Install PHP8.0 with extensions

PHP must be installed on the server since phpBB is written in PHP. The repository for PHP8.0 is by default added to the latest AlmaLinux 9 OS distribution. We need to execute the following line of commands:

sudo dnf install php php-cli php-fpm php-curl php-mysqlnd php-gd php-opcache php-zip php-intl php-common php-bcmath php-json php-readline php-mbstring php-apcu php-xml php-dom -y

Once installed, check the installed PHP version by executing the php -v on your command line.

[root@host ~]# php -v
PHP 8.0.20 (cli) (built: Jun  8 2022 00:33:06) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.20, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.20, Copyright (c), by Zend Technologies

Step 4. Install MySQL database server

To install the MySQL database server, execute the following commands:

sudo dnf install mysql-server mysql

Start and enable the mysqld.service with the following commands:

sudo systemctl start mysqld && sudo systemctl enable mysqld

Check the status of the mysqld.service

sudo systemctl status mysqld

You should receive the following output:

● mysqld.service - MySQL 8.0 database server
     Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
     Active: active (running) since Fri 2022-11-25 11:52:59 CST; 1s ago
   Main PID: 2413 (mysqld)
     Status: "Server is operational"
      Tasks: 39 (limit: 24796)
     Memory: 456.3M
        CPU: 10.248s
     CGroup: /system.slice/mysqld.service
             └─2413 /usr/libexec/mysqld --basedir=/usr

Nov 25 11:52:44 host.test.vps systemd[1]: Starting MySQL 8.0 database server...
Nov 25 11:52:45 host.test.vps mysql-prepare-db-dir[2331]: Initializing MySQL database
Nov 25 11:52:59 host.test.vps systemd[1]: Started MySQL 8.0 database server.

Step 5. Create MySQL database and user

Log in to the MySQL command line and execute the following commands:

CREATE USER 'phpbb'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
GRANT ALL PRIVILEGES ON phpbb.* TO 'phpbb'@'localhost';

Step 6. Download phpBB forum

To download the latest phpBB version execute the following command:

cd /var/www/html/


unzip -d /var/www/html/


mv phpBB3/ phpbb/

Once downloaded, extracted, and renamed, set the right permissions.

chown -R apache:apache /var/www/html/phpbb

Step 7. Create Apache Virtual Host File

We need to create Apache virtual host configuration file in order can access the phpBB via the domain name:

sudo nano /etc/httpd/conf.d/phpbb.conf

Paste the following lines of code:

<VirtualHost *:80>
     DocumentRoot /var/www/html/phpbb
     <Directory /var/www/html/phpbb>
          Options FollowSymlinks
          AllowOverride All
          Require all granted

     ErrorLog /var/log/httpd/yourdomain.com_error.log
     CustomLog /var/log/httpd/ combined

Save the file, close it check the syntax of the Apache configuration file.

httpd -t

You should get this output:

[root@host project]# httpd -t
Syntax OK

Restart the httpd. service.

sudo systemctl restart httpd

Now you can access the phpBB at

Step 8. Finish the phpBB installation

To finish the phpBB installation, click on the Install button as described in the picture:

Enter your administrator username, email, and strong password in the next window.

Next, is to enter the database, database user, and password that you created before in step 5

On the next window, enter your domain:

On the next two windows, just click on the Submit and do not make any changes:

The installation of the phpBB will start:

After successful installation, you will get the following screen:

Click on the Take me to the ACP, link, and you will be redirected to the phpBB admin dashboard.

We hope that today’s guide has made it easier for you to install phpBB on AlmaLinux.

Now, we’d like to hear your feedback.

Do you feel like we’ve missed something or is there a part of the process that you’d like us to elaborate on? Are there other subjects or tutorials you’re interested in that we should feature?

Don’t hesitate to let us know your thoughts in the comments section below.

Leave a Comment