Author: Dan
Brown <dan@familybrown.org>
Applicable Versions:
5.0, 5.1.2, 5.5, 5.6
Problem:
You want to add discussion forums to your web site, powered by phpBB 2.0.4.
Solution:
Start by downloading phpBB 2.0.4 from
http://prdownloads.sourceforge.net/phpbb/phpBB-2.0.4.tar.gz. Browse to that page, select a mirror near
you, and download the file to a directory on your SME Server.
Then
run these commands:
[root@e-smith
phpbb]# cd /opt
[root@e-smith /opt]# tar zxf
/path/to/downloaded/file/phpBB-2.0.4.tar.gz
[root@e-smith /opt]# cd phpBB2
[root@e-smith phpBB2]# chown
www:www config.php
Now
you're ready to install and configure phpBB. First, you'll need
to create a custom template fragment for Apache:
[root@e-smith
/root]# mkdir -p
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
[root@e-smith /root]# cd
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
[root@e-smith httpd.conf]# pico 93phpBB
Enter
the following into this file:
#-------------------------------------------
# phpBB 2.0.4
#-------------------------------------------
Alias /phpBB2 /opt/phpBB2
<Directory /opt/phpBB2>
AddType application/x-httpd-php .php .php3 .phtml
Options Indexes +Includes FollowSymLinks
order deny,allow
deny from all
allow from all
</Directory>
<Files /opt/phpBB2/config.php>
order deny,allow
deny from all
</Files>
#------------------------------------------
Then rebuild httpd.conf
and restart apache:
[root@e-smith
httpd.conf]# /sbin/e-smith/expand-template
/etc/httpd/conf/httpd.conf
[root@e-smith httpd.conf]# /etc/rc.d/rc7.d/S85httpd-e-smith restart
You're
almost ready to configure phpBB. If you don't have a current
installation, you'll need to create a database and database user
for phpBB before you proceed. Note that you can (and should)
change "phpbbpassword" below to some other password:
[root@test
httpd.conf]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 3.23.36
Type 'help;' or '\h' for help. Type '\c' to clear the buffer
mysql> CREATE DATABASE phpbb;
Query OK, 1 row affected (0.10 sec)
mysql> GRANT ALL PRIVILEGES ON phpbb.* TO phpbb@localhost
IDENTIFIED BY 'phpbbpassword';
Query OK, 0 rows affected (0.16 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.06 sec)
mysql> quit
Bye
Now simply browse to http://yourserver/phpBB2. You'll see the
setup page below:
Fill
in the fields as requested, choosing your own Administrator username
and password, and click on the Start Install button. phpBB
will set up the database tables, confirm that it is complete, and
take you to the forum administration page. Installation is
complete!
For
security, you'll want to delete the install.php, upgrade.php, and
update_to_FINAL.php files from the phpBB2 directory:
[root@e-smith
phpBB2]# rm -f install.php upgrade.php update_to_FINAL.php
NOTE:
If
you already have phpBB 1.4 installed, you may upgrade following the
same
procedures, with three exceptions:
- You
do not need to create the database, because you already have it.
However, if you have followed earlier how-to documents
instructing you to specify the MySQL root user, you should still
create the phpbb user.
- On the setup screen, set
Installation Method to "Upgrade" instead of "Install".
- After the upgrade is
finished, you'll need to update one of the database
tables. Here's how:
[root@e-smith
contrib]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1741 to server version: 3.23.36
Type 'help;' or '\h' for help. Type '\c' to clear the buffer
mysql> use phpbb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> ALTER TABLE phpbb_users ADD COLUMN user_timezone float
DEFAULT '0' NOT NULL;
Query OK, 6 rows affected (0.03 sec)
Records: 6 Duplicates: 0 Warnings: 0
mysql> quit
The
number of "rows affected" will vary depending on the number of users
you have registered. If you have phpMyAdmin installed, you could
also use it to run the ALTER TABLE command.
At
this time, phpBB will not share users/groups/passwords with the rest of
the SME Server. I don't know if it's possible to add this
capability in the future.
|