|
发表于 2004-7-11 15:46:01
|
显示全部楼层
来自 中国–山东–东营
==============================================================================
* UCStats - A stats generation program for Half-Life games.
* Copyright (c) 2003 Mike Cao <mike@mikecao.com>
==============================================================================
Contents:
I. Requirements
II. Program Structure
III. Installation
IV. Collecting Stats
V. Live Feed
VI. Notes
==============================================================================
I. Requirements
1. Half-Life Server
2. Counter-strike Mod <www.counter-strike.net>
3. Web Server with PHP and mySQL support
4. PHP4+ (with sockets and GD enabled) <www.php.net>
5. MySQL 3.23+ <www.mysql.com>
6. AMX Mod 0.9.3+ (with csstats and udp enabled) <www.amxmod.net>
==============================================================================
II. Program Structure
/UCStats
/config -> Program and game config files
/includes -> Required functions and procedures
/logs -> Debug and misc log files
/plugins -> AMX plugins
/run -> Used by the program
/templates -> Template files
/default -> Default template
/web -> Files for the web server
/admin -> Administration panel
/cache -> Cached web documents
/images -> Images for the web pages
/hits
/icons
/maps
/weapons
==============================================================================
III. Installation
The following instructions assume that you know how to run and configure
a Half-Life Server with AMX Mod, a webserver with PHP support, and how to
administer a MySQL database. If you need help with any of the required
programs please refer to that program's documentation.
1. Configure PHP to have sockets and GD enabled.
For Windows users:
You must have the PHP directory in your Path environment to
allow PHP to be run from anywhere. To do this:
a. Go to Settings -> Control Panel -> Advanced ->
Environment Variables -> System Variables.
b. Select the variable that says Path.
c. Edit the value to include your PHP directory.
d. Try running PHP from anywhere. You should see the PHP version text.
ex. C:\> php -v
2. Copy the UCStats program files to your server. Do not place the
program files in a web accessible folder.
3. Create a database in MySQL.
ex. C:\mysql\bin> mysqladmin create ucstats
4. Import the SQL file ucstats.sql to create the required tables
in the database.
ex. C:\mysql\bin> mysql ucstats < ucstats.sql
5. Import the SQL file for your mod.
ex. C:\mysql\bin> mysql ucstats < cstrike.sql
6. Run the "install.php" script from the command line.
ex. C:\UCStats> php -q install.php
7. Open a browser and go to your stats webpage. Click the "Admin"
link to access the web administration panel. The login is "admin"
and the password is "password". You should change your password
after you log in the first time.
Note: The admin panel uses PHP session handling for security. You
must have this properly enabled in your php.ini. Look for the
session.save_path value and modify it accordingly.
ex.
; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
session.save_path = /tmp
8. From the admin panel, add your servers to the Server Registry.
9. Make sure you have the CSSTATS module installed for AMX.
10. Compile and install the "ucstats_cstrike.sma" plugin under the plugins
directory into AMX.
==============================================================================
IV. Collecting Stats
There are 2 ways to collect stats for UCStats: Local and Remote
Choose the best one for your setup. Instructions are below for each method.
------------------------------------------------------------------------------
Local:
The web server and game server are at the same location. You run a parser
script which looks for log files in a given directory and parses the data
into a database.
1. Make sure the server you are parsing stats for is registered
in the Server Registry. You can do this from the admin panel.
2. Run the the parser script "parser.php" from the command line.
ex. C:\UCStats> php -q parser.php c:/logs 192.168.0.2:27015
The "c:/logs" is the directory of log files. The "192.168.0.2:27015" is the ip
addresss the logs belong to. If you enter in a path to a file the parser will
parse just that one file.==============================================================================
V. Live Feed
The live feed module allows you to get a live status of your servers.
By default the live feed module is off. Installation instructions are
below:
1. Make sure you have the UDP module installed for AMX.
2. Enable live feed through the admin panel. The config is under:
Admin Panel -> Configuration -> Program Settings -> Live Feed Settings
If you enable live feed, you must fill in the live feed address and live
feed password fields.
3. Add the cvar "ucstats_live_ip" and "ucstats_live_port" to your AMX config
file. These should match the values you entered in the previous step.
ex. ucstats_live_ip "1.2.3.4"
ucstats_live_port 29000
4. Compile and install the "ucstats_live.sma" plugin into AMX. You'll need
the upd.inc file that comes with the UDP module in order to compile.
5. Run the live feed daemon script "lived.php" from the command line.
ex. C:\UCStats> php -q lived.php
6. Start your server..
上面是安装说明,我做完了,自已慢慢看,
用的是UCSTATS |
|