BID18xx Implementation Guide

From BOARD18 Project WIKI
Revision as of 03:47, 23 October 2020 by Rich (talk | contribs) (Initial page contents)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

BID18xx is what could be called an "add on" to BOARD18.
It is the result of a separate project and will only be usefull for a few specific games.
This guide is directed at someone who wishes to install a copy on their own site.

This guide assume that you already have shell access to a server environment that is running Apache with PHP version 7.2 or later and MySQL version 5.6 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 this guide, 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 guide. So it will be assumed that this work has been done.

Where To Get BID18xx

The latest version of BID18xx is available as a zip file in this folder
Please always use the latest version.

The BID18xx Database

Before starting this task, 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.
The second or "bid18xx" 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 bid18xx web application will use this second username. It is called "bid18xx" 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 'bid18xx'@'localhost' IDENTIFIED BY 'bid18xx';
GRANT SELECT, INSERT, UPDATE ON bid18xx.* TO 'bid18xx'@'localhost';

Many web hosting providers (such as DreamHost) provide web pages (control panels) that have all the capabilities needed to create a database and its associated usernames.

Installing BID18xx

Perform these steps on your local PC

  • Download the zip file for the BID18xx version that you wish to install.
  • Using FTP or SCP, move this zip file 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.
  • If necessary, 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.
  • Rename the webroot/php/configTemplate.php file to webroot/php/config.php.
  • 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 BID18xx database.
    • Change the database user ID and password to the "BID18xx user" [see above].
    • Save the edited file.
  • Rename the webroot/php/configMailTemplate.php file to webroot/php/configMail.php.
  • 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.
  1. The installer of BID18xx 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 BID18xx DataBase

  • Start a command line window on the server.
  • Enter on the command line:
cd ~/utility
mysql -u username -p -h hostname databasename < bid18xxDB.txt
  • Note: The cd command above may have to be modified. The intent is to go to the utility directory.
  • The hostname, databasename, and (root) username should be modified to their appropriate values.
  • When prompted for a password, enter the appropriate password for the root user.

You should now have an empty BID18xx database. The table is defined but it is empty.