Instalacja HlstatsX na serwerze WWW VPS. Łatwe proste, darmowe :)
Ten artykuł nie jest kopiowany - jest moją własnością. Treść pochodzi z mojego własnego doświadczenia.
Wymagania:
- Serwer HLDS z protokołem 48 lub dproto (liczą się binarki). Wpisz rcon version, aby się przekonać
- Serwer VPS / Dedykowany / Shared z SSH oraz z możliwością nasłuchiwania na portach (raczej takich nie ma). Polecam wersję 1 i 2
- Obsługę PHP, MYSQL, PERL
- PHP-GD2 (do wykresów)
- IQ 100+
- Cierpliwość
- Perl-DBI
- Perl-Encode
Jeżeli spełniasz wszystkie punkty - zaczynamy. TEN OPIS JEST DLA SERWERA DEDYKOWANEGO patrz własnej linuxowej maszyny, na której chodzi HLDS i HlstastsX.
Instalacja:
Pobieramy i instalujemy HLDS, dokonujemy updatów i innych pierdołek.
Logujemy się do serwera przez SSH. Tworzymy folder, np hlstats.
Kod php:
mkdir hlstats
cd hlstats
Klikamy prawym przyciskiem na link i kopiujemy adres odnośnika HLSTATSX:CE z
Kod php:
http://code.google.com/p/hlstatsxcommunity/downloads/list
Mi jest potrzebna wersja .tar.gz FULL - dla linuxa.
przechodzimy do putty / klienta ssh i wpisujemy
Kod php:
wget tu_wklejamy_link
W pytty wystarczy kliknąć shift+insert lub prawy przycisk myszki, aby zrobić WKLEJ.
Czekamy aż się pobierze :)
Teraz rozpakowujemy archiwum.
Kod php:
tar xvzpf HLX<naciskamy tab aby się dokończyło za nas>
Teraz leeeeci nam lista plików które się wypakowały.
Kod php:
web/hlstatsimg/games/cstrike/ribbons/6_m3.png
web/hlstatsimg/games/cstrike/ribbons/6_famas.png
web/hlstatsimg/games/cstrike/ribbons/3_m3.png
web/hlstatsimg/games/cstrike/ribbons/6_galil.png
web/hlstatsimg/games/cstrike/ribbons/3_scout.png
web/hlstatsimg/games/cstrike/ribbons/4_famas.png
web/hlstatsimg/games/cstrike/ribbons/1_ak47.png
web/hlstatsimg/games/cstrike/ribbons/5_m3.png
web/hlstatsimg/games/cstrike/ribbons/6_knife.png
web/hlstatsimg/games/cstrike/ribbons/5_killed_a_hostage.png
web/hlstatsimg/games/cstrike/ribbons/5_galil.png
web/hlstatsimg/games/cstrike/ribbons/4_killed_a_hostage.png
web/hlstatsimg/games/cstrike/ribbons/2_glock.png
web/hlstatsimg/games/cstrike/ribbons/1_planted_the_bomb.png
web/hlstatsimg/games/cstrike/ribbons/1_scout.png
web/hlstatsimg/games/cstrike/ribbons/4_galil.png
web/hlstatsimg/games/cstrike/ribbons/4_awp.png
web/hlstatsimg/games/cstrike/ribbons/2_elite.png
web/hlstatsimg/games/cstrike/ribbons/6_hegrenade.png
web/hlstatsimg/games/cstrike/ribbons/1_hegrenade.png
web/hlstatsimg/games/cstrike/ribbons/1_knife.png
web/hlstatsimg/games/cstrike/ribbons/1_rescued_a_hostage.png
web/hlstatsimg/games/cstrike/ribbons/3_latency.png
web/hlstatsimg/games/cstrike/ribbons/5_rescued_a_hostage.png
web/hlstatsimg/games/cstrike/ribbons/6_elite.png
web/hlstatsimg/games/cstrike/ribbons/4_usp.png
web/hlstatsimg/games/cstrike/ribbons/3_planted_the_bomb.png
web/hlstatsimg/games/cstrike/ribbons/5_elite.png
web/hlstatsimg/games/cstrike/ribbons/1_famas.png
web/hlstatsimg/games/cstrike/ribbons/5_knife.png
web/hlstatsimg/games/cstrike/ribbons/6_usp.png
web/hlstatsimg/games/cstrike/ribbons/1_awp.png
web/hlstatsimg/games/cstrike/ribbons/2_m4a1.png
web/hlstatsimg/games/cstrike/gawards/
web/hlstatsimg/games/cstrike/gawards/w_mp5.png
web/hlstatsimg/games/cstrike/gawards/w_knife.png
web/hlstatsimg/games/cstrike/gawards/w_sg550.png
web/hlstatsimg/games/cstrike/gawards/w_para.png
web/hlstatsimg/games/cstrike/gawards/o_rescued_a_hostage.png
web/hlstatsimg/games/cstrike/gawards/w_m4a1.png
web/hlstatsimg/games/cstrike/gawards/w_ump.png
web/hlstatsimg/games/cstrike/gawards/o_defused_the_bomb.png
web/hlstatsimg/games/cstrike/gawards/w_ak47.png
web/hlstatsimg/games/cstrike/gawards/w_xm1014.png
web/hlstatsimg/games/cstrike/gawards/w_glock18.png
web/hlstatsimg/games/cstrike/gawards/w_awp.png
web/hlstatsimg/games/cstrike/gawards/w_deagle.png
web/hlstatsimg/games/cstrike/gawards/w_p90.png
web/hlstatsimg/games/cstrike/gawards/o_assassinated_the_vip.png
web/hlstatsimg/games/cstrike/gawards/w_fiveseven.png
web/hlstatsimg/games/cstrike/gawards/w_famas.png
web/hlstatsimg/games/cstrike/gawards/w_m3.png
web/hlstatsimg/games/cstrike/gawards/w_elite.png
web/hlstatsimg/games/cstrike/gawards/w_tmp.png
web/hlstatsimg/games/cstrike/gawards/w_sg552.png
web/hlstatsimg/games/cstrike/gawards/o_planted_the_bomb.png
web/hlstatsimg/games/cstrike/gawards/w_mac10.png
web/hlstatsimg/games/cstrike/gawards/w_hegrenade.png
web/hlstatsimg/games/cstrike/gawards/w_p228.png
web/hlstatsimg/games/cstrike/gawards/w_scout.png
web/hlstatsimg/games/cstrike/gawards/w_galil.png
web/hlstatsimg/games/cstrike/gawards/w_usp.png
web/hlstatsimg/games/cstrike/gawards/w_standard.png
web/hlstatsimg/games/cstrike/gawards/w_grenade.png
web/hlstatsimg/games/cstrike/gawards/w_latency.png
web/hlstatsimg/games/cstrike/gawards/w_g3sg1.png
web/hlstatsimg/games/cstrike/gawards/w_aug.png
web/hlstatsimg/games/cstrike/game.png
web/hlstatsimg/games/cstrike/heatmaps/
web/hlstatsimg/games/cstrike/dawards/
web/hlstatsimg/games/cstrike/dawards/w_knife.png
web/hlstatsimg/games/cstrike/dawards/o_rescued_a_hostage.png
web/hlstatsimg/games/cstrike/dawards/w_m4a1.png
web/hlstatsimg/games/cstrike/dawards/o_defused_the_bomb.png
web/hlstatsimg/games/cstrike/dawards/w_ak47.png
web/hlstatsimg/games/cstrike/dawards/w_glock18.png
web/hlstatsimg/games/cstrike/dawards/w_awp.png
web/hlstatsimg/games/cstrike/dawards/w_deagle.png
web/hlstatsimg/games/cstrike/dawards/w_p90.png
web/hlstatsimg/games/cstrike/dawards/o_assassinated_the_vip.png
web/hlstatsimg/games/cstrike/dawards/o_headshot.png
web/hlstatsimg/games/cstrike/dawards/w_famas.png
web/hlstatsimg/games/cstrike/dawards/w_m3.png
web/hlstatsimg/games/cstrike/dawards/w_elite.png
web/hlstatsimg/games/cstrike/dawards/o_planted_the_bomb.png
web/hlstatsimg/games/cstrike/dawards/w_hegrenade.png
web/hlstatsimg/games/cstrike/dawards/o_killed_a_hostage.png
web/hlstatsimg/games/cstrike/dawards/w_bonuspoints.png
web/hlstatsimg/games/cstrike/dawards/w_glock.png
web/hlstatsimg/games/cstrike/dawards/w_scout.png
web/hlstatsimg/games/cstrike/dawards/w_galil.png
web/hlstatsimg/games/cstrike/dawards/w_usp.png
web/hlstatsimg/games/cstrike/dawards/w_standard.png
web/hlstatsimg/games/cstrike/dawards/w_grenade.png
web/hlstatsimg/games/cstrike/dawards/w_latency.png
web/hlstatsimg/games/cstrike/dawards/w_aug.png
web/hlstatsimg/games/cstrike/maps/
web/hlstatsimg/games/cstrike/maps/de_prodigy.jpg
web/hlstatsimg/games/cstrike/maps/cs_backalley.jpg
web/hlstatsimg/games/cstrike/maps/de_jeepathon2k.jpg
web/hlstatsimg/games/cstrike/maps/de_piranesi.jpg
web/hlstatsimg/games/cstrike/maps/de_train.jpg
web/hlstatsimg/games/cstrike/maps/de_rotterdam.jpg
web/hlstatsimg/games/cstrike/maps/cs_hideout2.jpg
web/hlstatsimg/games/cstrike/maps/de_inferno.jpg
web/hlstatsimg/games/cstrike/maps/cs_desert.jpg
web/hlstatsimg/games/cstrike/maps/cs_siege.jpg
web/hlstatsimg/games/cstrike/maps/cs_747.jpg
web/hlstatsimg/games/cstrike/maps/cs_alley.jpg
web/hlstatsimg/games/cstrike/maps/cs_iraq.jpg
web/hlstatsimg/games/cstrike/maps/es_jail.jpg
web/hlstatsimg/games/cstrike/maps/de_aztec.jpg
web/hlstatsimg/games/cstrike/maps/de_survivor.jpg
web/hlstatsimg/games/cstrike/maps/as_riverside.jpg
web/hlstatsimg/games/cstrike/maps/de_foption.jpg
web/hlstatsimg/games/cstrike/maps/de_dust.jpg
web/hlstatsimg/games/cstrike/maps/as_highrise.jpg
web/hlstatsimg/games/cstrike/maps/cs_militia.jpg
web/hlstatsimg/games/cstrike/maps/cs_prison.jpg
web/hlstatsimg/games/cstrike/maps/cs_estate.jpg
web/hlstatsimg/games/cstrike/maps/de_railroad.jpg
web/hlstatsimg/games/cstrike/maps/cs_office.jpg
web/hlstatsimg/games/cstrike/maps/de_fang.jpg
web/hlstatsimg/games/cstrike/maps/cs_assault.jpg
web/hlstatsimg/games/cstrike/maps/es_frantic.jpg
web/hlstatsimg/games/cstrike/maps/cs_facility.jpg
web/hlstatsimg/games/cstrike/maps/as_forest.jpg
web/hlstatsimg/games/cstrike/maps/de_vertigo.jpg
web/hlstatsimg/games/cstrike/maps/cs_ship.jpg
web/hlstatsimg/games/cstrike/maps/cs_mansion.jpg
web/hlstatsimg/games/cstrike/maps/de_cbble.jpg
web/hlstatsimg/games/cstrike/maps/de_vegas.jpg
web/hlstatsimg/games/cstrike/maps/de_chateau.jpg
web/hlstatsimg/games/cstrike/maps/cs_hideout.jpg
web/hlstatsimg/games/cstrike/maps/as_tundra.jpg
web/hlstatsimg/games/cstrike/maps/de_torn.jpg
web/hlstatsimg/games/cstrike/maps/de_dust2.jpg
web/hlstatsimg/games/cstrike/maps/cs_bunker.jpg
web/hlstatsimg/games/cstrike/maps/de_nuke.jpg
web/hlstatsimg/games/cstrike/maps/cs_arabstreets.jpg
web/hlstatsimg/games/cstrike/maps/de_storm.jpg
web/hlstatsimg/games/cstrike/maps/as_oilrig.jpg
web/hlstatsimg/games/cstrike/maps/cs_thunder.jpg
web/hlstatsimg/games/cstrike/maps/cs_havana.jpg
web/hlstatsimg/games/cstrike/maps/es_trinity.jpg
web/hlstatsimg/games/cstrike/maps/cs_alley1.jpg
web/hlstatsimg/games/cstrike/maps/cs_docks.jpg
web/hlstatsimg/games/cstrike/maps/cs_italy.jpg
web/hlstatsimg/games/cstrike/maps/cs_station.jpg
web/hlstatsimg/games/cstrike/weapons/
web/hlstatsimg/games/cstrike/weapons/ak47.png
web/hlstatsimg/games/cstrike/weapons/p228.png
web/hlstatsimg/games/cstrike/weapons/aug.png
web/hlstatsimg/games/cstrike/weapons/g3sg1.png
web/hlstatsimg/games/cstrike/weapons/mp5navy.png
web/hlstatsimg/games/cstrike/weapons/m4a1.png
web/hlstatsimg/games/cstrike/weapons/scout.png
web/hlstatsimg/games/cstrike/weapons/sg550.png
web/hlstatsimg/games/cstrike/weapons/sg552.png
web/hlstatsimg/games/cstrike/weapons/knife.png
web/hlstatsimg/games/cstrike/weapons/usp.png
web/hlstatsimg/games/cstrike/weapons/ump45.png
web/hlstatsimg/games/cstrike/weapons/tmp.png
web/hlstatsimg/games/cstrike/weapons/mac10.png
web/hlstatsimg/games/cstrike/weapons/deagle.png
web/hlstatsimg/games/cstrike/weapons/awp.png
web/hlstatsimg/games/cstrike/weapons/galil.png
web/hlstatsimg/games/cstrike/weapons/p90.png
web/hlstatsimg/games/cstrike/weapons/famas.png
web/hlstatsimg/games/cstrike/weapons/elite.png
web/hlstatsimg/games/cstrike/weapons/glock18.png
web/hlstatsimg/games/cstrike/weapons/fiveseven.png
web/hlstatsimg/games/cstrike/weapons/grenade.png
web/hlstatsimg/games/cstrike/weapons/xm1014.png
web/hlstatsimg/games/cstrike/weapons/m3.png
web/hlstatsimg/games/cstrike/weapons/m249.png
web/hlstatsimg/allies.swf
web/hlstatsimg/ts4.swf
web/hlstatsimg/role.gif
web/hlstatsimg/title-small.png
web/includes/
web/includes/functions_graph.php
web/includes/functions.php
web/includes/class_table.php
web/includes/google_maps.php
web/includes/js/
web/includes/js/Observer.js
web/includes/js/syntax.js
web/includes/js/heatmap.js
web/includes/js/Autocompleter.js
web/includes/js/Autocompleter.Request.js
web/includes/js/tabs.js
web/includes/js/mootools.js
web/includes/js/SqueezeBox.js
web/includes/class_db.php
web/styles/
web/styles/light_grey.css
web/styles/nom_nom_nom.css
web/styles/psychonic.css
web/styles/red_riot.css
web/styles/sourcebans.css
web/styles/plain_white.css
web/styles/murd4candy.css
web/styles/classic.css
web/styles/tsgk_black.css
web/styles/sourcebans/
web/styles/sourcebans/bg.png
web/styles/sourcebans/detail_head.png
web/styles/sourcebans/bk.png
web/styles/sourcebans/title-background.png
web/styles/sourcebans/table_location.gif
web/styles/sourcebans/location_under.png
web/styles/sourcebans/underline.png
web/styles/sourcebans/table_location.png
web/styles/light_blue.css
web/styles/electro_1337.css
web/styles/ua_styles.css
web/status.php
web/ingame.php
web/hlstats.php
web/sig.php
web/autocomplete.php
web/hlstats.css
[peku33@pldmachine hlstats]$
Sprawdzamy czy jest wszystko ok. Wpisujemy
Powinniśmy otrzymać
Kod php:
[peku33@pldmachine hlstats]$ ls -la
razem 20860
drwxr-xr-x 8 peku33 users 4096 2010-02-27 11:17 .
drwxr-xr-x 11 peku33 users 4096 2010-02-27 11:16 ..
drwxr-xr-x 4 peku33 users 4096 2010-02-14 04:10 amxmodx
-rw-r--r-- 1 peku33 users 117707 2010-02-14 00:54 CHANGELOG
-rw-r--r-- 1 peku33 users 1624 2009-09-26 01:46 CREATORS
drwxr-xr-x 4 peku33 users 4096 2010-02-14 04:10 heatmaps
-rw-r--r-- 1 peku33 users 21140070 2010-02-14 04:17 HLXCommunityEdition1.6.7FULL.tar.gz
-rw-r--r-- 1 peku33 users 2073 2010-02-14 00:54 IMAGES
-rw-r--r-- 1 peku33 users 18009 2009-09-26 01:46 LICENSE
-rw-r--r-- 1 peku33 users 90 2009-12-21 18:48 NOTES.hitbox
drwxr-xr-x 5 peku33 users 4096 2010-02-14 04:10 scripts
drwxr-xr-x 4 peku33 users 4096 2010-02-14 04:10 sourcemod
drwxr-xr-x 17 peku33 users 4096 2010-02-14 04:10 sql
drwxr-xr-x 8 peku33 users 4096 2010-02-14 04:10 web
[peku33@pldmachine hlstats]$
Naszą paczkę możemy już wywalić.
Kod php:
rm -f HLX<znów tab i enter>
OK. Mamy już wypakowane, czas skonfigurować
Kopiujemy cały folder web, w miejsce gdzie mamy strony internetowe.
U mnie:
Kod php:
[peku33@pldmachine hlstats]$ mv web/ ../public_html/web/
Zmieniamy teraz nazwę katalogu z web na np hlstats
Kod php:
[peku33@pldmachine hlstats]$ cd ../public_html/
[peku33@pldmachine public_html]$ mv web/ hlstatsx/
Dobra. Folder mamy wypakowany, powinien być dostępny w przeglądarce pod adresem http://adres_ip_naszego_vps/hlstatsx/
Nie otwierajcie go jeszcze - nie jest skonfigurowny.
Teraz zajmiemy się lokalną częścią.
Wracamy do folderu hlstats, w którym są skrypty.
Kod php:
[peku33@pldmachine public_html]$ cd ../hlstats/
Wchodzimy do folderu scripts i sprawdzamy czy wszystko ok. Powinno być:
Kod php:
[peku33@pldmachine hlstats]$ cd scripts/
[peku33@pldmachine scripts]$ ls -la
razem 428
drwxr-xr-x 5 peku33 users 4096 2010-02-14 04:10 .
drwxr-xr-x 7 peku33 users 4096 2010-02-27 11:22 ..
-rw-r--r-- 1 peku33 users 9883 2009-12-22 16:53 BASTARDrcon.pm
-rw-r--r-- 1 peku33 users 6020 2009-08-01 19:40 ConfigReaderSimple.pm
drwxr-xr-x 2 peku33 users 4096 2010-02-14 04:10 GeoLiteCity
-rwxr-xr-x 1 peku33 users 25918 2010-01-11 04:39 hlstats-awards.pl
-rw-r--r-- 1 peku33 users 2839 2009-12-23 16:11 hlstats.conf
-rw-r--r-- 1 peku33 users 100922 2010-01-27 21:20 HLstats_EventHandlers.plib
drwxr-xr-x 2 peku33 users 4096 2010-02-14 04:10 HLStatsFTP
-rw-r--r-- 1 peku33 users 301 2009-11-30 01:55 HLstats_GameConstants.plib
-rw-r--r-- 1 peku33 users 3799 2009-09-11 04:27 HLstats_Game.pm
-rwxr-xr-x 1 peku33 users 98248 2010-02-12 04:10 hlstats.pl
-rw-r--r-- 1 peku33 users 25550 2010-02-12 04:10 HLstats_Player.pm
-rw-r--r-- 1 peku33 users 10990 2009-12-04 07:20 HLstats.plib
-rwxr-xr-x 1 peku33 users 8453 2009-08-19 01:40 hlstats-resolve.pl
-rw-r--r-- 1 peku33 users 36370 2010-02-14 03:03 HLstats_Server.pm
drwxr-xr-x 2 peku33 users 4096 2010-02-14 04:10 ImportBans
-rwxr-xr-x 1 peku33 users 13886 2009-08-12 08:38 proxy-daemon.pl
-rwxr-xr-x 1 peku33 users 4743 2010-01-18 18:06 run_hlstats
-rwxr-xr-x 1 peku33 users 4275 2010-01-18 18:06 run_hlstats_multi
-rwxr-xr-x 1 peku33 users 4844 2010-01-18 18:06 run_proxy
-rw-r--r-- 1 peku33 users 14188 2009-12-23 16:11 TRcon.pm
[peku33@pldmachine scripts]$
TERAZ PRZEZ PHPMYADMINA LUB RĘCZNIE TWORZYMY BAZĘ DANYCH
Nazwa usera - zróbmy: peku33
hasło: q1234
Nazwa bazy: peku33
Adres: u mnie 127.0.0.1 lub localhost (to samo)
Tu macie screena:

