How to install phpBB on Ubuntu 17.04

To install phpBB on Ubuntu 17.04

phpBB is an open source bulletin board forum software that provides a virtual space for discussion among the members of your website. It has a huge variety of features like flat topic structure, sub-forums, forum-specific data-styles, user groups, group-based permissions, database query and template caching, support for PHP 7, multiple database engines and much more. This article covers the method to install phpBB on Ubuntu 17.04.

Pre-requirements

Install LAMP(apache, mariadb, PHP 7)

In MariaDB (create database and user and give privilages to that user)

PHP modules (apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-xmlrpc php7.0-gd)

Installing phpBB

In order to install phpBB, make sure you download the latest stable installation package of phpBB and for that you need to use the wget command in the following command.

root@linuxhelpubnt:~ # wget https://www.phpbb.com/files/release/phpBB-3.2.1.zip
--2017-11-09 11:48:25--  https://www.phpbb.com/files/release/phpBB-3.2.1.zip
Resolving www.phpbb.com (www.phpbb.com)... 140.211.15.244
Connecting to www.phpbb.com (www.phpbb.com)|140.211.15.244|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7767156 (7.4M) [application/zip]
Saving to: ‘ phpBB-3.2.1.zip’ 

phpBB-3.2.1.zip     100%[===================> ]   7.41M   113KB/s    in 34s    

2017-11-09 11:49:07 (221 KB/s) - ‘ phpBB-3.2.1.zip’  saved [7767156/7767156]

Once the file is downloaded, you shall extract the that package as follows.

root@linuxhelpubnt:~ # unzip phpBB-3.2.1.zip &ndash d /var/www/html
Archive:  phpBB-3.2.1.zip
   creating: phpBB3/
   creating: phpBB3/language/
   creating: phpBB3/language/en/
  inflating: phpBB3/language/en/viewforum.php  
  inflating: phpBB3/language/en/memberlist.php 
  inflating: phpBB3/language/en/install.php 
  inflating: phpBB3/language/en/posting.php 
  inflating: phpBB3/language/en/captcha_recaptcha.php 
  inflating: phpBB3/language/en/viewtopic.php 
.
.
inflating: /var/www/html/phpBB3/images/upload_icons/zip.gif 
  inflating: /var/www/html/phpBB3/images/upload_icons/mid.gif 
  inflating: /var/www/html/phpBB3/images/index.htm 
  inflating: /var/www/html/phpBB3/images/spacer.gif 

Later, you need you change the ownership and permission of file in HTML location. And for that, you need to run the following command.

root@linuxhelpubnt:~# chown www-data:www-data -R /var/www/html/
root@linuxhelpubnt:~# chmod 775 -R /var/www/html/

Later, you need to enable the rewrite module.

root@linuxhelpubnt:~# a2enmod rewrite

And then, you should create VirtualHost by creating new .conf file.

root@linuxhelpubnt:~# nano /etc/apache2/sites-available/phpbb.conf

When the file is open, you need to add the following content.

< VirtualHost *:80> 
ServerAdmin admin@phpbb.com
DocumentRoot /var/www/html/phpBB3/
ServerName phpbb.com
ServerAlias www.phpbb.com
< Directory /var/www/html/phpBB3/> 
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
< /Directory> 
ErrorLog /var/log/apache2/phpbb.com-error_log
CustomLog /var/log/apache2/phpbb.com-access_log common
< /VirtualHost> 

Later, you need to make an entry in hosts file. So, open the file.

root@linuxhelpubnt:~# nano /etc/hosts

And in that file, you need to add the following line.

< machine ip >    domain_name

After that, make sure you enable the newly created .conf file by running the following command.

root@linuxhelpubnt:~# a2ensite phpbb.conf
Enabling site phpbb.
To activate the new configuration, you need to run:
  service apache2 reload

Later, restart the apache service by running the following command.

root@linuxhelpubnt:~# systemctl  restart  apache2.service

Now, you shall open the browser, and give http://phpbb.com/install as URL. The installation setup of phpBB appears on your screen. Proceed with the installation.

In the next page, you need to fill the admin detail and click Submit.

In the next page, you need to fill database details and click Submit.

Next, you should fill server configuration details and click Submit.

After that, you need to fill the email-configuration details and click Submit.

Also, in the following page, you need to give the site details and click Submit.

phpBB is getting installed now.

The installation is now complete, to open click ‘ Take me to ACP.

The admin page of the phpBB now appears on the screen.

With this, the installation of phpBB comes to an end.

Tag : Ubuntu phpBB
FAQ
Q
How to enable the rewrite file?
A
Utilize the following command:
# a2enmod rewrite
Q
How to extract the phpBB package?
A
Run the following command:
# unzip phpBB-3.2.1.zip &ndash d /var/www/html
Q
What are the Pre-requirements of phpBB on Ubuntu?
A
Install LAMP(Apache, mariadb, PHP 7)
In MariaDB (create database and user and give privileges to that user)
PHP modules (apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-xmlrpc php7.0-gd)
Q
What is phpBB on Ubuntu?
A
phpBB is an open source bulletin board forum software that provides a virtual space for discussion among the members of your website. It has a huge variety of features like flat topic structure, sub-forums, forum-specific styles, user groups, group-based permissions, database query and template caching, support for PHP 7, multiple database engines and much more.
Q
How to install phpBB on Ubuntu?
A
Run the following command:
# wget https://www.phpbb.com/files/release/phpBB-3.2.1.zip