In this tutorial we are going to provide you with step-by-step instructions on how to install PunBB on a Debian 8 VPS.
PunBB is an open source, lightweight forum software written in PHP with simple layout and clean design. In general, it is faster than other forum software and it is very easy to administrate and moderate. The default theme of PunBB supports responsive design, so it is mobile and tablet friendly.
This tutorial was tested and written for a Debian VPS, but it should work on any Linux distribution.
This install guide assumes that Apache, MySQL and PHP are already installed and configured on your PunBB virtual server. At the time of writing this tutorial, the latest stable version of PunBB is 1.4.3 and it requires:
- PHP 5 or higher with the MySQL PHP extension enabled
- Apache Web Server >= 2.0 compiled with mod_rewrite module and with the following directives allowed: DirectoryIndex, Deny, Allow, Options, Order, AddHandler, RewriteEngine, RewriteBase, RewriteCond and RewriteRule.
- MySQL, PostgreSQL or SQLite installed on your virtual server.
So, let’s start with the installation procedure. Download the latest version of PunBB available at ‘http://punbb.informer.com/wiki/downloads’ to a directory of your virtual server and extract it using the following commands:
cd /opt/ wget http://punbb.informer.com/download/punbb-1.4.3.zip unzip -o punbb-1.4.3.zip -d /var/www/html/
PunBB requires a database to store it’s data, so create a new MySQL database for PunBB to use and assign a user to it with full permissions:
mysql -u root -p mysql> CREATE DATABASE punbbdb; mysql> GRANT ALL PRIVILEGES ON punbbdb.* TO 'punbbuser'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION; mysql> FLUSH PRIVILEGES; mysql> quit
Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘punbb.conf’ on your virtual server:
touch /etc/apache2/sites-available/punbb.conf
Then, run the following command:
ln -s /etc/apache2/sites-available/punbb.conf /etc/apache2/sites-enabled/punbb.conf
Alternatively, use the a2ensite to enable the punbb.conf configuration in Apache:
sudo a2ensite punbb.conf
Edit the ‘punbb.conf’ configuration file:
vi /etc/apache2/sites-available/punbb.conf
and add the following lines to it:
<VirtualHost *:80> ServerAdmin admin@your-domain.com DocumentRoot /var/www/html/punbb/ ServerName your-domain.com ServerAlias www.your-domain.com <Directory /var/www/html/punbb/> Options FollowSymLinks AllowOverride All </Directory> ErrorLog /var/log/apache2/your-domain.com-error_log CustomLog /var/log/apache2/your-domain.com-access_log common </VirtualHost>
Restart the Apache web server for the changes to take effect:
systemctl restart apache2.service
Move the PunBB installation files to the document root directory defined in the virtual host directive above:
mv /var/www/html/punbb-1.4.3/ /var/www/html/punbb/
Set the proper ownership of PunBB files and directories:
chown -R www-data /var/www/html/punbb/
Open your favorite web browser and navigate to http://your-domain.com/admin/install.php . Once you do that, you will be taken to the first page of the PunBB web installer. Enter the MySQL database information, set administrator username and password and start the installation. Once the installation is complete, log in at http://your-domain.com/admin/index.php as administrator user and configure your PunBB forum according to your needs.
Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install PunBB for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.