Go Back   NoobGamers - Video Games Forum > General Topics > Tutorials

This is a discussion on How to install hlx community edition ( HLstatsX ) within the Tutorials forum.
In this tutorial i am going to show you how to install hlx community edition ...

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1  
Old 08-02-2009, 12:53 AM
NightLinks's Avatar
Noobgamers.com
Join Date: Oct 2007
Location: Bronx, NY
Posts: 3,591
My Mood:
Blog Entries: 17
NightLinks is on a distinguished road
Send a message via AIM to NightLinks
Default How to install hlx community edition ( HLstatsX )

In this tutorial i am going to show you how to install hlx community edition on a linux web hosting account without using ssh ( Secure Shell ). Your vps hosting account must have mysql, must be able to run .php scripts and perl. First you are going to download the latest hlx community edition package from the google code web page ( http://code.google.com/p/hlstatsxcommunity/ ). On the right handside click to download HLXCommunityEdition X.X.X FULL.zip ( The X's represent the number for the latest hlx package that is currently out now ) that's in the green box called Featured Downloads. Now save the download to your desktop. Before unzipping the hlx zip package create a folder on your desktop then name it HLX and unzip the files to the folder.

The zip file containts the following files/folders.

Folders
amxmodx
build
extras
perl
sourcemod
sql
web

Files
CHANGELOG.txt
CREATORS
IMAGES.txt
LICENSE
NOTES.hitbox

I would suggest to install hlx community edition on a vps server. I say this because hlx community edition needs to be running 24 hours a day 7 days a week and alot of hosting companies do not allow this in shared web hosting accounts because of server resources. Here at noobgamers.com we use Virpus Networks vps webhosting service to host our hlstatsx.

For this tutorial i am going to be installing hlstatsx on a vps hosting account that has a cpanel interface.

Mysql settings...

First you are going to create the database for hlx community edition. Login to your website control panel [Cpanel] and look for an icon that looks like the picture below called MySQL Databases.



Inside MySQL Databases you are going to create the database that's going to make hlxstatsx work on your webspace.



To create the database it's going to take 3 steps.

1. You need to give the database a name.

2. You need to create a user name and a password for the database.

3. You need to add a user to the database by clicking on the button.

NOTE: Write this stuff down because you're going to need it later on in the installation process...



Your MySQL Account Maintenance should look like the picture above.

You have now finished creating the MySQL Database part of hlx edition.

Uploading the hlx community edition database...

Now that you have created the database account for hlstatsx. You need to upload the database that's going to make it work. For this you need to go back to the control panel homepage and click on the phpMyAdmin icon ( see first picture ) or if you're using an older cpanel interface the link is right inside mysql at the bottom of the page.



On the lefthand side you are going to click on the name of the database you created. In the example above my database name is called "nbserver_testhlx".



Now you are going to click on the tab that says "Import". If you notice you won't be able to click on any other tab because of the red X.



In the "File to import" you are going to click on the "Browse..." button to locate the sql database file of hlx community editon. Find your way to the unzipped files of hlstatsx then double click on the sql folder. You are going to use the sql file that says install.sql then click the go button after you are done.



If everything goes right you will see "Import has been successfully finished, 116 queries executed." in a yellow box.

You are now done installing the database.

Editing the config.php file...

You need to edit the config.php file to have the info that you used for the mysql database. Go to the web folder of hlx and open config.php with wordpad.

Quote:
define('DB_NAME', 'sourcebans'); // Database name
define('DB_USER', 'root'); // The username to connect with
define('DB_PASS', 'Password'); // The password
define('DB_HOST', 'localhost'); // The host/ip to your SQL server
Only edit the parts that are in BOLD with the info that you used to create the hlstatsx database. Everything else can stay the same unless you need to change something go ahead. Once you are done save the config.php file and upload it to the server.

Last edited by NightLinks; 10-21-2009 at 07:39 AM.
Sponsored Links
  #2  
Old 08-02-2009, 12:53 AM
NightLinks's Avatar
Noobgamers.com
Join Date: Oct 2007
Location: Bronx, NY
Posts: 3,591
My Mood:
Blog Entries: 17
NightLinks is on a distinguished road
Send a message via AIM to NightLinks
Default

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.

Last edited by NightLinks; 01-29-2010 at 10:00 AM.
  #3  
Old 02-16-2010, 01:41 PM
NightLinks's Avatar
Noobgamers.com
Join Date: Oct 2007
Location: Bronx, NY
Posts: 3,591
My Mood:
Blog Entries: 17
NightLinks is on a distinguished road
Send a message via AIM to NightLinks
Default Frequently Asked Questions

1. I'm getting "HLSTATSX: No data since 120 seconds" in the log files?
If you get no data since 120 seconds in the log file it means that hlstatsx is being firewalled or You did not add the text to the autoexec.cfg file in your game server.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 08:07 AM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2008, Crawlability, Inc.