SRCDS Steam group


installing hlx comm edition on cpanel with no SSH access
#1
I made this tutorial for visitors that want to install hlx community edition but have no SSH access to install it or just don't like using it like me.

http://noobgamers.com/forum/tutorials/2587-how-install-hlx-community-edition-hlstatsx.html

Here's a little snippet...

Quote: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, 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 files then edit the file. On the top you will see the full path to the perl folder.

Example...

/home/admin/perl/

Once you have the file path you need to edit each file.

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 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:# set your correct HLstatsX perl path
cd /usr/local/games/hlstatsx/perl

For run_hlstats, run_hlstats_multi files you only need to add the file path to CD.

Quote:# set your correct HLstatsX perl path
cd /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.

[Image: advanced.jpg]

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

The command run_hlstats start will keep hlstatsx running at all times.
The command hlstats-awards will collect player awards once every 24 hours.

[Image: cronjob.jpg]

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)