How to Install phpBB forum on Ubuntu 22.04 | 20.04 Server

Tutorial to get the steps and commands for installing phpBB on Ubuntu 22.04 Jammy JellyFish or Ubuntu 20.04 Focal Fossa using the terminal for creating own forum.

What is phpBB?

phpBB is a fully scalable and customizable open-source forum. The software has a user-friendly interface and straightforward management options. It is based on PHP and MySQL.

Well, phpBB is a group of international people who enjoy working on open-source software. This software was created in June 2000. There have been some changes in the licenses as well as in the management team of phpBB. The goals of the phpBB creators are still the same. They want to provide free forum software for the Internet.

Some features of the phpBB forum software

  • Any database server
  • Interfaces for different languages
  • Forums for private or public use
  • Send private messages in the system
  • The integrated search function in the software
  • The layout can be changed with templates
  • The software can be optimized with mods

 

Steps to install phpBB forum software in Ubuntu 22.04 | 20.04 LTS

1. phpBB Requirements

To perform this tutorial we require a Debian based Linux such as Ubuntu, with PHP 7.1.3+,  database server (MySQL, MariaDB, MS SQL Server 2000 or above (via ODBC or the native adapter), Oracle, PostgreSQL 8.3+ or SQLite 3.6.15+), Web server, and access to a non-root user with sudo rights.

 

2. Run Ubuntu system update

All the core software packages we required to install the phpBB forum are available through the default Ubuntu 22.04 & 20.04 base repository. Hence, first, make sure your system is up to date.

sudo apt update && sudo apt upgrade

 

3. Install Apache, MySQL, and PHP

We need the LAMP server stack to install the phpBB forum on Ubuntu, therefore in this step execute the single command given below. This will install Apache web server, MariaDB, PHP, and its required extensions.

sudo apt install apache2 mariadb-server libapache2-mod-php php-gd php-curl openssl php-imagick php-intl php-json php-ldap php-common php-mbstring php-mysql php-imap php-sqlite3 php-net-ftp php-zip unzip php-pgsql php-ssh2 php-xml wget unzip

 

4. Start and Enable Services

After completing the previous step let’s enable and start the services of Apache and MariaDB to run automatically with system boot.

sudo systemctl enable --now apache2 mariadb

Restart the service once

sudo systemctl restart apache2 mariadb

Now check the status:

sudo systemctl status apache2
sudo systemctl status mariadb

 

5. Create a Database for phpBB on Ubuntu 22.04 | 20.04

Before creating a database and user for phpBB, let’s run a MySQL command to secure our database server instance:

sudo mysql_secure_installation

Go through the text-based wizard and remove the demo database table, set root user password, limit remote access…

After that login to your MariaDB server to create a database and user.

sudo mysql -u root -p

Note: Change yourdb with the Database name you want to use, whereas youruser and yourpassword with username and password, respectively, with whatever you want to assign.

Create DB:

CREATE DATABASE yourdb;
GRANT ALL ON yourdb.* to 'youruser'@'localhost' IDENTIFIED BY 'yourpassword';
FLUSH PRIVILEGES;
EXIT

 

6. Download phpBB forum files

Unlike other common open-source software, the phpBB forum is not available to download or install using the Ubuntu package repositories. Hence, we have to download its files manually from its official website.

You can click on the download button to get it on your system. However, if you are using a command-line server or accessing your server via SSH then right-click on the”Download button” and select the “Copy Link Address” option.

Download phpBB forum files

After that come to your Terminal and download the phpBB setup file using wget command i.e:

wget paste-link

For example:

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

Extract the file 

After downloading the file, extract it:

unzip phpBB-*.zip

Now, move it to your web directory:

sudo mv phpBB3 /var/www/html/phpbb

Give Apache users the ownership of the file and set read-write permission for it as well.

sudo chown -R www-data:www-data /var/www/html/phpbb
sudo chmod -R 775 /var/www/html/phpbb

 

7. Configure Virtual Host for phpBB

To host multiple websites or web platforms on an Apache web server, the best way is to use Virtual host configuration files, where we tell the Apache what is the location files, how and when it has to serve the users. Most of the time, we configure forums either in subdomain or subdirectory. Here we are doing the same.

sudo nano /etc/apache2/sites-available/phpbb.conf

Copy-Paste the following lines:

Note: Although we can access the forum using the server-IP-address, however, if you want to use FQDN (Domain)  then replace phpbb.example.com with the domain you want to use for accessing the phpBB forum in the below-given configuration lines.

<VirtualHost *:80>
      ServerAdmin [email protected]
      DocumentRoot /var/www/html/phpbb
      ServerName phpbb.example.com

      <Directory /var/www/html/phpbb>
                Options FollowSymlinks
                AllowOverride All
                Require all granted
       </Directory>

ErrorLog ${APACHE_LOG_DIR}/phpbb_error.log
CustomLog ${APACHE_LOG_DIR}/phpbb_access.log combined

</VirtualHost>

Save the file by using Ctrl+O, press Y and Ctrl+X to exit.

Enable created virtual host configuration for phpBB and also the Apache’s rewrite module:

sudo a2ensite phpbb
sudo a2enmod rewrite

Restart the Apache Service to apply the changes:

sudo systemctl restart apache2

 

8. Install phpBB forum on Ubuntu 22.04 | 20.04

After completing all the above-given steps, open your system browser that can access the domain or server-ip-address of Ubuntu 22.04 or 20.04 where you have installed the phpBB forum web software. And point it to that.

For example:

Note: Replace server-ip-address with the actual address whereas your-domain.com with the domain you have configured.

http://server-ip-address/phpbb
or 
http://your-domain.com/phpbb

As you get the Graphical user interface of phpBB to install this forum software, select the “Install” tab and then click on the “Install” button.

Start phpBB installation on Linux Ubuntu 22.04 20.04

Create Admin user:

Add the username, email address, and password that you want to use to access and login to the backend of the phpBB.

Create Admin User 1

Database Configuration:

As we have used the MariaDB database server, therefore let’s add the details of that. Use localhost or 127.0.0.1 for the Database server hostname, leave the port blank. After that add the details of the Database such as name, username, and password.

Connect Database to PHPBB Forum

Server Configuration:

Well, in this step you will get some settings to configure Cookie, URL, HTTP or HTTPS protocol, and others. Do the needful, otherwise, leave them because we can configure them later.

Server Configuration for phpBB

Email Configuration:

To confirm the registration of new users we need to have an Email service enabled on our forum. Therefore, if you want it, then configure the SMTP server.

Email Configuration for phpBB

Give Title to your Bulletin board Configuration.

bulletin Board configuration

The installation is finally completed.

Open source Forum software installation finished

Now, delete the “Install” folder to access the create, delete the posts and access the features of the phpBB forum software.

Go to your server terminal and run this command:

sudo rm -r /var/www/html/phpbb/install

Refresh your phpBB web interface and this time you will have the “Welcome post“.

phpBB forum install Ubuntu 22.04 or 20.04

9. Access phpBB Administration Control Panel

To access the Admin control panel, click on the link given for the same at the footer of phpBB. For reference see the screenshot.

Adminsitration Control Panel phpbb Ubuntu 22.04 or 20.04

Access phpBB Administration Control Panel

 

Other Articles:

How To install Flarum Forum software on Ubuntu 22.04 | 20.04
How To Install Discourse on Debian 11 Bullseye server
Install FortiClient VPN on Ubuntu 20.04 LTS
How to Install qbittorrent on Ubuntu 22.04 Jammy
Install Telegram on Ubuntu 22.04 | 20.04

 

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.