Welcome to the THT Installation Guide! This installation guide will show you step-by-step how to install TheHostingTool on your WHM server! A gallery of the installation steps is available below.
- 1 Step 1: Upload
- 2 Step 2: Create Database
- 3 Step 3: Install
- 4 Step 4: Finished!
- 5 Upgrades
- 6 Post-install Configuration
- 7 Galleries
Step 1: Upload
Method A: cPanel
You can use cPanel's File Manager to upload and extract the THT archive. Log into cPanel, enter the File Manager, navigate to the folder you want to install THT to, and click on Upload. Upload the file and go back to the File Manager. Click on the file, extract the archive and remove the documentation and ZIP archive. Enter the 1.2 folder created, select all files, move it to the directory you'd like THT to be in, navigate to the folder, then remove 1.2
Method B: FTP
Extract the 1.2 folder from the archive. Open it in your file manager (Windows Explorer, for example) and drag-and-drop all the contents into an FTP window. The FTP window should be connected to your server on your WHM site, and should be navigated to the folder you want TheHostingTool to be in. Filezilla is an FTP client you can use. On Linux, you will need to navigate to the folder you extracted the files to in the left-hand panel, then drag-and-drop the files and folders in.
Step 2: Create Database
Using phpMyAdmin, cPanel, command-line, etc., create a database for TheHostingTool. We'll name ours "THT" for our tutorial.
Step 3: Install
Open up your browser and load the site where THT is being set up. We will be in, let's say, http://localhost/tht
If it tells you to, make sure you create a conf.inc.php file manually and chmod it to 666. Make sure that the installer is set to "Install" and not "Upgrade." Click Next. You will be asked for MySQL details. For our example:
- Hostname: localhost
- Username: root (do not use root when actually setting up THT!)
- Password: (none) (add a password when actually installing THT!)
- Database: tht
- THT Prefix: tht_ (this doesn't have to be changed)
THT will now insert the data it needs to operate. Once that is completed, you will be in Step 4. For the THT URL, we need to use http://ourdomain.com/tht/ since we need the trailing slash and we can't use localhost as THT will link to localhost, which does not exist for most or all of your clients. Set up your username, password, email and name and you should be done!
Step 4: Finished!
You are now finished with your THT installation. You can now browse your THT site and begin configuring it (see below).
When upgrading, go to Step 3, but instead of selecting "Install" at the first step, select "Upgrade." Each upgrade may require removing or uploading new files. Read the Readme file in each upgrade before you proceed. Please also note any instructions given in the release post on the community forums.
Step 1: Servers
Go to http://ourdomain.com/tht/admin/ and log into the Admin CP in TheHostingTool. In the Sidebar Menu is an entry for Servers. Enter the Server configuration area and click on "Add Server." Name your server (we will name ours Node 1) and use localhost for your server. Change this if it needs to be changed, but it doesn't have to be changed most of the time. For the username, use your reseller username. If you use DirectAdmin, set the type accordingly. If you use cPanel/WHM, change the type to cPanel/WHM.
Method A: DirectAdmin
If you are using DirectAdmin, for password, enter your reseller password.
NOTE: This section may need improvement. The author does not have DirectAdmin.
Method B: WHM
For Access Hash, enter the hash you got from WHM. If you do not have an Access Hash, log into WHM, enter Cluster/Remote Access and go to Setup Remote Access Key. Generate a new access hash, copy it to your clipboard, then paste it into THT.
Step 2: Subdomains
While still in THT, go to the sidebar menu and enter Subdomains. For each domain you have (let's say we have domain1.com and domain2.org), go to Add Subdomain and enter the domain in the Domain field. Let's say we're using cPanel/WHM and have 5 different nodes. We can associate a different domain with a different node.
Step 3: Packages
Now go to the sidebar menu and go to Packages. For each package you have in WHM or DirectAdmin, go to Add Packages. For the name, put whatever you want. Let's put Package A. For backend, put the name of the package assigned in WHM/DirectAdmin, for example whmhost_A. Put whatever you want for the description. The space, bandwidth and number of databases would be great. For type:
- Free -- no payment required
- Post2Host -- users must post a certain number of posts on your forum per month
- Signup Posts: Users must have this many posts when they sign up
- Monthly Posts: Users must have this many posts every month
- Paid -- Users must pay with legal currency
If we had more than one node, we'd select that node. Let's say we only have Node 1, so we leave it at Node 1. If you want to vaidate each request, check Admin Validation. If it is a reseller, check the reseller box. You can now add the package.
Step 4: Install the Cron Job
To set up the cron job to update Post2Host/Paid Invoices, go into cPanel, scroll down to Advanced, and select Cron Jobs. Assuming you're using cPanel 11.25, under "Add New Cron Job,":
- For Common Settings: Select Twice a day (0 0, 12 * * *)
- For Command: For most users, this will be "php -q /home/[username]/public_html/[tht_directory]/includes/cron.php"
- Remember to substitute the appropriate values where you see brackets
- If php -q does not work, try php -f