Windows Install (WAMP)
This guide was originally written by R3M on the HLX:CE Forums
Contents |
Introduction
This tutorial shows how to set up HLstatsX Community Edition "Step by Step" on a windows box. (aka Noobotorial or HLX CE for Dummies)
I want to say first that this is not the only way of setting up HLstatsX Community Edition. There are many ways of achieving this goal but this is the way I show. I do not issue any guarantee that this will work for you and you carry your own responsibility!
Prerequisites
Web Server
- Apache, PHP, MySQL and Windows basics
- a dedicated Windows box (2000/XP/2003/Vista/2008/7)
- a running Goldsource / EP1 or Orange Box engine based gameserver
- additional tools RDP or VNC / FTP Client / Notepad++
Game Server
- AMX Mod X (Goldsource)
- SourceMod (ep1 + orange box) recommended!
- BeetlesMod (ep1 + orange box)
- Mani Admin Plugin (ep1 + orange box)
- (only one is required)
SourceMod or AMX Mod X is recommended and should be already installed and running on the gameserver!
Required/Recommended Software =
- HLstatsX Community Edition - Download
- 7-zip - Download
- ActivePerl - [http://www.activestate.com/activeperl Download
- XAMPP - Download
- MaxMind GeoLiteCity.dat - Download
- SourceMod SuperLogs Plugin for detailed logging SuperLogs
Overview
HLX:CE is a modular statistics system and can be run on multiple servers or one a single server. It is not recommended to install the HLX:CE Daemon on your game server. However, many smaller sites are able to run with the daemon, database, web site and game server all running on one system. Your mileage may vary!
Installation
Preperation
- Download all the software and save it to your desktop.
- Install 7-zip, unpack HLX:CE and GeoLiteCity.dat.gz with it
- Create a folder in c:\hlxce and copy the content of scripts in
- Copy GeoLiteCity.dat to C:\hlxce\GeoLiteCity
- Now go back to C:\hlxce\ and create a batch file with editor hlxce_start.cmd, with this line in it perl hlstats.pl
- Save and close it. We will continue later at this point.
Installing ActivePerl
- Run the ActivePerl installer accepting the defaults.
- Launch the Perl Package Manager from the Start Menu
- Install the additional Perl extensions DBD-mysql and Geo-IP-PurePerl by choosing the View All Packages button and then searching for the modules. Right click on the module and choose Install <package name>.
- Now check the "Run marked actions", and confirm the installation.
- You will receive a confirmation that the packages have been installed. This completes the setup for ActivePerl
Installing XAMPP
- Launch the XAMPP Installer
- Unless you are installing to a different drive, accept the defaults. Do not create a portable installer. Once installation is complete you will receive a message that XAMPP is installed and ready for use.
- Enable the Apache and MySQL modules and then choose Start for both modules.
Configuring MySQL
MySQL is the database server used by HLX:CE to store statistics, user settings and game information. HLX:CE needs to be able to log in to your MySQL server, as well as have some basic information populated into a database. This section will help you configure the HLX:CE database username, password and database. We will also import the HLX:CE default database.
- Open your web browser and go to http://localhost/ and select your language.
- Select PhpMyAdmin under the Tools section.
- Select Permissions at the top of the screen and add a new user (for example, hlxce). This user will be used by the HLX:CE web site and HLX:CE Daemon to connect to the MySQL database. Do not use admin or root for the HLX:CE web site or HLX:CE Daemon.
NOTE: Be sure to have the option Create database with same name and grant all privileges enabled or your user will not be able to access the database!
- Next, select the new database on the left side of the screen. At the top of the screen, choose Import. Next, choose Browse and browse to the SQL\install.sql file extracted in the #Preperation section.
- After importing the default database, you should see a message similar to the image below.
NOTE: The number of queries executed will vary from version number to version number.
This completes the configuration for MySQL.
Install the HLX:CE web site
The HLX:CE web site provides the interface to the statistics you collect and generate while users are not in the game. In addition, certain functionality for in-game messages are provided via the web site (such as help). This section will help you install the HLX:CE web site files and configure it to use the MySQL Database
- In your C:\XAMPP folder, create a new folder called hlstatsx
- Copy the contents of the web folder into the folder created above.
- Open the config.php file using Notepad and configure the following settings:
- DB_NAME - The name of the HLX:CE database (in our example above, hlxce)
- DB_USER - The username to use when connecting to the database (in our example above, hlxce)
- DB_PASS - The password associated with the username created
- DB_ADDR - The IP address or FQDN (Fully-Qualified Domain Name) of the database server (if the web site and database are on the same box you can use localhost)
NOTE: Be sure to save these settings as they will be needed when configuring the daemon in the next step.
- Open your web browser and go to http://localhost/hlstatsx/. You should now see your newly installed HLX:CE web site.
- Next we will log in to the Administration Center and enable some games. At the bottom of the HLX:CE web site, click on the Admin link. You will be prompted to log in.
- Default Username: admin
- Default Password: 123456
- Click on the Games link
- All games come disabled by default. To enable a game, remove the checkmark next to the game labeled Hide Game.
- Now add a server for the game you just enabled. Choose Add Server after clicking on the heading for the game you enabled.
- Fill out the boxes as appropriate.
NOTE: Do not use localhost for your game server if it is running on the same system. Use the IP address your game server is set to use.
Repeat this process to add all of your game servers. Once complete, it is time to start the daemon.
Install and configure the HLX:CE Daemon
The HLX:CE daemon is the heart of the HLX:CE program. The daemon "listens" for log information from your game servers, processes it on the fly, and then inserts it into the MySQL database. It is also responsible for responding to events in game (such as a user typing rank or reporting a point change when a player kills another player). This section will help you install the HLX:CE daemon.
- Open the hlxce folder created earlier. Open the file hlstats.conf in Notepad. Configure the settings as we did in the previous step:
- DB_NAME - The name of the HLX:CE database (in our example above, hlxce)
- DB_USER - The username to use when connecting to the database (in our example above, hlxce)
- DB_PASS - The password associated with the username created
- DB_ADDR - The IP address or FQDN (Fully-Qualified Domain Name) of the database server (if the daemon and database are on the same box you can use localhost)
- Double click on the batch script we created earlier, hlxce_start.cmd. This will start the HLX:CE daemon.
- The daemon will appear in a black command prompt window. You should see some scrolling text as the daemon starts up.
Configuring your game server(s)
The last major step in installation is to tell your game servers to send their logs to the HLX:CE daemon. This step is relatively straight forward. You will need to know the IP address of your daemon.
- FTP to your game server (or browse to the directory it is installed in if running on your local computer) or access the Autoexec.cfg file via your GSP's control panel. Open the Autoexec.cfg file in a text editor and add the following lines:
- log on - This enables the logging features of your game server
- logaddress_delall - This removes any old or extra logging servers. If you are adding log servers somewhere else you can ignore this line.
- logaddress_add - This line tells the game server to send log files to this IP address on this UDP port. In our case, the HLX:CE daemon.
- Upload the hlstatsx.smx (or corresponding AMXModX plugin) to your game server. This plugin does not need any configuration. It simply provides additional commands the HLX:CE daemon will need to use when it issues RCON commands to your game server.
NOTE: You can also upload the SuperLogs plugin at the same time. SuperLogs adds additional log lines and weapon statistics. While not required for total functionality, it is highly recommended!
- Restart your game server so that the autoexec.cfg file can be loaded.
Completing Setup and verifying installation
At this point all the major components of HLX:CE should be operational. If you go back to your HLX:CE web site (http://localhost/hlstatsx/) you should now see your games and game servers you added. In addition, you should have information on which map they have running currently. If there are players on your servers, their information will slowly populate as well.
Troubleshooting
Here are some common issues we have found after installation:
- I see the game servers on the HLX:CE web site, but there is no data or it shows 0/0 players.
This is often caused by the game server not sending, or not able to send, the log files to the HLX:CE daemon. Here are some common things to check:
- Verify that the firewall on the server running the HLX:CE daemon has UDP port 27500 open.
- Verify that you have restared the game server.
- Access your game server's console and type log. Verify that logging is turned on.
- Access your game server's console and type logaddress_list. Verify that your HLX:CE daemon's IP and port number appear in the list.
- The Apache service will not start
This typically means that there is already another web server running on this system, such as IIS. Verify that there are no other web servers running on your server.
Additional help can be found in our FAQ and on our wiki.
The HLX:CE community is always available to help. More information about our forums and IRC can be found on our Community page.


































