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.
Simple and functional.
Congratulations.
And for the PHP version execute:
php -v
Or if you followed this tutorial you would have got an error.
As follows:
php -V
Usage: php [options] [-f] [–] [args…]
php [options] -r
[--] [args...]
php [options] [-B ] -R
[-E ] [--] [args...]
php [options] [-B ] -F [-E ] [--] [args...]
php [options] -- [args...]
php [options] -a
-a Run as interactive shell
-c | Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f Parse and execute .
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-r
Run PHP
without using script tags
-B Run PHP before processing input lines
-R
Run PHP
for every input line
-F Parse and execute for every input line
-E Run PHP after processing all input lines
-H Hide any passed arguments from external tools.
-S : Run with built-in web server.
-t Specify document root for built-in web server.
-s Output HTML syntax highlighted source.
-v Version number
-w Output source with stripped comments and whitespace.
-z Load Zend extension .
args... Arguments passed to script. Use -- args when first argument
starts with - or script is read from stdin
--ini Show configuration file names
--rf Show information about function .
--rc Show information about class .
--re Show information about extension .
--rz Show information about Zend extension .
--ri Show configuration for extension .
Thank you :-)
New phpBB 3.0.13 released as of February.
And you forgot to:
Yum install -y unzip also :-)
> GRANT ALL PRIVILEGES
I don’t believe this is the best way to do it, strictly due to wanting a more sane environment vis-à-vis security.
Best wishes,
-k0nsl
You could create a new ‘phpbbuser’ MySQL user and grant him only the required permissions using the following commands:
CREATE USER phpbbuser@localhost IDENTIFIED BY ‘YOURPASSWORD’;
GRANT CREATE,SELECT,INSERT,UPDATE,DELETE ON phpbb.* TO phpbbuser@localhost;