Today we are going to setup one of the most famous and open source forum software that is PHPBB Forum abbreviated as PHP Bulletin Board. Its written in the PHP scripting language and is available under the GNU General Public License. PhpBB offers a great list of features with more efficiency than any other bulletin board. Its administration panel allows customization of even the most complex features and integration into an existing site with an ease and without editing the code.
PhpBB forum can be installed through different ways and can be integrated with your domain. But in this tutorial we will walk through the steps to install it on our VPS with CentOS 7 installed on it.
Prepare Your Linux CentOS Server
For the smooth and successful installation of PhpBB Forum on CentOS 7, you must take care of following steps as described
1) System Update
Your system should be up-to-date with latest updates and security patches, so if you are connected to the internet then you can run the below command for Red Hat Linux to start update your system.
2) Root Privileges
In order to perform system level tasks, you must have root or super user privileges otherwise you will not be able to perform system level changes on your server.
Install Required Packages for PhpBB Forum
You will not be able to setup PhpBB Forum on your CentOS 7 VPS unless you have installed all of its required packages. So, if your CentOS 7 VPS is with minimal installation packages then follow the below steps to complete the prerequisites that mostly consists of a LAMP server.
1) LAMP Setup
In order to setup the LAMP stack let’s start from Apache web server installation and run the below command to install it.
# yum install httpd
Once you have successfully installed it, start its services then enable it to start at every reboot and then check the status of its services, to be sure that its up and running. So, all these tasks can be done by running below commands.
# systemctl start httpd
# systemctl enable httpd
# systemctl status httpd
Now install the database server whatever you wish to use for PhpBB forum. Here we will be using MariaDB-MySQL database, so run the below command to install its package.
# yum install mariadb mariadb-server
After that starts its services and enables it to auto start at every reboot and then check the status of its services that should be active and running.
# systemctl start mariadb
# systemctl enable mariadb
# systemctl status mariadb
Move to the next package of LAMP stack that is PHP, so we need to install PHP and some of its required and optional modules necessary for the PhpBB forum.
# yum install php php-gd php-mysql
2) Create Database
Let’s setup the root password to the pre installed MariaDB by invoking the below command on the SSH terminal.
# mysqladmin -u root password any_passwd
Now connect to your MariaDB server with root user credentials with below command.
# mysql –u root –p
Once you are connected to the MariaDB server create a new database that will used specifically for PhpBB Forum then create a new user and grant that user to newly created database by running the below commands.
MariaDB [(none)]> create database phpbb;
MariaDB [(none)]> create user 'bbuser'@'localhost' identified by 'mariabb123';
MariaDB [(none)]> grant all privileges on phpbb.* to 'bbuser'@'localhost';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit
3) Add Firewall Rule
If you have firewall enabled, then make sure to allow access to the apache web service on port 80. You can add new firewall rule in centos 7 with below command.
# firewall-cmd --zone=public --add-port=80/tcp --permanent
# firewall-cmd --reload
Change your SELinux to Permissive mode with following command.
Download Installation Package of PhpBB
Open the official web link https://www.phpbb.com/downloads/ and download the latest phpBB package to install on your VPS. You can directly download this zipped package using the 'wget' command provided with download link.
Make sure that you have 'wget' and 'unzip' packages are installed, you install them by following yum command.
# yum install wget unzip
Now you download the package using 'wget' command.
# wget https://www.phpbb.com/files/release/phpBB-3.1.5.zip
Use the unzip command and extract the downloaded package into the document root directory of your apache web server that is “/var/www/html/”.
# unzip phpBB-3.1.5.zip -d /var/www/html/
Change the ownership of phpBB3 folder to apache user and give appropriate writable permissions to following directories as shows by running the below commands.
# chown -R /var/www/html/phpBB3/
# cd /var/www/html/phpBB3
# chmod 660 images/avatars/upload/ config.php
# chmod 770 store/ cache/ files/
Start Web Installation of phpBB
Its time to setup web installation process of phpBB, So open your web browser, give the name of your FQDN and your server IP with addition to the directory where you placed its installation files and directories.
You will be directed towards the installation steps where you will be introduced about the phpBB software as shown.
Then move to the next “Install” tab where you greeted with welcome note and the installation instruction as shown below, so read them carefully and click to “Proceed NEXT”.
3) Installation Compatibility
In this step phpBB installation will carry out some tests on your server configuration and files to ensure that you are able to install and run phpBB by checking PHP version and settings and supported databases as shown below.
Furthermore the installation compatibility will check for optional modules and the permissions of files and directories, so everything should be fine to proceed forward to the Next step. Once all of your configurations become compatible click to “Start install” button as shown below.
4) Database Configurations
Choose the database type as MySQL and provide the details of your database name and user that you had configured previously and click to “Proceed Next”.
If your provided credentials are fine you will greeted with successful connection to database, and you can proceed to next step.
5) Admin Details
Provide your Administrator username, password and contact email as shown below.
Once you are greeted with successful configurations of administrator settings click the Next button to precede with configurations file.
6) Advance Settings
The settings on this page are only necessary to set if you know that you require something different from the default. If you are unsure, just proceed to the next page, as these settings can be altered from the Administration Control Panel later.
Then in the next step you proceed with the database tables used by phpBB 3.1 that will be created and populated with some initial data. After that you have Proceed to the next screen and finish installing phpBB.
7) Finish Installation
Cheers! We are ready to go with phpBB by Clicking the button below that will take us to a form for submitting statistical data to phpBB in your Administration Control Panel (ACP). Please delete, move or rename the install directory before using your board. While this directory exists, only the Administration Control Panel (ACP) will be accessible.
Welcome to phpBB Admin Panel
This screen will give you a quick overview of all the various statistics of your board. The links on the left hand side of this screen allow you to control every aspect of your board experience. Each page will have instructions on how to use the tools.
We hope you have enjoyed following this tutorial and have learnt allot about the setup of Open Source phpBB Forum, where you can communicate with your forum members, discuss issues and resolve problems quickly and efficiently in a secured way with fully featured phpBB forum.