How to Install phpBB on AlmaLinux

/ Category: Linux, Tutorials / Comments: None

install phpbb on almalinux
Spread the love

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!

Prerequisites

  • 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:

[[email protected] ~]# 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.

[[email protected] ~]# 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 DATABASE phpbb;
CREATE USER 'phpbb'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
GRANT ALL PRIVILEGES ON phpbb.* TO 'phpbb'@'localhost';
FLUSH PRIVILEGES;
exit;

Step 6. Download phpBB forum

To download the latest phpBB version execute the following command:

cd /var/www/html/

wget https://download.phpbb.com/pub/release/3.3/3.3.8/phpBB-3.3.8.zip

unzip phpBB-3.3.8.zip -d /var/www/html/

rm phpBB-3.3.8.zip

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>
     ServerName yourdomain.com
     DocumentRoot /var/www/html/phpbb
     <Directory /var/www/html/phpbb>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog /var/log/httpd/yourdomain.com_error.log
     CustomLog /var/log/httpd/yourdomain.com.log combined
</VirtualHost>

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

httpd -t

You should get this output:

[[email protected] project]# httpd -t
Syntax OK

Restart the httpd. service.

sudo systemctl restart httpd

Now you can access the phpBB at http://yourdomain.com

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.

Congratulations! You successfully installed the phpBB forum on AlmaLinux OS. If you are not able to do such an installation feel free to contact our technical support, and they will do the rest. All you have to do is to sign up for one of our NVMe VPS plans and submit a support ticket. We are avalable 24/7.

If you liked this post on how to install phpBB on AlmaLinux, please share it with your friends on social networks or simply leave a reply below. Thanks.

Be the first to write a comment.

Your feedback