Run Psychostats with Wamp on a VPS along side your gameserver
In my last tutorial, I showed you how to install and run multiple gameservers on the cheap with a VPS. Today I will be explaining in detail on how to set up
Psychostats to work with those servers.
This is assuming you are running Wamp, as setup in my last tutorial.
Step 1: Download and install
ActivePerl into C:\wamp\bin\perl
Step 2: Download the DBD::MySQL Perl Package by
clicking here, if you need help installing refer to
this thread.
Step 3: Download Psychostats, I'm using the v3.2 build because it has
PsychoLive built right in.
Step 4: Put everything in the 'upload' directory into C:\wamp\www\stats Then create a MySQL database, you can do this with PHPMyAdmin but I broke my install of it so I'll teach you how to do it with command line..
Click the Wamp icon and then go MySQL>MySQL Console. Input your password if you have one then type in these commands..
Code:
create database stats
;
grant all privileges on stats.* to root@"localhost"
;
quit
I'm not 100%, but that should make you a new database that your root user should be able to use.
Step 5: Install Psychostats by going to
http://yourIPorDomain/stats/install and use the database you just made, that would be 'stats'. After install, delete the ../install folder and login to admin CP. Define your logsource as a local logsource. If you are using my previous tutorial, it would be C:\HLServer\[gamename]\..\logs\. Remember to add 'log on' into all your server.cfg files on the servers that are going to be running Psychostats.
Step 6: Now that the frontend is all good, you must do the backend. Put everything else in your downloaded psychostats folder into C:\wamp\stats then run edit stats.cfg in that folder to reflect your database settings. After that, run 'stats.pl' just as a test. If you see some things go by fast about days of the week then it works. If you see an error about DBD::MySQL, be sure to read that
thread I linked to above.
Step 7: If this all has worked so far, you are ready to move on to the easy part. Go to Control Panel and open Scedualed Tasks, create a new one and find stats.pl. Set it to run every day. At the end of the wizzard, click Advanced Options, then click the Schedule tab and click the Advanced button. Set it up like this..
[IMG]http://img155.**************/img155/378/testmv6.th.png[/IMG]
Windows will now update your stats every 5 minutes. You can change this to whatever you feel like, but if you have more then 1 update running at the same time you can really mess up your database, so not less then 1 per minute.
You now have a fully working Psychostats installation running alongside your gameserver on a VPS.
Enjoy
__________________