Tutorials - New CGI Platform > Help Installing PHPbb
Tutorials & FAQs: Scripts: How to install phpBBIf you use your account to run your own website, one feature which will inject some life into your website is a discussion forum.
This enables both you and the users of your website to communicate with one another via various discussion topics. Our tutorial provides guidance for installing the phpBB bulletin board software, which the PlusNet discussion forums use a customised version of . Read on to see how you can make your website truly interactive.
Expertise required
You'll be able to install this software very easily if you follow the step-by-step instructions methodically and accurately type what you see.
- In two places, you will be required to transfer a file to the CGI server machine. If you have a graphical FTP software package, such as CuteFTP, you may use that. Otherwise, you may use a command line interface (instructions given). However, to do this you'll need to know how to bring up a Command Prompt (possibly called a DOS command,or DOS box) on your operating system and how to then change directory.
- The installation process also requires you to log on to the CGI server machine. Don't worry, all the commands you'll need are given within the tutorial, so even relatively inexperienced users should not be put off.
- Non-Windows users should have little difficulty in interpreting the instructions for their operating systems. Very little is actually done on the local host, so the procedure is essentially operating system neutral in this respect.
Getting started with PHPBB
Prior to starting, make sure you have activated both MySQL and CGI usage for your account. (The Website Settings link of the Portal provides tools for doing this. If you do not see the MySQL and CGI configuration tools when you select Website settings, you'll need to upgrade to an account type which includes them.)
For simplicity, red text has been used to indicate text which must be entered exactly as shown. Do not alter it at all (unless you know what you are doing).
Using phpBB with your CGI webspace
Obtaining the phpBB software
- Visit the phpBB website to obtain the phpBB software.
- Click on the Downloads icon.
- Several different packages are available for downloading. Select the "Full Package", and because we're going to be installing on a Linux machine, download the "tar.bz2" version.
- Place it in any convenient directory on your home PC (this is just a temporary location from where you can copy it to the CGI server machine).
Transferring the phpBB package to the CGI server
In this step, we're concerned with placing a copy of the phpBB gzip file onto the PlusNet CGI server.
You use FTP to copy the package to the server. If you have graphical FTP software (such as CuteFTP) you can use that to put it in your home directory on the CGI server. (You'll see there's already a directory called cgi-bin in your home directory - do not put the phpBB file in this directory, it should go in your home directory.)
If you don't have a graphical FTP software package (or if you'd like to try the command line for a change) follow the detailed instructions below for using a command line interface. Note that commands are sent by typing the command and then 'sending' it by pressing the Return or Enter key.
- Bring up a Command Prompt.
- Switch to the directory containing the phpBB file you've downloaded.
drive:\dir> cd <directory name>
Now FTP the phpBB file to the CGI server:
drive:\dir> ftp cshell.plus.net
Connected to <CGI server name>.
220 ProFTPD 1.2.10 Server (ProFTPD) [212.159.7.170]
User (<CGI server name>:(none)): <your username>
331 Password required for <your username>
Password: <your password for the CGI server machine>
230 User <your username> logged in
ftp> bin
200 Type set to I.
ftp> prompt
Interactive mode Off
ftp> mput phpBB*
200 PORT command successful
150 Opening BINARY mode data connection for phpBB-2.0.15.tar.gz
226 Transfer complete
ftp: 544080 bytes sent in 17.13Seconds 31.77Kbytes/sec.
ftp> quit
221 Goodbye
drive:\dir> (Back at the Windows Command Prompt)
Keep the Command Prompt window open - we use it in the next step!
Extracting the software on the CGI server
Your .tar.bz2 phpBB package is now in your home directory on the CGI server. You now need to unpack it:
- Log on to the CGI server machine using telnet.
- If you used graphical FTP software to transfer the package to the CGI server, this is the point at which you need to open a Command Prompt.
drive:\dir> telnet cshell.plus.net
[Connecting]
Linux 2.6.11-PlusNet-cgi (<timestamp>)
login: <your username>
Password: <your password for the CGI server machine>
Last login: <timestamp> from <your username>.plus.com
username@cshell1 username $
You have now logged on, and you're at a Linux 'shell' prompt (a Linux way of saying 'Command' Prompt). A feature of the shell is that if you write a few letters of a filename and then press the tab key, it will complete the rest of the name, based on the files in the directory. We'll make use of that feature here, so you don't have to remember the full name of the file we're interested in.
Note: Linux systems are case sensitive (i.e. it matters whether you type in upper case or lower case). Use exactly the same case as is shown here, otherwise Linux won't understand. If you type 'phpBB' this is not the same as "phpbb", for example.
Extracting the files from the phpBB package
| username@cshell1 username $ tar xvjf phpBB<press the tab key, then enter> |
You'll see each file listed as it is extracted, and when extraction has finished you should now have a directory called phpBB2 which contains all your phpBB files. The tar.bz2 file will still be there, and you'll have another directory, cgi-bin, which was there from before you started.
Deciding on a directory name for your forum
This step is optional, but it will determine the URL (web address) used to access your forum (<ccgi.username.plus.com>).
- The next part of the URL is the directory name in which the phpBB software resides. By default, it is /phpBB2, so you would access the forum with this URL: http://<forum hostname>/phpBB2
- If you don't like the directory name 'phpBB2', now is the time to change it. It is more difficult to change later, although it can be done (the name is stored in the MySQL database). For example, you might prefer to call it 'forum', which would then make your forum's web address: http://<forum hostname>/forum
- If you want to change the directory name, you do it from your telnet session (e.g. change from 'phpBB2' to 'forum')
username@cshell1 username $ mv phpBB2 forum - If you want to change the directory name, you do it from your telnet session (e.g. change from 'phpBB2' to 'forum')
In the remainder of this tutorial, this directory will be referred to as <phpBB directory>. If you decided not to change it, type phpBB2 wherever you see this; otherwise type the name you gave the directory (e.g. 'forum' in the example above).
The web address used to access your forum (shown as <your forum address> later in this tutorial) is: http://<forum hostname>/<phpBB directory>
[b]Changing file permissions
In order to allow php files to be executed we need to change the permissions of all the php files using the following command. This is because by default php files being text files are not executable. Fortunately there is a script that will do this easily for you.
| username@cshell1 username $ chmod -R u+x <phpBB directory> |
We also need to change the permissions on the config.php file which stores the configuration information for the forum.
| username@cshell1 username $ cd <phpBB directory> username@cshell1 username $ chmod 666 config.php Stay logged on in your telnet session! |
Installing the software
The next step of the installation is carried out from your PC's web browser.
- Browse to <your forum address> which we've just determined: http://<forum hostname>/<phpBB directory>
- In your browser you'll see the installation page for phpBB. Follow these steps below to complete the installation screen.
- [b]Basic Configuration
: Select MySQL 3.X from the Database Type drop-down list . - In your browser you'll see the installation page for phpBB. Follow these steps below to complete the installation screen.
- Database Configuration: Fill the Database Server Hostname/DSN, Your Database Name, Database Username and Database Password fields with the information emailed to you when you activated MySQL.
- Admin Configuration: This section of the installation screen needs to contain the details about the person who is to act as the phpBB administrator. For the [b]Admin Email Address use something like phpBB@<your email suffix> as this gets transmitted to all the people who register on your forum. (If you start receiving unwanted email via this, you can set up a phpBB mailbox to handle it). You also need to specify your forum administrator username along with a password for this account.
- Click Start Install.
Completing the installation
- Click Finish Installation.
- You will be told to delete the install and contrib subdirectories and you will not be able to use your forum until you have done this. This is easy to do from your telnet session, which we kept open for this purpose:
| username@cshell1 username $ cd <phpBB directory> username@cshell1 username $ rm -rf install (removes the install directory and all its contents) username@cshell1 username $ rm -rf contrib (removes the contrib directory and all its contents) You should also change the permissions on the config.php file: username@cshell1 username $ chmod 644 config.php You will now be able to browse to your phpBB forum. |
Post-installation tidying-up
The phpBB gzip file will still be sat in your home directory on the CGI server - it is no longer required and can be removed.
The space it takes on disk counts towards your allocation, plus you'll have an identical copy on your home machine. You can delete it as follows:
| username@cshell1 username $ cd .. (move up into the correct directory - note there is a space before the two dots!) username@cshell1 username $ rm -f php*.tar.gz (remove the php tar.gz file) |
Disconnecting from the CGI server
You can now exit from telnet:
| username@cshell1 username $ exit logout Connection to host lost. drive:\dir> exit (closes the Windows Command Prompt) |
Next Steps
- The installation is now complete and you should have a basic, but working, phpBB system.
- Use your browser to access your forum and log on with the Administrator Username and Administrator Password you specified in the installation.
- There should be a single forum, topic and test message displayed. To get your forum ready for use you'll now need to complete some 'administrative tasks' such as:
- Adding additional forums.
- Placing forums into categories.
- Naming your system.
To do these, click on the link at the bottom of the page. This takes you to the Administration Panel , from which all these activities, and more besides, may be completed.
Useful links: phpBB Administration, part of the phpBB Users Guide.
Acknowledgements
This document was originally hosted on the PlusNet Portal, and has been reproduced here at the request of PlusNet Staff.
Original Article by: csogilvie - Edited by: MauriceB