Dobra. Db mamy za sobą.
Teraz konfigurujemy hlx.
Odpalamy edytorem, np mcedit:
Kod php:
[peku33@pldmachine scripts]$ mcedit hlstats.conf
U mnie wygląda następująco:
Kod php:
[peku33@pldmachine scripts]$ mcedit hlstats.conf
hlstats.conf [-M--] 14 L:[ 34+21 55/ 76] *(2138/2865b)= 32 0x20
# For support and installation notes visit http://www.hlxcommunity.com
##
## Database Settings
##
# DBHost - Database server "address" or "address:port". Address can be an IP or
# a hostname. The default MySQL port is 3306 (tcp).
DBHost "localhost"
# DBUsername - User to connect to the database as.
DBUsername "peku33"
# DBPassword - Password for the database user.
DBPassword "q1234"
# DBName - Name of the database to use.
DBName "peku33"
# DBLowPriority - Use INSERT DELAYED and DELETE LOW_PRIORITY for some queries.
# This can give better performance, but may make statistics less
Jeżeli potem wywali nam błąd, że port jest zajęty, to zmieniamy port nasłychu z 27500 na np 27517 - losowy
Teraz konfigurujemy to samo dla www:
Kod php:
[peku33@pldmachine hlstatsx]$ mcedit config.php
config.php [-M--] 25 L:[ 9+59 68/ 95] *(2800/3883b)= i 105 0x69
Copyleft (L) 2008-20XX Malte Bayer (steam@neo-soft.org)http://ovrsized.neo-soft.org/
ELstatsNEO is an very improved & enhanced - so called Ultra-Humongus Edition of HLstatsXHLstatsX - Real-time player and clan rankings and statistics for Half-Life 2http://www.hlstatsx.com/Copyright (C) 2005-2007 Tobias Oetzel (Tobi@hlstatsx.com)
HLstatsX is an enhanced version of HLstats made by Simon GarnerHLstats - Real-time player and clan rankings and statistics for Half-Lifehttp://sourceforge.net/projects/hlstats/Copyright (C) 2001 Simon Garner This program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseas published by the Free Software Foundation; either version 2of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.
You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
For support and installation notes visit http://www.hlxcommunity.com*/
if ( !defined('IN_HLSTATS') ) { die('Do not access this file directly'); }
// DB_NAME - The name of the databasedefine("DB_NAME", "peku33");
// DB_USER - The username to connect to the database asdefine("DB_USER", "peku33");
// DB_PASS - The password for DB_USERdefine("DB_PASS", "q1234");
// DB_ADDR - The address of the database server, in host:port format.// (You might also try setting this to e.g. ":/tmp/mysql.sock" to// use a Unix domain socket, if your mysqld is on the same box as// your web server.)define("DB_ADDR", "localhost");
// DB_TYPE - The database server type. Only "mysql" is supported currentlydefine("DB_TYPE", "mysql");
// DB_PCONNECT - Set to 1 to use persistent database connections. Persistent// connections can give better performance, but may overload// the database server. Set to 0 to use non-persistent// connections.define("DB_PCONNECT", 0);
// INCLUDE_PATH - Filesystem path to the includes directory, relative to hlstats.php. This must be specified// as a relative path.//// Under Windows, make sure you use forward slash (/) instead1Pomoc 2Zapisz 3Zaznacz4Zast-p 5Kopiuj 6Przesu-7Szukaj 8Usu- 9Rozwi- 10Ko-cz
Ok. Mamy już prawie wszystko.
Teraz instalujemy tabele w sql
Kod php:
cd ../../hlstats/sql/
Instalujemy, podając hasło
Kod php:
[peku33@pldmachine sql]$ mysql peku33 -u peku33 -p < install.sql
Enter password:
[peku33@pldmachine sql]$
Teraz w PHPMYADMINIE powinniśmy mieć:

