搜索
查看: 9742|回复: 8

2个礼拜的奋战,终于把这个个战地2的rank搞出来了

[复制链接]
发表于 2007-9-25 20:45:23 | 显示全部楼层 |阅读模式 来自 湖北十堰
2个礼拜的奋战,终于把这个战地2的rank搞出来了
大家可以到我们=M=的服务器 61.183.32.7:16567 玩玩,打rank啊!

英文的:
===============================================================
BF2Statistics 1.4 - Private Statistics System for Battlefield 2
===============================================================
Released by: The Shadow (based on the work of MrNiceGuy, Chump, nylOn, Wolverine, and others)
Release date: 2006-10-16
Release version: 1.4.2
License: GNU General Public License
Support URL: http://www.bf2statistics.com/
Release Author: The Shadow
Author Email: shadow42@iinet.net.au
Author URL: http://www.shadowlans.com/
=====================================
Main Readme (_readme.txt) is in /ASP/
=====================================
Requirements:
=============
- Battlefield 2 Server (patch 1.2+)
- XAMPP/Apache/IIS5+
- PHP 4.4.x or PHP 5.1.x
- MySQL 4.x or MySQL 5.x
Note: IIS requires you to add/edit the file type ?aspx?to use PHP instead of the standard ASP.NET.
This should be configured the same way as ?php?file types.

Helpful Resources:
==================
As can be seen above this system reliese on technologies from around the Internet. Here's a brief list
web sites that you may find helpful in setting you this system:
PHP: http://www.php.net/
MySQL: http://www.mysql.com/
Apache: http://www.apache.org/
XAMPP: http://www.apachefriends.org/en/xampp.html

