Difference between revisions of "How To Create a BOARD18 WEB Site"

From BOARD18 Project WIKI
Jump to navigation Jump to search
(→‎Load the BOARD18 Game Boxes: removed obsolete information)
Line 46: Line 46:
** Change MAIL_PASS to your mail user password on this SMTP server.
** Change MAIL_PASS to your mail user password on this SMTP server.
** Change MAIL_SENDER to the email address to which you wish replies to be sent.<ref>The installer of BOARD18 should create an Email address such as '''admin@my.site.org''' <br>and then use it to forward replies to an admin level player or to a group of admin level players.</ref>
** Change MAIL_SENDER to the email address to which you wish replies to be sent.<ref>The installer of BOARD18 should create an Email address such as '''admin@my.site.org''' <br>and then use it to forward replies to an admin level player or to a group of admin level players.</ref>
** Change MAIL_TLS to 'Yes'  if your SMTP server requires TLS. <ref>Note: Changing MAIL_TLS to 'Yes' may cause some older SMTP servers to reject your email.</ref>
** Save the edited file.
** Save the edited file.
* Edit the utility/config.php file.
* Edit the utility/config.php file.

Revision as of 12:48, 14 June 2018

How to create a BOARD18 web site using Linux

These instructions assume that you already have shell access to a server environment that is running Apache with PHP version 5.3 or later and MySQL version 5.5 or later. You first have to decide whether to create a new domain for the application or to put it on a sub directory of an existing domain. In the following instructions, the directory that you choose to use will be referred to as the "web root directory" regardless of whether it is "really" a root or not.

The work of setting up a domain is well documented and quite beyond the scope of this how to. So it will be assumed that this work has been done.

Some comments about the BOARD18 MySQL Database

Before starting this procedure, you will have to create a new (empty) MYSQL database on your DB server.
How to do this varies and is beyond the scope of this how to document.

But I do suggest that you create two usernames for access to this database. The first or "root user" should have complete access to the database and should be used to create and load it. This is the username that you will put in the config.php file in the utility sub directory [see below]. The second or "board18 user" should be limited to select, insert and update access. This is the username that you will put in the config.php file in the php sub directory of the web root directory. The board18 web application will use this second username. It is called "board18" in the supplied php/config.php file. The following commands can be used to create this username if the database resides on the web server:

 
CREATE USER 'board18'@'localhost' IDENTIFIED BY 'board18';
GRANT SELECT, INSERT, UPDATE ON board18.* TO 'board18'@'localhost';

Many web hosting providers [such as dreamhost] provide web pages that have all the capabilities needed to create a database and its associated usernames.

Perform these steps on your local PC

  • Browse to the download page and download the zip file for the BOARD18 version that you wish to have.
  • Using FTP or SCP, move this zip file to your web server.
  • Create an empty folder (directory) for game boxes.
  • For each game box that you wish to install in board18, browse to the game box download page and download the zip file for that game box into this folder.
  • Using FTP or SCP, move this folder to your web server.

Perform these steps on your Linux web server

  • Create the MySQL database. See above.
  • Extract uploaded .zip file [see above] into your shell root directory.
  • Move the contents of the webroot sub directory of the extracted directory to your web root directory.
  • Create a utility directory in your shell root directory.
  • Move the contents of the utility sub directory of the extracted directory to this new utility directory.
  • Edit the webroot/php/config.php file.
    • Change DB_HOST only if your DB server is different from your web server.
    • Change DB_DATABASE to the name you gave to your BOARD18 database.
    • Change the database user ID and password to the "board18 user" [see above].
    • Save the edited file.
  • Edit the webroot/php/configMail.php file.
    • Change MAIL_HOST to point to your SMTP server.
    • Change MAIL_USER to your mail user name on this SMTP server.
    • Change MAIL_PASS to your mail user password on this SMTP server.
    • Change MAIL_SENDER to the email address to which you wish replies to be sent.[1]
    • Change MAIL_TLS to 'Yes' if your SMTP server requires TLS. [2]
    • Save the edited file.
  • Edit the utility/config.php file.
    • Change DB_HOST only if your DB server is different from your web server.
    • Change DB_DATABASE to the name you gave to your BOARD18 database.
    • Change the database user ID and password to the "root user" [see above].
    • Save the edited file.
  1. The installer of BOARD18 should create an Email address such as admin@my.site.org
    and then use it to forward replies to an admin level player or to a group of admin level players.
  2. Note: Changing MAIL_TLS to 'Yes' may cause some older SMTP servers to reject your email.

Load the BOARD18 DataBase

  • Start a command line window on the server.
  • Enter on the command line:
cd ~/utility
mysql -u username -p -h hostname databasename < board18db.txt
  • Note: The cd command above may have to be modified. The intent is to go to the utility directory.
  • The hostname (DB_HOST), databasename (DB_DATABASE) and username should be those specified in the utility/config.php file.
  • When prompted for a password, enter the password specified in the utility/config.php file.

You should now have an empty BOARD18 database. All the tables are defined but they are all empty.
The only table that must be preloaded with data is the game box table.

Create the initial BOARD18 admin player

  • Browse to your new board18 web site. You will see a Login form on the welcome page.
  • Press the REGISTER button. You will then see a Register form on the welcome page.
  • The first player that is registered in a new BOARD18 web site is automatically made an admin player.

Load the BOARD18 Game Boxes

This process is described in detail here.

How to create a BOARD18 web site using Windows

If you have a Windows environment please modify the above Linux instructions, test them and then enter them here.

How to create a BOARD18 web site using a MAC

If you have a MAC environment please modify the above Linux instructions, test them and then enter them here.