Jeżeli to mamy, to już prawie gotowe.
Teraz należy tylko wywalić folder sieciowy update
Kod php:
[peku33@pldmachine sql]$ cd ../../public_html/hlstatsx/
[peku33@pldmachine hlstatsx]$ rm -rf updater/
[peku33@pldmachine hlstatsx]$
Teraz odświeżamy stronę i jeżeli wszystko ok to otrzymujemy:

Na samym dole strony widzimy przysisk ADMIN
wchodzimy tam i logujemy się jako admin, hasło 123456
ZMIENIAMY HASŁO!

Teraz przechodzimy do sekcji GAMES i zanaczamy HIDE dla Wszystkiego poza CS. Teraz powinno być wszystko poza TF
Akceptujemy. Na dole menu powinnien się teraz pojawić napis Counter Strike.
Kilkamy add server
Teraz tak:
Jeżeli nasz HLDS jest na tym samym kompie co serwer WWW i PERL - wpisujemy w pierwsze okno: 127.0.0.1
W innym wypadku wpisujemy realne ip.
Moja konfiguracja:

Zapisujemy zmiany.
Przechodzimy do sekcji i konfigurujemy wszystko.
Moja konfiguracja:

Jeżeli mamy server NON-STEAM - zmieniamy to pole na Player Name:

