How To Install phpBB Forum on Ubuntu 22.04 | 20.04 Server

0

Tutorial to get phpBB installation steps and commands on Ubuntu 22.04 Jammy JellyFish or Ubuntu 20.04 Focal Fossa using terminal to create your own forum.

What is phpBB?

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

Well, phpBB is a group of international people who love 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 creators of phpBB are always 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 search function integrated in the software
  • 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 run this tutorial, we need a Debian-based Linux such as Ubuntu, with PHP 7.1.3+, a database server (MySQL, MariaDB, MS SQL Server 2000 or higher (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 base software packages we needed to install the phpBB forum are available through the default Ubuntu 22.04 and 20.04 base repository. Therefore, first make sure your system is up to date.

sudo apt update && sudo apt upgrade

3. Install Apache, MySQL and PHP

We need LAMP server stack to install phpBB forum on Ubuntu, so in this step run single command given below. This will install the 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 activate services

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

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

Walk through the text wizard and delete the demo database table, set the root user password, limit remote access…

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

sudo mysql -u root -p

To note: Change yourdb with the name of the database you want to use, whereas youruser and Your password with username and password, respectively, with what you want to assign.

Create a database:

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

6. Download the phpBB forum files

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

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

After that go to your terminal and download the phpBB installer 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 ownership of the file and also set read-write permission for it.

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 the virtual host configuration files, where we tell Apache what the location files are, how and when it should serve users. Most of the time, we configure forums either as a subdomain or a subdirectory. Here we do the same.

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

Copy-Paste the following lines:

To note: Although we can access the forum using the server IP address, however, if you want to use the FQDN (domain), replace phpbb.example.com with the domain you want to use to access the phpBB forum in the configuration lines below.


      ServerAdmin [email protected]
      DocumentRoot /var/www/html/phpbb
      ServerName phpbb.example.com

      
                Options FollowSymlinks
                AllowOverride All
                Require all granted
       

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

to safeguard the file using CTRL+Ohurry Yes and CTRL+X to leave.

Activate the virtual host configuration created for phpBB as well as the Apache 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 steps, open your system browser which can access the domain or server IP address of Ubuntu 22.04 or 20.04 where you installed phpBB forum web software. And point it at that.

For example:

To note: To replace Server IP address with the real address while your-domain.com with the domain you configured.

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

When you get the phpBB GUI to install this forum software, select the “To install» then click on the tab «To install” button.

Create an administrator user:

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

Create an administrator user 1

Database setup:

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

Connect database to PHPBB forum

Server Setup:

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

Server configuration for phpBB

Email configuration:

To confirm the registration of new users, we must activate an e-mail service on our forum. Therefore, if desired, configure the SMTP server.

Configuring emails for phpBB

Give your bulletin board configuration a title.

Bulletin Board Setup

The installation is finally complete.

Installation of the Open Source Forum software complete

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

Go to your terminal server 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 message“.

phpBB Forum install Ubuntu 22.04 or 20.04

Access the phpBB Admin 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.

phpbb Ubuntu 22.04 or 20.04 admin control panel

Access the phpBB Admin Control Panel

Other Items:

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

Share.

Comments are closed.