Today’s article will be about installing and configuring phpBB3 on a CentOS 6 VPS. phpBB (PHP Bulletin Board) is one of the most popular free and open-source bulletin boards written in the PHP scripting language and used by millions of people around the world. With phpBB you can easily create your discussion boards and start your own community with just a few clicks of your mouse. phpBB is very customizable and there are a number of templates, languages, style and image packages available for it’s customization.
phpBB supports multiple database engines such as MySQL, PostgreSQL, Firebird, SQLite, Oracle and MS SQL Server. In this article we will use a MySQL database and we assume that you already have MySQL, Apache and PHP installed on your CentOS 6 server. Please note that phpBB requires MySQL version 3.23 or higher and you must be running PHP 4.3.3 or higher.
To check the version of the MySQL server installed on your VPS execute:
# mysql --version
And for the PHP version execute:
# php -V
Before we start with the installation, make sure that your system is up to date.
# yum -y update
Install the following PHP modules if they are not already installed
# yum install -y php-mbstring php-gd php-xml php-imap
Let’s start with the installation.
Download and unpack the latest stable version of phpBB, currently 3.0.12, from their official website to the document root directory on your server
# wget https://www.phpbb.com/files/release/phpBB-3.0.12.zip # unzip phpBB-3.0.12.zip -d /var/www/html
To find out Apache’s document root directory execute:
# grep -i '^documentroot' /etc/httpd/conf/httpd.conf DocumentRoot "/var/www/html"
Optionally, you can rename phpBB’s directory to whatever you want
# mv phpBB3/ phpbb/
Next thing we need to do is to create a MySQL database for the phpBB installation
# echo "CREATE DATABASE phpbb;" | mysql -u root -p # echo "CREATE USER 'phpbbuser'@'localhost' IDENTIFIED BY 'YOURPASSWORD';" | mysql -u root -p # echo "GRANT ALL PRIVILEGES ON phpbb.* TO 'phpbbuser'@'localhost';" | mysql -u root -p # echo "FLUSH PRIVILEGES;" | mysql -u root -p
Remember to change ‘YOURPASSWORD’ with a strong password.
Change the owner of the phpBB directory:
# chown -R apache:apache /var/www/html/phpbb
With this step we are done with the installation from the command line. Now head your browser to http://yourdomain.tld/phpbb or http://yourIP/phpbb and continue with the configuration.
Throughout the web installation phpBB will do some tests on your server to ensure that the server meets all the requirements. You will also need to enter the information for the MySQL database we’ve created earlier in this article, set your administrator account and email settings.
Final step is to delete the install directory
# rm -rf /var/www/html/phpbb/install/
Done. If you closely follow this tutorial you have successfully installed phpBB on your server and you can start creating your own community.
Of course, if you are one of our Linux VPS Hosting customers, you don’t have to do any of this, simply ask our admins, sit back and relax. Our admins will set this up for you 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.