Zapisujemy.
Teraz strona główna powinna wyglądać tak:

_________________________________________________________________
Teraz przechodzimy do serwera CS.
Edytujemy server.cfg
Teraz musimy zdobyć ip względne od HLDS do serwera WWW
jeżeli jest to ten sam komp - podajemy 127.0.0.1
jeżeli nie - podajemy ip publiczne
Ustawiamy hasło RCON takie jak w panelu i dodajemy linijkę
Kod:
rcon_password "tajne_haslo"
logaddress_add: 127.0.0.1 27500
log on
Zapisujemy zmiany i restartujemy serwer
_________________________________________________________________
Teraz wchodzimy do katalogu z perlem
Kod php:
cd ~/hlstats/scripts/
Upewniamy się, czy wszystko gra
Teraz odpalamy nasz skrypt:
Teraz powinno nam pokazać coś w duchu
Kod php:
[peku33@pldmachine scripts]$ ./hlstats.pl
2010-02-27 23:22:55: - MYSQL: Connecting to MySQL database 'peku33' on 'localhost' as user 'peku33' ... connected ok
2010-02-27 23:22:55: - CONFIG: Reading database config...
2010-02-27 23:22:55: - DAEMON: Proxy_Key DISABLED
2010-02-27 23:22:55: - CONFIG: I have found the following server configs in database:
2010-02-27 23:22:55: - S_CONFIG: 127.0.0.1:27015
2010-02-27 23:22:55: - HLSTATSX: HLstatsX:CE 1.6.7 starting...
2010-02-27 23:22:55: - UDP: Opening UDP listen socket on port 27500 ... ok
2010-02-27 23:22:55: - HLSTATSX: Tracking Trend of the stats are enabled
2010-02-27 23:22:55: - HLSTATSX: Maximum Skill Change on all servers are 25 points
2010-02-27 23:22:55: - HLSTATSX: Minimum Skill Change on all servers are 2 points
2010-02-27 23:22:55: - HLSTATSX: Minimum Players Kills on all servers are 50 kills
2010-02-27 23:22:55: - HLSTATSX: Players chat logging is enabled
2010-02-27 23:22:55: - HLSTATSX: Broadcasting public chat is disabled
2010-02-27 23:22:55: - HLSTATSX: HLstatsX:CE is now running (Normal mode, debug level 1)
Teraz dokonujemy restartu serwera cs.
Po tym zabiegu HLSTATSX powinno dowalić jeszcze trochę logów:
Kod php:
[peku33@pldmachine scripts]$ ./hlstats.pl
2010-02-27 23:22:55: - MYSQL: Connecting to MySQL database 'peku33' on 'localhost' as user 'peku33' ... connected ok
2010-02-27 23:22:55: - CONFIG: Reading database config...
2010-02-27 23:22:55: - DAEMON: Proxy_Key DISABLED
2010-02-27 23:22:55: - CONFIG: I have found the following server configs in database:
2010-02-27 23:22:55: - S_CONFIG: 127.0.0.1:27015
2010-02-27 23:22:55: - HLSTATSX: HLstatsX:CE 1.6.7 starting...
2010-02-27 23:22:55: - UDP: Opening UDP listen socket on port 27500 ... ok
2010-02-27 23:22:55: - HLSTATSX: Tracking Trend of the stats are enabled
2010-02-27 23:22:55: - HLSTATSX: Maximum Skill Change on all servers are 25 points
2010-02-27 23:22:55: - HLSTATSX: Minimum Skill Change on all servers are 2 points
2010-02-27 23:22:55: - HLSTATSX: Minimum Players Kills on all servers are 50 kills
2010-02-27 23:22:55: - HLSTATSX: Players chat logging is enabled
2010-02-27 23:22:55: - HLSTATSX: Broadcasting public chat is disabled
2010-02-27 23:22:55: - HLSTATSX: HLstatsX:CE is now running (Normal mode, debug level 1)
2010-02-27 23:22:55: 127.0.0.1:27015 - SERVER: Connecting to rcon on 127.0.0.1:27015 ... ok
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Server running map: de_dust
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Ingame-URL: http://10.0.1.224/~peku33/hlstatsx
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Query results will displayed in valve browser
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Showing stats is enabled
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Broadcasting Live-Events with "hlx_amx_psay" is enabled
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Broadcasting Announcements with "hlx_amx_csay" is enabled
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Player Event-Handler with "hlx_amx_psay" is enabled
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Displaying amx style menu with "hlx_amx_msay" is enabled
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: New Players defaulting to show event messages
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Tracking server load is enabled
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Penalty team kills with 25 points
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Penalty suicides with 5 points
2010-02-27 23:22:56: 127.0.0.1:27015 - TEAMS: Auto-Team-Balancing is disabled
2010-02-27 23:22:56: 127.0.0.1:27015 - TEAMS: Auto-Retry-Banning is disabled
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Requires minimum players rank is disabled
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Public chat commands are enabled
2010-02-27 23:22:56: 127.0.0.1:27015 - TEAMS: Switching Admins on Auto-Team-Balance is disabled
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Ignoring bots is enabled
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Using skill mode 0
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Game type: Normal
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Using plugin AMXX for internal functions!
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Connect Announce is enabled
2010-02-27 23:22:56: 127.0.0.1:27015 - SERVER: Auto-updating hostname is enabled
2010-02-27 23:22:56: 127.0.0.1:27015 - MYSQL: Flushing player updates to database...
2010-02-27 23:22:56: 127.0.0.1:27015 - MYSQL: Flushing player updates to database is complete.
2010-02-27 23:22:55: 127.0.0.1:27015 - E400: 127.0.0.1:27015 srv_players doesnt exist!
2010-02-27 23:22:56: 127.0.0.1:27015 - E020: (IGNORED) OK Rcon from "127.0.0.1": "status"
2010-02-27 23:22:56: 127.0.0.1:27015 - E020: (IGNORED) OK Rcon from "127.0.0.1": "sv_visiblemaxplayers"
2010-02-27 23:22:56: 127.0.0.1:27015 - E020: (IGNORED) OK Rcon from "127.0.0.1": "hlxce_webpage "http://10.0.1.224/~peku33/hlstatsx""
2010-02-27 23:22:56: 127.0.0.1:27015 - E020: (IGNORED) OK Rcon from "127.0.0.1": "hlxce_version "1.6.7""
Uważamy na linijkę
Kod php:
2010-02-27 23:22:56: 127.0.0.1:27015 - E020: (IGNORED) OK Rcon from "127.0.0.1": "status"
Patrzymy, czy przypadkiem nie jest BAD RCON.
Po pewmym czasie w hlstatsX (perl) zaczynają nam się pojawiać dane:
Kod php:
2010-02-27 23:23:34: - E400: 127.0.0.1:27015 srv_players doesn't exist!
2010-02-27 23:24:32: - E400: 127.0.0.1:27015 srv_players doesn't exist!
2010-02-27 23:24:54: - HLSTATSX: No data since 120 seconds
2010-02-27 23:25:30: - E400: 127.0.0.1:27015 srv_players doesn't exist!
2010-02-27 23:26:16: - E400: 127.0.0.1:27015 srv_players doesn't exist!
2010-02-27 23:26:24: 127.0.0.1:27015 - E012: (IGNORED) NOTMINPLAYERS: Team "CT" triggered "Target_Saved"
2010-02-27 23:26:25: 127.0.0.1:27015 - MYSQL: Flushing player updates to database...
2010-02-27 23:26:25: 127.0.0.1:27015 - MYSQL: Flushing player updates to database is complete.
2010-02-27 23:26:25: 127.0.0.1:27015 - E013: (IGNORED) NOTMINPLAYERS: World triggered "Round_End" (0/4)
2010-02-27 23:26:25: 127.0.0.1:27015 - E020: (IGNORED) OK Rcon from "127.0.0.1": "status"
2010-02-27 23:26:25: 127.0.0.1:27015 - E020: (IGNORED) OK Rcon from "127.0.0.1": "sv_visiblemaxplayers"
2010-02-27 23:26:35: 127.0.0.1:27015 - E013: (IGNORED) NOTMINPLAYERS: World triggered "Round_Start" (0/4)
Jeżeli mamy takie coś to znaczy że wszystko gra!
Wciskamy ctrl+z na klawie, aby zminimalizować skrypt w perlu, ale pozostawić go działającego
aby sprawdzić, czy działa - wystarczy wpisać:
Odszukać numer PID dla hlstats.pl
i wklepać
potem znów możemy go schować przy użyciu ctrl+z
Aby dodać kolejny serwer dodaj go tylko w panelu. Przez panel równierz zrestartuj perla, oraz skonfiguruj server HLDS.
Jeżeli wszystko poszło zgodnie z planem to nasza strona główna wygląda teraz tak:

Jeżeli chcemy jeszcze mieć nagrody dla graczy możemy dodać linijkę w crontabie:
Kod php:
0 1 * * * /home/peku33/hlstats/scripts/hlstats-awards.pl
O zerowej podliczą się nagrody :)
__________________________________________________________________________
Dla jeszcze bardziej dociekliwych:
Instalujemy plugin, który pokazuje nam info w grze :)
Plugin znajduje sie w paczce w katalogu amxmodx/plugins.
Bierzemy ten z cstrike i instalujemy standardowo.
Poradnik by peku33 dla wiaderka! Zakaz kopiowania.