Tutorial: Setup a Totally Free, Self-Hosted phpBB Forum

This tutorial is intended to help guide new web masters (like myself) in getting their own totally free, self-hosted phpBB3 forum up and running. I’m using Fedora 8 to accomplish this, but your distribution of Linux is probably very similar. I try to write my tutorials so that anybody with any distribution can accomplish the task. It may not be identical, but the principles are usually the same.

Let’s get started.

First, it’s important that you’ve already gotten a self-hosted web server up and running. I have written a guide on how to accomplish this here:

http://derekhildreth.com/blog/index.php/2008/01/tutorial-setup-your-own-self-hosted-simple-web-server-for-free

Now, if you have a web server up and running, we’ll get down to the fun stuff.
1.) Install all of the required software for phpBB3 forums:
sudo yum install mysql-server mysql-administrator mysql mysql-gui-common php-mysql

2.) Download, extract, and place the phpBB3 files:
The last step of the following commands will determine what address your guests type to get to your forums. I chose to use “forums” because it’s easier to remember than phpBB3. So, for example when you type http://yoursite.dyndns.org/forums, it will take you to the phpBB forums. You can change this to whatever you want.
wget http://superb-east.dl.sourceforge.net/sourceforge/phpbb/phpBB-3.0.0.tar.bz2
tar -xjf phpBB-3.0.0.tar.bz2
mv phpBB3/ /var/www/html/
mv phpBB3 forums

3.) Setup the mySQL Server:
First, setup a password for the root account:
mysqladmin -u root password 'passwordyouwant'

Login to mySQL
mysql -u root -p

Create the new phpbb database:
create database phpbb;

Create new user and password for database:
grant all privileges on phpbb.* to username identified by ‘password‘;

Flush the privileges:
flush privileges;

Test the mySQL Setup:
exit
mysql -u username -p
enter password here
show databases;

The result should look similar to this:
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| test |
| phpbb |
+——————–+
4 rows in set (0.29 sec)

4.) Install the phpBB3 forums:

To install the forums, you’ll need to navigate to the install directory in your browser (ie. Firefox). So, goto http://yoursite.dyndns.org/forums/install/index.php. This will walk you through the setup for the forums. Point phpBB to your mySQL database by filling in the following fields with this information:

Database type: mySQL with mySQLi Extention
Database server hostname or DSN: leave blank
Database server port: leave blank
Database name: phpbb
Database username: username
Database password: password
Prefix for tables in database: phpbb_

Click on the “Proceed to next step” button. You should get a “successful connection” message. If not, there is a problem with the database you created. Check to make sure that you’re not misspelling it.

From here, everything is pretty self explanatory. It will ask you to setup an administrator account and then it will try to automatically configure the config.php file. If you run into permission problems (like I did), you’ll have to open the file permissions by typing this command into the terminal:
su -
chmod 777 /var/www/html/forums/config.php

When you have completed the install, phpBB will remind you to delete or rename the installation directory. I suggest you delete it by using this command:
rmdir --ignore-fail-on-non-empty /var/www/html/forums/install/

5.) Enjoy!

If everything went as it should, you should now be able to view and administer your own phpBB3 forums! If you encountered any problems, I would like to hear about them so that I can update the tutorial if needed. Also, you may refer to the official phpBB3 documentation here.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • BlinkList
  • Furl
  • NewsVine
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • co.mments

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader. Also, you may enjoy the related posts below!

Comments

[...] Tutorial: Setup a Totally Free, Self-Hosted phpBB Forum [...]

Derek,

Thanks for all the instruction on setting up phpBB3 forum I am in the step #4) Install the phpBB3 forums:

I am unable to load the http://mywebsite/forums/install/index.php page to configure the forum, can you please help me what I am doing wrong.

PS: The phpBB3 DB is properly setup and running.

Appreciateour guidance.

bhaktiveda (simhan)

Try maybe using http://localhost/forums/install/index.php.

Make sure the path is correct too. Browse to the /var/www/html folder and make sure that there is a folder called “forums” or “phpbb3″ in there that has all of the files. If the folder is called “phpbb3″ then you’ll have to use http://mywebsite/phpbb3/install/index.php.

I hope this helps.

Derek,

I found that I could not login to the database with the user I created according to your instructions. In the user table, the user I created had a Host entry of ‘%’. I had to specifically assign privileges to localhost with this command in order to then login and verify things:

grant all privileges on phpbb.* to user@localhost identified by ‘password’;
flush privileges;

Then things worked fine for me. As I understand it, thats only a concern if you’re connecting to mysql via a local socket. If you want to connect via TCP, you would do “user@hostname.com”. The wildcard character “%” did not work for me, I don’t know why.

–Mish

@Mish: Thanks for commenting on that matter. It will be very helpful for anybody running into that problem.

@bhaktiveda: I received an email from you and it sounds like the problem has been solved.

Hello
Your site really helps me
Cya

Leave a comment

(required)

(required)