25
Jan

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.

Feel free to donate if this post prevented any headaches! Another way to show your appreciation is to take a gander at these relative ads that you may be interested in:


There's 11 Comments So Far

  • bhaktiveda
    February 17th, 2008 at 9:29 pm

    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)

  • sendderek
    February 18th, 2008 at 10:05 am

    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.

  • Mish
    February 18th, 2008 at 12:12 pm

    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 [email protected] 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 “[email protected]”. The wildcard character “%” did not work for me, I don’t know why.

    –Mish

  • sendderek
    February 18th, 2008 at 1:00 pm

    @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.

  • VidsArrind
    March 4th, 2008 at 1:35 am

    Hello
    Your site really helps me
    Cya

  • admin_papa
    August 29th, 2008 at 10:41 am

    Good Day

    Just wanted to share my new experience.

    If your Windows XP denies to run due to an error related to lost HAL.DLL, invalid Boot.ini or any other critical system boot files you can repair this by using the XP installation CD. Just boot from your XP Setup CD and enter the Recovery Console. Then launch “attrib -H -R -S” on the C:Boot.ini file and remove it. Run “Bootcfg /Rebuild” and then Fixboot

    Regards,
    Carl

  • admin_papa
    August 30th, 2008 at 11:16 am

    Hi Folks!

    Just wanted to share my new experience.

    If your Windows XP fails to start due to an error related to missing HAL.DLL, invalid Boot.ini or any other important system boot files you can repair this by using the XP installation CD. Just boot from your XP Setup CD and enter the Recovery Console. Then run “attrib -H -R -S” on the C:Boot.ini file and remove it. Launch “Bootcfg /Rebuild” and then Fixboot

    Regards,
    Carl

  • dschibut
    September 29th, 2008 at 8:02 pm

    I started this discussion to speak about public available web proxies:

    Which are really anonymous?

    Which can be used with facebook, myspace etc, in other words: are fresh ?

    Which can you recommend?

    Thanks for your help,
    Dschibut

    P.S.: In my country, the freedom of speech is somehow limited, please give me a hint, if you are not sure about your recommendation.

  • SendDerek
    September 29th, 2008 at 9:58 pm

    @dschibut:

    I’m not really so sure what you’re looking for here. This blog entry is about setting up a forum for community discussions. I’m not sure I could recommend anything about proxy servers as I don’t know much about them. I thought I knew that all of them were anonymous, but maybe some are, to a degree, more anonymous.

Who Linked To This Post?

  1. Tutorial: Setup Your Own (Self-Hosted) Simple Web Server for Free « SendDerek’s Blog
  2. Breeze Growing » Blog Archive » Memorizing this blog system …