Uploading files to web hosting...
Assuming that you already have a top level domain name (
GoDaddy.com
) with a website already running. You need to know where you would like to install hlx first. Either to a sub domain of your top level domain name.
Example...
STATS.yourdomainnameclan.com
or in a folder called stats.
Example...
yourdomainnameclan.com/STATS
For my example test install of hlstatsx i created a folder called stats and i will use "noobserver.com/STATS" as my example.
You need to connect to your web hosting account ftp server to upload the files/folders to the folder you created.
In the web folder you are going to upload the following files/folders.
Folders
css
hlstatsimg
includes
pages
styles
Files
autocomplete.php
config.php
favicon.ico
hlstats.
css
hlstats.php
index.php
ingame.php
show_graph.php
sig.php
status.php
For security reasons you are suppose to upload the perl folder one level above public_html folder. Upload the perl folder to where you see the public_ftp, tmp, www, etc... folders.
At this point you should have all the files/folders uploaded to the web host ftp server to the folder you created.
File path / File permissions...
For this installation of hlstatsx i did something different after i uploaded all of the files/folders. I went straight to the file manager in cpanel and i added the database info to hlstats.conf, file path to hlstats.pl, hlstats-awards.pl, hlstats-resolve.pl, run_hlstats and run_hlstats_multi files that are in the perl folder instead of doing it on my computer.
You need to contact your web host for the correct path to your public_html folder.
TIP: To know your correct file path click on one of the .pl check box then click on the edit link in the top menu. On the top to the left you will see the full path to the perl folder where it says editing.
Example...
/home/admin/perl/
Once you have the file path you need to edit each file.
For hlstats-awards.pl, hlstats-resolve.pl, hlstats.pl files you will need to add the file path to $opt_configfile and $opt_libdir. Do not erase /hlstats.conf from $opt_configfile because that's how perl is going to connect to the hlx database.
Quote:
##
## Settings
##
# $opt_configfile - Absolute path and filename of configuration file.
$opt_configfile = "/home/admin/perl/hlstats.conf";
# $opt_libdir - Directory to look in for local required files
# (our *.plib, *.pm files).
$opt_libdir = "/home/admin/perl/";
|
For run_hlstats, run_hlstats_multi files you only need to add the file path to CD.
Quote:
# Set the path to the scripts folder (you should not need to modify this.)
confdir=home/admin/perl/
|
The last file you need to edit is hlstats.conf In this file you will need to add the database information you already have in config.php file.
NOTE: If you have a port problem you can comeback to hlstats.conf file and change the port number 27500 to another number.
Once you have edited the hlstats.conf the last thing to do is change the permissions of the files you have just edited from 644 to 755 or 777.
hlstats-awards.pl
hlstats-resolve.pl
hlstats.pl
run_hlstats
run_hlstats_autorestart
run_hlstats_multi
Uploading files to game server...
You are now ready to upload the files needed for hlstats to work in your game server. If you're running amxmodx then you upload the folders that are inside the amxmodx folder to the amxmodx folder in your game server addons folder ( assuming that you have amxmodx installed already ).
If you're running sourcemod then upload the folders that are inside the sourcemod folder in the hlx package to the sourcemod folder in your game server addons folder ( assuming that you have sourcemod installed already ).
Autoexec file...
Go into your /cfg folder of your game server and download or create a file called "autoexec.cfg" and either edit or copy the following 3 lines.
log on
logaddress_delall
logaddress_add xxx.xxx.xxx.xxx:27600
Replace the xx's with the domain name or ip number where the database is located. Log on will collect the log information that hlstatsx needs to display player ranks in your screen and also in the hlx website.
Once you are done uploading all of the files restart your game server.
Setting up cron jobs...
The last part of the installation is to start hlstatsx so that it can collect player information to display it for players that visit the website looking for their stats.
Now look for the cron jobs icon in the cpanel homepage of your web hosting account. It's at the advanced box at the bottom of the page.
To know if hlstatsx is setup correctly enter your email where it says "Please enter an email address where the cron output will be sent". The email that is sent by cron jobs will let you know if there's a problem with the hlx.
Now we are going to use the follow 2 perl commands in cronjobs to start hlx community edition.
Quote:
perl && ./run_hlstats start
perl && ./hlstats-awards.pl
|
Since we already know the filepath to the perl folder. We only need to add "cd" to the front of the filepath.
Example...
cd /home/admin/perl && ./run_hlstats start
cd /home/admin/perl && ./hlstats-awards.pl
The command run_hlstats start will keep hlstatsx running at all times.
The command hlstats-awards will collect player awards once every 24 hours.
In the image above i setup cronjobs to run ./run_hlstats start
Minutes = 1
Hours = Every Hour
Days = Every Day
Weekdays = Every Week Day
Months = Every Month
I also setup cronjobs to run ./hlstats-awards
Minutes = 0
Hours = 0 12 AM/Midnight
Days = Every Day
Weekdays = Every Week Day
Months = Every Month
Once you are done setting up cron jobs click on the Save Crontab button to exit.
Now all you need to do is wait for the first email to be sent to your inbox by cron jobs to see if everything was installed correctly. You will receive an email from cronjobs every hour to let you know that ./run_hlstats start is running. You will also receive another email from cronjobs once a day to let you know that ./hlstats-awards was run at 12:00 am midnight.
You are now done installing
hlx community edition.
To see our hlstatsx running click on the stats button on the top menu.