From wiki
Revision as of 15:37, 4 October 2014 by R00t (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Installation done on a VM running Ubuntu 14.04LTS


Download required pacakages

~$ sudo apt-get update && sudo apt-get -y install apache2 mysql-server mysql-client php5 php5-mysql php5-gd imagemagick

If you're going to install MediaWiki aswell, then add an extra pacakge

~$ sudo apt-get install -y libapache2-mod-php5

Configure MySQL

login to db

~$ mysql -u root -p

Create mysql phpBB user

~$ mysql> CREATE USER 'phpBB'@'localhost' IDENTIFIED BY 'THISpasswordSHOULDbeCHANGED';
~$ mysql> exit

login as new user to verify account works

~$ mysql -u phpBB -p
~$ mysql> exit

create DB

~$ mysql -u root -p
~$ mysql> CREATE DATABASE phpBB;

verify DB creation


assign rights to wiki user for new database created

~$ mysql> GRANT ALL PRIVILEGES ON phpBB.* TO 'phpBB'@'localhost' IDENTIFIED BY 'phpBBuserpassword' WITH GRANT OPTION;
~$ mysql> exit

verify permissions have been granted

~$ mysql -u phpBB -p
~$ mysql> SHOW GRANTS;
| Grants for phpBB@localhost                                                                                   |
| GRANT ALL PRIVILEGES ON `phpBB`.* TO 'phpBB'@'localhost' WITH GRANT OPTION                                   |
2 rows in set (0.00 sec)

Download phpBB

download the latest version (at the time of this writing was 3.0.12)

~$ wget
--2014-09-28 04:51:36--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2487985 (2.4M) [application/zip]
Saving to: ‘’

100%[=====================================================================================================================>] 2,487,985    1.11MB/s   in 2.1s   

2014-09-28 04:51:38 (1.11 MB/s) - ‘’ saved [2487985/2487985]

verify the md5. this is available on the downloads page, in this case it was MD5: e86ffc334ea53d934c0c1c0588429803

~$ md5sum

create your site's directory where phpBB will live. If you're using a subsite design, like the example below, make sure to create the directories in the same path structure.

~$ mkdir /var/www/

make sure your apache user has appropriate permissions to write to this directory

~$ chown www-data:www-data ./forums

unzip the phpBB zip to the new directory you created

~$ unzip -d /var/www/

this will unfortunately create a directory called phpBB3 underneath, which is not desired. we'll have to move the contents of phpBB3 into the forums directory. You may need to modify permissions of the forums directory for this to work, so i've included that step in my instructions.

~$ ls -la
total 12
drwxr-xr-x  3 www-data www-data 4096 Sep 28 05:03 .
drwxr-xr-x  4 root     root     4096 Sep 28 04:59 ..
drwxr-xr-x 13 www-data www-data 4096 Sep 28 05:15 forums
~$ chmod 777 ./forums/
~$ cp -r /var/www/ /var/www/
~$ rm -rf /var/www/
~/forums$ ls
adm    common.php  cron.php  download  feed.php  images    index.php  language  memberlist.php  report.php  store      styles   viewforum.php   viewtopic.php
cache  config.php  docs      faq.php   files     includes  install    mcp.php   posting.php     search.php  style.php  ucp.php  viewonline.php  web.config
~$ chmod 755 ./forums/

Configure Apache2

Since we're going with a subsite configuration, the virutalhost file is going to be simple and only point to the site's root directory

~$ sudo vi /etc/apache2/sites-available/
<VirtualHost *:80>
        ServerAdmin [email protected]
        DocumentRoot /var/www/
        TransferLog /var/log/apache2/
        ErrorLog /var/log/apache2/

Set File/Folder Permissions

There are a few specific folders and files will need to be opened so users can upload data to them, such as images/avatars

~/forums$ sudo chmod 777 config.php cache files store images/avatars/upload/

And for good measure, restart apache2

~$ sudo service apache2 restart
 * Restarting web server apache2

Enable site and test connectivity

Moment of truth, enable the site

~$ sudo a2ensite

Required restart of apache2

~$ sudo service apache2 restart
 * Restarting web server apache2

Navigate to the installation webpage

The rest of the installation/configuration is going to be done directly from the webpage, similar to mediawiki, but with the difference that it directly writes to the config.php file unlike mediawiki which requires you to cut and paste the contents of the config file.
In the case of this server, since the forums were created as a subsite, I navigated over to:

Before you being with the configuration, make sure you have the following information (which you should if you followed the steps above)

  • Database Type : mysql
  • Database server hostname: localhost (if on the same host) OR hostname of the database server (if on another machine)
  • Database name: phpBB
  • Datebase username & password: phpBB:phpBBuserpassword

On the website, you simply have to do the following steps:

  1. click the Install tab
  2. click Proceed to next step
  3. now you'll land on the Requirements page, take a good look and make sure everything shows as ok. You should only have (1) Database type listed as green, the rest will be red and thats ok. Everything else though should be in green, including the files & directories that we went over earlier.
  4. if everything checks out, at the bottom of the Requirements page will be a link to "Start Install"
  5. configure the database settings that you took note of earlier and click on "Proceed to next step"
  6. from here phpBB will attempt to connect to the database. If successful, you'll see a "Successful Connection" displayed and be able to click "Proceed to next step"
  7. fill out all of the administrator user credentials, like username, password, email, etc. and click "Proceed to next step"
  8. this page will show confirmation that the admin account was created successfully. click "Proceed to next step"
  9. almost done! the installer will now indicate if it was able to write to the config.php file. You should see "The configuration file has been written. You may now proceed to the next step of the installation.", after which you'll want to click the usual "Proceed to next step"
  10. from here you'll want to go through the advanced settings to customize your phpBB instance. In my case I was fine with the default settings as I did not have a separate SMTP server and was not ready to implement SSL.
  11. on the next page you should get the following notification "The database tables used by phpBB 3.0 have been created and populated with some initial data. Proceed to the next screen to finish installing phpBB."
  12. click "Proceed to next step" one last time you should be greeted with the Final Stage page indicating that the phpBB forums have been setup.

Final Steps

Final steps are pretty easy.
Remove/move/rename the install directory. I dont like to lose copies of stuff so I created a new directory and moved the contents to it

~$ sudo mkdir install_backup
~$ sudo cp -r ./install/* ./install_backup/
~$ sudo rm -rf ./install/

Just to make sure someone couldn't access it, I also removed permissions to the backup

~$ sudo chmod 000 install_backup/

Change the permissions for config.php, writing to it on a global level is no longer needed

~$ sudo chmod 644 /var/www/

And once again, another restart of apache2

 ~$ sudo service apache2 restart
 * Restarting web server apache2

Installation should now be complete and you can move on to customizing your forums!

Personal tools

DevOps Tools
Open Source Products
Ubuntu 22
Oracle Linux
VmWare ESXI 5.1
Crypto currencies
Java Script
Raspberry Pi
Canvas LMS
Kaltura Media Server
Plex Media Server
Photoshop CS2
General Info
Meal Plans
NC Statutes
2020 Election