New Installations:
==================
If you are new to BF2Statistics, then this what you need to know to get your own private statistics
system operational. Before proceeding, please ensure you have your web server operational with PHP &
MySQL installed and tested!
For those unsure how to do this, try XAMPP from Apache Friends (http://www.apachefriends.org/en/xampp.html).

Database Server (MySQL):
------------------------
1. Install MySQL 4 or MySQL 5
2. Create New Database (ie, bf2stats)
3. Create New DB User Account (ie, bf2statslogger)
4. Grant DBO (Database Owner) rights to new user account
5. Grant Global Right 'FILE ACCESS' (for database backups within Web Admin: OPTIONAL)

Web Server (PHP):
-----------------
1. Install Web Server (ie, Apache, IIS, other...) with PHP support.
2. Configure PHP to support the following extensions:
- MySQL
- CURL (or set "allow_url_fopen = 1")
3. Create a "/ASP/" directory in the root of your web server. Default locations:
IIS ==> "C:/InetPub/wwwroot"
Apache ==> "C:/Program Files/Apache Group/Apache2/htdocs" ==or== /usr/local/httpd/htdocs
XAMPP ==> "C:/Program Files/XAMPP/htdocs" ==or== /opt/lampp/htdocs/
4. Copy contents of "/ASP/" in archive to the location above (including ALL sub-directories)
5. Ensure the following files/directories har read/write access by PHP (CHMOD 777):
/ASP/_config.php
/ASP/_config.php.bak (for config backups)
/ASP/_backup
/ASP/logs
/ASP/logs/_processed
6. Config your web server to process .aspx files as PHP files. For Apache based systems this should
be automatic (via the .htaccess file). For IIS (and others?) you will have extra work to do.
For IIS6 users (IIS5.x systems should be similar...):
a. Start "Internet Information Services" Manager
b. Navigate to your web site (ie, "Default Web Site"), right-click t and choose properties
c. Select the "Home Directory" tab
d. Click "Configuration..."
e. In the "Applications Extensions" list edit .aspx (if it doesn't exist, simply add it)
f. Change the "Executable" to be the same as what your .php files use (ie, C:\PHP\php.exe,
C:\PHP\php4isapi.dll, or C:\PHP\php5isapi.dll)
g. Set "Verbs, Limit to:" to GET,POST,HEAD
h. OK all windows. Done!
7. With a Web Browser, browse to: http://localhost/ASP/
Note: If you are browsing from a remote machine, please chnage the value of $admin_hosts
in /ASP/_config.php to include your IP address.
8. Login to the Web Admin (Defaults: admin / password)
9. Select the "Install DB" link
10. Enter the database details defined above in the "Database Server" section
11. Select "Confirm"
12. Click "Process" (this may take a few minutes depending on the speed of your systems)
13. Review the response for any errors
14. If ALL is good, click the BF2 Logo and you should now have a FULL menu!
15. Select the "Edit Config" link. Update your configuration as desired (Make sure you "Update" it!)
Note: Set the "Error Level" to "Detailed (4)"
16. Select the "Test Config" link. Confirm that you want to proceed. The script will now perform
some basic tests on the Web Server components.
17. Review the test results. With luck everything should pass (warnings are OK, it usually just means a
log file or something hasn't been created yet).

Game Server (Battlefield 2):
----------------------------
1. Make a backup of the following folder:
"<Battlefield 2 Server Path>/python/bf2"
2. Copy the contents of "/python/bf2" to "<Battlefield 2 Server Path>/python/bf2" (including sub-
directories), overwrite existing files. This release supports BOTH BF2 and BF2:SF; the scripts
will detect which MOD is running.
3. Using a text editor, open "python/bf2/BF2StatisticsConfig.py"
4. Change the configuration options to suit your needs. Specifically, change the "Backend Web Server"
setting to match your configuration.
WARNING: Even though you can change the "port" and "ASP" settings, this not recommended as BF2
itself will *NOT* support this! You've been warned!
5. In the configuration file, set "debug_enable = 1"
6. Edit your server configuration files (ie, "<BF2 Server Path>/mods/bf2/settings/ServerSettings.con"
& "<BF2 Server Path>/mods/bf2/settings/maplist.con") as desired.
7. Redirect "BF2web.gamespy.com" to resolve to your web server's IP address:
- Windows Servers, use the "/Utils/BF2PrivateStats.vbs" script file contained within this archive.
a. Copy "/Utils/BF2PrivateStats.vbs" & "/Utils/SetACL.exe" to "<Battlefield 2 Server Path>"
b. Using a text editor, edit the "strLookupAddr" value to match your web server. This can be
set to a valid DNS host name or and IP Address. Also, change "strBF2exe" to match the file
used to launch your server (ie, bf2_w32ded.exe)
c. Use this script to start your BF2 server. All command-line paramters are passed directly
to BF2.
- For Linux servers, you will have use a DNS redirect spoof (all Linux admins know how to do
this right?)
8. Start your Battlefield 2 Server (it should start without any errors).
9. Check the contents on the log file generated (default location "/python/bf2/logs/"). Look for any
obvious erros.

Game Client (Battlefield 2):
----------------------------
1. Redirect "BF2web.gamespy.com" to resolve to your web server's IP address:
Note: This *ONLY* works on systems using the NTFS file system!!!
a. Copy "/Utils/BF2PrivateStats.vbs" & "/Utils/SetACL.exe" to "<Battlefield 2 Path>"
b. Using a text editor, edit the "strLookupAddr" value to match your web server. This can be set
to a valid DNS host name or and IP Address. Also, change "strBF2exe" to match the file used
to launch your game (ie, bf2.exe)
c. Use this script to start your BF2 game. All command-line paramters are passed directly to BF2.
2. Play and have fun! :)
3. After you have completed one round of play (a player voted map change will speed this up). Check
BFHQ within the game. If all is working as it should, you will find stats data from your game.
If not, then go through the troubleshooting section later in this guide.
4. If all is good, set the "debug" options on both servers back to defaults!

Upgrade Existing Install:
=========================
If you already have BF2Statistics operational, then you've already done all the hard work getting this
system operational. The following guide should allow you to successfully upgrade to this version:
WARNING: Before proceeding Backup your exisitng system!!! If something goings wrong, you can always go
back and try again later! This IS *CRITICAL*!!!!
Database Server (MySQL):
------------------------
1. Backup your existing BF2Statistics database! Can't say this enough!!!
2. Verify the account used to access this database has DBO (Database Owner) rights!
3. Grant Global Right 'FILE ACCESS' (for database backups within Web Admin: OPTIONAL)

Web Server (PHP):
-----------------
1. Backup your existing "/ASP/" directory! Default locations:
IIS ==> "C:/InetPub/wwwroot"
Apache ==> "C:/Program Files/Apache Group/Apache2/htdocs" --or-- /usr/local/httpd/htdocs
XAMPP ==> "C:/Program Files/XAMPP/htdocs" --or-- /opt/lampp/htdocs/
2. Esure PHP supports the following extensions:
- MySQL (it was already working, this should already be set)
- CURL (or set "allow_url_fopen = 1")
3. Remove the current contents of "/ASP/" (Note: the config file is different and it's easier just
to re-create it)
4. Copy contents of "/ASP/" in archive to the location above (including ALL sub-directories)
5. Ensure the following files/directories har read/write access by PHP (CHMOD 777):
/ASP/_config.php
/ASP/_config.php.bak (for config backups)
/ASP/_backup
/ASP/logs
/ASP/logs/_processed
6. Ensure your web server processes .aspx files as PHP files (should already be done, but can't hurt
right?). For Apache based systems this should be automatic (via the .htaccess file). For IIS
(and others?) you will have extra work to do.
For IIS6 users (IIS5.x systems should be similar...):
a. Start "Internet Information Services" Manager
b. Navigate to your web site (ie, "Default Web Site"), right-click and choose properties
c. Select the "Home Directory" tab
d. Click "Configuration..."
e. In the "Applications Extensions" list edit .aspx (if it doesn't exist, simply add it)
f. Change the "Executable" to be the same as what your .php files use (ie, C:\PHP\php.exe,
C:\PHP\php4isapi.dll, or C:\PHP\php5isapi.dll)
g. Set "Verbs, Limit to:" to GET,POST,HEAD
h. OK all windows. Done!
7. With a Web Browser, browse to: http://localhost/ASP/
Note: If you are browsing from a remote machine, please chnage the value of $admin_hosts
in /ASP/_config.php to include your IP address.
8. Login to the Web Admin (Defaults: admin / password)
9. As the config file is unlikely to know your database details yet, it will highlight the "Install DB"
link. Simply ignore this and select "Upgrade DB"
10. Enter the database details defined above in the "Database Server" section
11. Select "Confirm"
12. Click "Process" (this may take a few minutes depending on the speed of your systems)
13. Review the response for any errors.
Note: if your previous system was running a 1.3 release, then it is most likely you will see some
errors. This is normal and expected.
14. If ALL is good, click the BF2 Logo and you should now have a FULL menu!
15. Select the "Edit Config" link. Update your configuration as desired (Make sure you "Update" it!)
16. Select the "Test Config" link. Confirm that you want to proceed. The script will now perform
some basic tests on the Web Server components.
17. Review the test results. With luck everything should pass (warnings are OK, it usually just means a
log file or something hasn't been created yet).

Game Server (Battlefield 2):
----------------------------
1. Make a backup of the following folder:
"<Battlefield 2 Server Path>/python/bf2"
2. Copy the contents of "/python/bf2" to "<Battlefield 2 Server Path>/python/bf2" (including sub-
directories), overwrite existing files. This release supports BOTH BF2 and BF2:SF; the scripts
will detect which MOD is running.
3. Using a text editor, open "python/bf2/BF2StatisticsConfig.py"
4. Change the configuration options to suit your needs. Specifically, change the "Backend Web Server"
setting to match your configuration.
WARNING: Even though you can change the "port" and "ASP" settings, this not recommended as BF2
itself will *NOT* support this! You've been warned!
5. In the configuration file, set "debug_enable = 1"
6. Edit your server configuration files (ie, "<BF2 Server Path>/mods/bf2/settings/ServerSettings.con"
& "<BF2 Server Path>/mods/bf2/settings/maplist.con") as desired.
7. Redirect "BF2web.gamespy.com" to resolve to your web server's IP address:
- Windows Servers, use the "/Utils/BF2PrivateStats.vbs" script file contained within this archive.
a. Copy "/Utils/BF2PrivateStats.vbs" & "/Utils/SetACL.exe" to "<Battlefield 2 Server Path>"
b. Using a text editor, edit the "strLookupAddr" value to match your web server. This can be
set to a valid DNS host name or and IP Address. Also, change "strBF2exe" to match the file
used to launch your server (ie, bf2_w32ded.exe)
c. Use this script to start your BF2 server. All command-line paramters are passed directly
to BF2.
- For Linux servers, you will have use a DNS redirect spoof (all Linux admins know how to do
this right?)
8. Start your Battlefield 2 Server (it should start without any errors).
9. Check the contents on the log file generated (default location "<BF2 Server Path>/python/bf2/logs/").
Look for any obvious erros.

Game Client (Battlefield 2):
----------------------------
1. Redirect "BF2web.gamespy.com" to resolve to your web server's IP address:
Note: This *ONLY* works on systems using the NTFS file system!!!
a. Copy "/Utils/BF2PrivateStats.vbs" & "/Utils/SetACL.exe" to "<Battlefield 2 Path>"
b. Using a text editor, edit the "strLookupAddr" value to match your web server. This can be set
to a valid DNS host name or and IP Address. Also, change "strBF2exe" to match the file used
to launch your game (ie, bf2.exe)
c. Use this script to start your BF2 game. All command-line paramters are passed directly to BF2
2. Play and have fun! :)
3. After you have completed one round of play (a player voted map change will speed this up). Check
BFHQ within the game. If all is working as it should, you will find stats data from your game.
If not, then go through the troubleshooting section later in this guide.
4. If all is good, set the "debug" options on both servers back to defaults!

Troubleshooting:
================
OK, so something is not quite working as it should. Before you start trawling the BF2Statistics.com site
for answers, follow this simple troubleshooting guide. It won't necessarily solve your problem, but it
should help you isolate the cause:
1. Re-check you configuration on both the game server and web server
2. Review the log files generated in the following locations:
- "<BF2 Server Path>/python/bf2/logs/"
- "<Web Server>/ASP/logs/"
- "<PHP Root>/logs/"
3. Check the operation of the "BF2web.gamespy.com" redirections:
a. Start BF2 (Server or Client) using one of the HOSTS file "work-arounds"
b. Open a command prompt and type:
ping bf2web.gamespy.com
c. If the response is from a HOST with IP: 207.38.10.110, then the redirection is not working :(
4. Verify you are not using and modified script files
5. Disable/Check any firewalls (ZoneAlarms has a nasty habit of blocking everything!)
6. Ok, now you can call for help! ;)

-EOF-
发表于 2007-10-28 12:52:09 | 显示全部楼层 来自 河南郑州

回复: 2个礼拜的奋战,终于把这个个战地2的rank搞出来了

能出个教程就好了:cry:
回复

使用道具 举报

发表于 2007-11-5 13:01:36 | 显示全部楼层 来自 广西南宁

回复: 2个礼拜的奋战,终于把这个个战地2的rank搞出来了

现在基本上都是SAGA和HERO,RANK服务器也不能通用,要是哪个能搞个纯RANK服务器并且开放给各大游戏服架设者就好了~
回复

使用道具 举报

发表于 2007-11-13 00:58:12 | 显示全部楼层 来自 广西桂林

回复: 2个礼拜的奋战,终于把这个个战地2的rank搞出来了

头晕眼花,点通这方面好少
回复

使用道具 举报

发表于 2008-3-9 17:00:22 | 显示全部楼层 来自 安徽淮北

回复: 2个礼拜的奋战,终于把这个个战地2的rank搞出来了

我在找这方面的资料,楼主帖的是自带说明,帮助不大。
回复

使用道具 举报

发表于 2010-4-23 19:45:59 | 显示全部楼层 来自 山东枣庄
感谢LZ分享 支持下 呵呵
回复

使用道具 举报

发表于 2010-10-21 02:52:17 | 显示全部楼层 来自 江苏盐城
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2010-10-25 06:46:26 | 显示全部楼层 来自 浙江金华
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2010-11-24 15:44:15 | 显示全部楼层 来自 辽宁营口
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表