===================

 VI. Installation:

===================

 

---------------------------------------------------------------------------

          »» See section IX for upgrading your existing YapBB. ««

---------------------------------------------------------------------------

 

Installation of YapBB is pretty easy. First, unzip the package to a temporary directory. (If you are reading this, you have probably already done that J). Next, move the newly created subdirectory ‘YapBB’ to somewhere on your webserver (generally the 'document root'). Your forum now resides in the YapBB subdirectory. Of course you can name your forum directory to something else. For unzipping on Windows platforms, we recommend using a tool like WinZIP (http://www.winzip.com/). For Linux you can use the Midnight Commander (type 'mc' in a console or terminal).

 

Next, you have to build the database which will be used. Open up the file setup.sql for a list of the required queries and feed those queries to the MySQL server. You can either use phpMyAdmin to do this the easy way, or do it the oldfashioned way. ;) Be sure to check the names of the tables in 'setup.sql' and alter them appropriatly if needed.

 

To build the database, without using phpMyAdmin, open a console/DOS-window and change to the directory where the mysql binaries/executables are located. Next, type the following:

 

    mysql -u root -pPASSWORD -D nameOfDatabase < setup.sql

 

Change 'root' to the name you will be using, 'PASSWORD' to the appropriate password and 'nameOfDatabase' to the name of the database YapBB will be using (default: 'YapBB'). Also make sure setup.sql is in the current directory or preppend a full path to it, so that MySQL can find the file. Note that it may vary whether or not there should be a  between '-p' and 'PASSWORD' or '-u' and 'root'. Check the MySQL documentation for details (http://www.mysql.com/documentation/). If you simply use '-p' and leave out 'PASSWORD', MySQL should prompt you to enter a password.

 

 

As of YapBB 1.2, there’s a new script file (‘update_search_table.php’) which can be used to automatically update the search index table. It is recommended not to place this file inside the document root of the webserver, as it should not be accessible to the public. Make sure you properly include your YapBB’s ‘config.inc.php’ in this script (check line 1). The idea of this script is to have it run as a cron job, pherhaps nightly when traffic is low. For information on adding a cron job on a Linux machine, check here: http://hoth.stsci.edu/man/man1M/cron.html and here: http://hoth.stsci.edu/man/man1/crontab.html. On Windows systems you can of course use the Task scheduler. Just add a new task with this command to execute: [drive]:[full path to php]\php.exe [full path to script]\update_search_table.php (eg: d:\phpdev\php\php.exe c:\program files\ update_search_table.php)

 

In case it is not possible to let this script run automatically, you can pherhaps periodically run this script yourself, or place it inside a protected directory on the webserver. Alternately, you can also execute this function from the YapBB control panel.