Installation und Konfiguration des Bigbrotherbot unter Windows und Linux

Der Bigbrotherbot oder B3 ist ein von Thorn in Python geschriebenes Leistungsfähiges Tool zur Administration von Gameservern. Es gibt ein ausführliches Howto und Wiki zur Installation und Configuration auf der Offiziellen Seite des Bigbrotherbot, allerdings in Englisch.
Hier findet sich eine Deutsche Anleitung.

B3 unterstützt zur Zeit

  • BattleField Bad Company 2 (development)
  • Call of Duty
  • Call of Duty United Offensive
  • Call of Duty 2
  • Call of Duty 4
  • Call of Duty World at War
  • Enemy Territory (+ETPro)
  • Smokin'Guns
  • Urban Terror 4.1
  • World of Padman

Windows Installation.

In dieser Anleitung wird der MySQL MSI und der B3 MSI-Installer benutzt. Es ist auch möglich B3 aus den Quelltexten laufen zu lassen, dann ist zusätzlich die Installation von python notwendig. Dies ist nicht Teil dieser Anleitung.
Mitgeschrieben unter WindowsXP Professionell (32 Bit) Als Gameserver Call of Duty 4 benutzt. Alle Pfade und Passwörter bitte entsprechend anpassen. Die Configuration eines Gameservers sollte für dich kein großes Rätsel mehr darstellen. Zeitaufwand mit Fehlersuche > 1 Stunde )

1) MySQL:

B3 braucht für die Authentifizierung der Spieler (Begrüßung, Rechteverwaltung, Bans) eine MySQL Datenbank. Daher muss MySQL Server installiert werden:
Lenke deinen Browser auf http://dev.mysql.com/downloads/mysql/
Windows (x86, xx-bit), MSI Installer Essentials herunterladen (Der größere Installer ohne den Zusatz Essential enthält noch die Doku und einige Werkzeuge mehr ist zum Betrieb des B3 nicht notwendig)
Der Download ist etwas Versteckt, auf der nächsten Seite New User, Proceed klicken.
Runterscrollen zu Mirrors in: Germany, und das passende Packet herunterladen.
Für 32Bit(!) ist dies zur Zeit 5.1 http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.1/mysql-essential-5.1.49-win32.msi aber sieh lieber nach.
Nun den Installer Starten, Next, und den Setup Type "Custom" oder Standard wählen. (Bei Custom lässt sich der Installationspfad von Hand anpassen)
Next ein paar mal durchklicken, nur auf der letzten Seite nochmal Aufmerksam nach dem Ankreutzkästchen suchen um nach der Installation den Configurations Wizzard starten zu lassen:
[X]Configure SQL Server now
Finish
Im Config Wizzard Next, Standard Modus
Standard -> Install as Windows Service, [X]Launch Automatic -> root Passwort festlegen

(Wählt man beim Wizzard Detailed = lassen sich noch die Resourcen, der DB Path, TCP/IP Parameter Charset etc einstellen. Ist für eine Geradeaus Installation nicht nötig und lässt sich auch nachträglich in der my.conf ändern)

Execute, Finish

Der MySQL Server Läuft jetzt bereits (nachsehen kann man unter Arbeitsplatz, Rechtsklick, Verwalten, Dienste-> Mysql unter den Zeilen Status und Autostarttyp)

2) Datenbank und Benutzer für B3 erstellen

Ich halte mich hier an die Commandline, ist schneller, lässt sich leichter erklären und produziert schönere Fehlermeldungen :D. Aber der Vollständigkeithalber sei erwähnt das es auch Grafische Frontends für diese Aufgabe gibt, exemplarisch das sehr Umfangreiche offizielle Toolset MySQL Workbench (formerly MySQL tools) direkt vom Hersteller


Aber nicht hier. Hier machen wir das so:

  • CommandLine Fenster öffnen
  • Datenbank mit dem Namen b3 erstellen.
  • Benutzer Namens b3 mit dem Passwort password erstellen

(Eingaben sind bold):


Start->ausführen->cmd[ENTER]
cd C:\Programme\Mysql Server 5.1\bin
mysql.exe -u root -p {passwort aus dem Wizzard}

C:\Programme\MySQL Server 5.1\bin>mysql.exe -u root -p
Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.1.49-community MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
+--------------------+
3 rows in set (0.00 sec)

mysql> create database b3;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON b3.* TO 'b3'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)
quit zum verlassen

3) B3 Installieren

Zur Zeit Aktuell: B3 v1.3.2 for Windows, Herunterzuladen als MSI-Installer unter
http://www.bigbrotherbot.net/forums/downloads/?sa=view;down=63;
Starten wie gewohnt per Doppelklick, Next, Next, Next, Pfad wählen, Fertig.
Die b3_run.exe per Doppelklick starten. Beim ersten Start wird ein Wizzard ausgeführt der alle Parameter abfragt und die Configurationsdatei b3.xml erstellt.



    WELCOME FEDORAXPS, TO THE B3 SETUP PROCEDURE
----------------------------------------------------------------
We're about to generate a main configuration file for
BigBrotherBot. This procedure is initiated when:

 1. you run B3 with the option --setup or -s
 2. the config you're trying to run does not exist
    (D:\Temp\BigBrotherBot_1.3.2\conf\b3.xml)
 3. you did not modify the distributed b3.xml prior to
    starting B3.

[Enter] to continue, 'abort' to abort Setup:


--BACKUP/CREATE CONFIGFILE--------------------------------------

    Trying to backup the original D:\Temp\BigBrotherBot_1.3.2\conf\b3.xml...

    No backup needed.
    A file with this location/name does not yet exist,
    I'm about to generate a new config file!


[Enter] to continue, 'abort' to abort Setup:

Hier bin ich unter WindowsXP auf die Fresse gefallen. Eventuell ist es ein Bug in der Version oder es liegt an meinem speziellen Setup. Jedenfalls crasht der Wizzard wenn der conf Ordner nicht existiert. Dann erst den Ordner von Hand erstellen und es geht weiter. (z.B. C:\Programme\BigBrotherBot_1.3.2\conf)

Traceback (most recent call last):
  File "b3\run.pyo", line 152, in main
  File "b3\run.pyo", line 114, in run
  File "b3\setup.pyo", line 65, in __init__
  File "b3\setup.pyo", line 70, in runSetup
  File "b3\lib\elementtree\SimpleXMLWriter.pyo", line 154, in __init__
IOError: [Errno 2] No such file or directory: 'D:\\Temp\\BigBrotherBot_1.3.2\\co
nf\\b3.xml'
Press the [ENTER] key

Ich hoppel jetzt mal schnell drüberweg, in fast allen Punkten sind bereits brauchbare Voreinstellungen vorausgewählt (will heissen enter, enter, enter) Ein wichtiger Punkt im Wizzard ist allerdings:

DB User:
> Your database info: [mysql]://[db-user]:[db-password]@[db-server[:port]]/[db-n
ame]
database [mysql://b3:password@localhost/b3]:



Nicht dran vorbeirauschen! (Oder dann später von Hand in der b3.xml ändern) das sind die User Daten die oben bei Punkt 3 mit dem Befehl GRANT [....] in der Datenbank eingetragen wurden! (User=b3, passwort=password)
Das muss natürlich passen.
Wichtige Punkte sind noch der Parser (cod2, cod4 ...) rcon Passwort und das Logfile.


> The gameserver generates a logfile, put the path and name here
game_log [games_mp.log]: C:\Programme\Call of Duty 4\main\games_mp.log



[Fertig]


4) Datenbank create:

Nach der Installation des B3 im letzten Punkt befindet sich nun unter C:\Programme\BigBrotherBot_
1.3.2\docs\ ein Datenbank Dump mit dem die Tabellen - der Inhalt für die Datenbank - erstellt werden müssen.
Wird hier also wieder per Hand eingespielt:



Start-Ausführen->cmd[enter]
C:\Programme\MySQL Server 5.1\bin>mysql.exe b3 -u b3 -p < C:\Programme\BigBrotherBot_1.3.2\docs\b3.sql
Enter password: ********

Achtung - im Erfolgsfall gibt dieser Befehl nichts zurück. Aber wir können nachschauen wenn kein Fehler kommt ob das alles seine Richtigkeit hat (und zum üben):


D:\Programme\MySQL Server 5.1\bin>mysql.exe -u b3 -p
Enter password: ********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.1.49-community MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| b3                 |
+--------------------+
2 rows in set (0.00 sec)

mysql> use b3;
Database changed
mysql> show tables;
+--------------+
| Tables_in_b3 |
+--------------+
| aliases      |
| clients      |
| groups       |
| penalties    |
+--------------+
4 rows in set (0.00 sec)

mysql> quit
Bye

5) B3 und Gameserver starten

Na bitte. Alles paletti soweit. B3 Installiert und konfiguriert, Datenbank installiert, Konfiguriert und ready für Daten, denn mal den Gameserver starten:


Start Server:
"C:\Spiele\Call of Duty 4\iw3mp.exe"  +set dedicated 2 +set logfile 1 +set g_logsync 1 +set rcon_password geheim +set dedicated 2

Ich spare mir jetzt mal eine ausführliche Beschreibung zum Gameserver, diese eine Zeile reicht zum testen wenn du in der console dann noch map mp_carentan eintippst. Ansonsten lies dir die HowTos zu Dedicated Servern durch.
Und Jetzt den b3_run.exe starten:

Starting www.BigBrotherBot.com (b3) v1.3.2 [nt] (Daniel) [Win32 standalone]

Using config file: D:\Temp\BigBrotherBot_1.3.2\conf\b3.xml
Using external plugin directory: D:\Temp\BigBrotherBot_1.3.2\extplugins
Activating log   : b3.log
Connecting to DB : OK
Using Gamelog    : C:\Spiele\Call of Duty 4\main\games_mp.log
Loading Events   : 32 events loaded
Loading Plugins  : 220
Press the [ENTER] key



Jetzt Verbinden mit dem Gameserver und Funktion testen: Im Chat !help sollte eine Auswahl von Befehlen zurückgeben. Ja. Sollte. Geht bei mir aber nicht. Hehe - Typisch. Also auf zur lustigen Fehlersuche.
Da ist der erste Punkt die b3. log im Installationsverzeichnis des B3.


b3.log
100727 17:56:28    BOT        www.BigBrotherBot.com (b3) v1.3.2 [nt] (Daniel) [Win32 standalone]
100727 17:56:28    BOT        Python: 2.6.1 (r261:67517, Dec  4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)]
100727 17:56:28    BOT        Starting Cod4Parser v1.3.2 for server 127.0.0.1:28960
100727 17:56:28    BOT        --------------------------------------------
100727 17:56:28    BOT        Attempting to connect to database mysql://b3:******@localhost/b3...
100727 17:56:28    BOT        Connected to database [1 times]
100727 17:56:28    BOT        Game log F:\Spiele\Call of Duty 4\main\games_mp.log
100727 17:56:28    BOT        Starting bot reading file F:\Spiele\Call of Duty 4\main\games_mp.log
100727 17:56:28    BOT        Loading Plugins (external plugin directory: D:\Temp\BigBrotherBot_1.3.2\extplugins)
100727 17:56:28    BOT        Loading Plugin #1 censor [@conf\plugin_censor.xml]
100727 17:56:28    BOT        CensorPlugin: Loading config @conf\plugin_censor.xml for CensorPlugin
100727 17:56:28    CRITICAL    CensorPlugin: Could not find config file @conf\plugin_censor.xml
Traceback (most recent call last):
  File "b3\plugin.pyo", line 97, in loadConfig
  File "b3\config.pyo", line 271, in load
  File "b3\config.pyo", line 177, in load
ConfigFileNotFound: 'conf\\plugin_censor.xml'
100727 17:56:28    INFO    STDOUT 220
100727 17:56:28    INFO    STDOUT


aha da haben wir es ja schon. ConfigFileNotFound: 'conf\\plugin_censor.xml' ist irgendwie ungut. Sieht mir nach einem weiteren Bug im Windows-msi Paket aus, da fehlen einige .conf dateien bzw sind bei dem Wizzard nicht erstellt wurden. Auf jedenfall sind die aer in den Sourcepaketen dabei. Also lade ich mir 
http://www.bigbrotherbot.net/forums/downloads/?sa=view;down=64
das noch als .zip herunter und entpacke mir den Inhalt von conf manuell in mein conf.

27.07.2010  17:59    <DIR>          ..
22.05.2010  01:29             3.699 b3.bfbc2_example.xml
22.05.2010  01:29             3.651 b3.distribution.xml
27.07.2010  17:56             4.311 b3.xml
22.05.2010  01:29             8.957 plugin_admin.xml
22.05.2010  01:29               798 plugin_adv.xml
22.05.2010  01:29             8.115 plugin_censor.xml
22.05.2010  01:29               266 plugin_login.xml
22.05.2010  01:29               302 plugin_pingwatch.xml
22.05.2010  01:29               371 plugin_punkbuster.xml
22.05.2010  01:29               199 plugin_spamcontrol.xml
22.05.2010  01:29               120 plugin_stats.xml
22.05.2010  01:29               344 plugin_status.xml
22.05.2010  01:29             1.855 plugin_tk.xml
22.05.2010  01:29             2.374 plugin_welcome.xml

(13 conf Dateien. Fehlten alle in meiner MSI-Installation. Warum? keine Ahnung.)

Neustart.


Starting www.BigBrotherBot.com (b3) v1.3.2 [nt] (Daniel) [Win32 standalone]

Using config file: conf\b3.xml
Using external plugin directory: D:\Temp\BigBrotherBot_1.3.2\extplugins
Activating log   : b3.log
Connecting to DB : OK
Using Gamelog    : F:\Spiele\Call of Duty 4\main\games_mp.log
Loading Events   : 32 events loaded
Loading Plugins  : ........... (11)
Starting Plugins : ........... (11)
Startup Complete : Let's get to work!

(Please check b3.log in the B3 root directory for more detailed info)

    Linux Installation.

    In dieser Anleitung wird der MySQL Server 5.1 und Python 2.6 aus dem Distributionspaketen und der letzte Stable B3 Version 1.3.2 benutzt.  Das kompilieren des MySQL Servers/Python aus den Quelltexten ist alternativ natürlich auch möglich, doch nicht Teil dieser Anleitung.
    Als Basis wurde die GNU/Linux Distribution Ubuntu und als Gameserver Call of Duty 2 benutzt. Zum Installieren von MySQL und Python + Module sind root Rechte notwendig. Alle Pfade und Passwörter bitte entsprechend anpassen.
    Debian sollte identisch sein, wer die Paketenamen und den Yast Befehl für Suse oder die passenden rpm Bezeichnung für RedHat zur Hand hat - immer her damit.

    In diesem Tutorial:
    Pfad zum Gameserver: /home/kellerkind/cod2
    Pfad zu B3:                /home/kellerkind/jenny
    B3 Datenbank            usrdb_b3
    Datenbank User:                   b3
    Datenbank Passwort:             geheim

    In den Beispielen sind Kommentare und Ausgaben des Servers immer mit |#| gekennzeichnet! Dies ist nur zur besseren Lesbarkeit gedacht, die Syntaxhervorhebung macht dann auch gleich grauen Font draus wenn du hier Javascript eingeschaltet hast. Also: Grau = #Kommentar oder Ausgabe

    1) Abhängigkeiten Mysql, Python, Python-Tree Installieren.
    kellerkind@ubuntu:~$ su ## Root Rechte notwendig für den Paketmanager
    Passwort:
    
    # Anmerkung
    # Alternativ ist auch ein sudo vor jedem Befehl möglich, i.e. "sudo apt-get update"
    # (in Ubuntu ist dies z.B. die voreingestellte Methode)
    
    root@ubuntu:/home/kellerkind: apt-get update ## Update des Paketmanagers.
    
    |#|OK   http://security.ubuntu.com karmic-security Release.gpg
    |#|OK   http://de.archive.ubuntu.com karmic Release.gpg
    |#|   <!------->8------SCHNIPP für Lesbarkeit ------8<---->
    |#|OK   http://de.archive.ubuntu.com karmic-updates/restricted Sources
    |#|Paketlisten werden gelesen... Fertig  
    
    root@ubuntu:/home/kellerkind: apt-get install mysql-server-5.1 mysql-client-5.1 libmysqlclient16 libmysqlclient-dev python2.6 python-mysqldb python-elementtree  ## Installieren der für B3 notwendigen Pakete
    
    |#|  libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient-dev
    |#|  libmysqlclient16 libnet-daemon-perl libplrpc-perl mysql-client-5.1
    |#|  mysql-common mysql-server-5.1 mysql-server-core-5.1 python-elementtree
    |#|  python-mysqldb
    |#| 0 aktualisiert, 13 neu installiert, 0 zu entfernen und 19 nicht aktualisiert. 
    |#|      Es m+ssen 24,7MB an Archiven heruntergeladen werden.
    |#| Nach dieser Operation werden 60,1MB Plattenplatz zus¦tzlich benutzt.
    |#| Möchten Sie fortfahren [J/n]?  J
    |#| Hole:1 http://de.archive.ubuntu.com karmic/main libplrpc-perl 0.2020-2 [36,0kB]
    |#| Hole:2 http://de.archive.ubuntu.com karmic/main libdbi-perl 1.609-1 [800kB]     
    |#|   <!------->8------SCHNIPP für Lesbarkeit ------8<---->
    |#| Richte mysql-server-core-5.1 ein (5.1.37-1ubuntu5.4) ...
    |#| Richte mysql-server-5.1 ein (5.1.37-1ubuntu5.4) ...                             
    

    Je nach Distribution öffnet sich jetzt eventuell ein Dialog in dem das root Passwort für die MySQL Datenbank eingegeben werden soll. Dies muss nicht identisch sein mit dem root Passwort des Betriebssystems. Wichtig ist allerdings es sich zu merken (Und sich nicht zu vertippen Unschuldig ) ansonsten wird es anstrengend.

    Hast du oben su benutzt dann einmal exit, ab jetzt sind keine root Rechte mehr notwendig.
    Sollte die Abfrage des root Passwortes bei deiner Distribution ausbleiben, empfiehlt es sich dringend das jetzt von Hand nachzuholen:

    mysqladmin -h localhost -u root password “Dein MYSQL ROOT-Passwort”

    2) Datenbank und Benutzer für B3 erstellen
    kellerkind@ubuntu:~$ mysql -u root -p {passwort aus dem wizard}
    Enter password:
    |#|Welcome to the MySQL monitor.  Commands end with ; or \g.
    |#|Your MySQL connection id is 107
    |#|Server version: 5.1.41-3ubuntu12.3 (Ubuntu)
    |#|
    |#|Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    |#|
    mysql> show databases;
    |#|    +--------------------+
    |#|    | Database           |
    |#|    +--------------------+
    |#|    | information_schema |
    |#|    | mysql              |
    |#|    | test               |
    |#|    +--------------------+
    |#|    3 rows in set (0.00 sec)
    
    mysql> create database usrdb_b3;
    |#|    Query OK, 1 row affected (0.00 sec)
    mysql> GRANT ALL PRIVILEGES ON usrdb_*.* TO 'b3'@'localhost' IDENTIFIED BY 'geheim';
    |#|    Query OK, 0 rows affected (0.00 sec)
    quit zum verlassen
    
    
    3) B3 Installieren

    Zur Zeit Aktuell: B3 v1.3.2 Source, Herunterzuladen unter
    http://www.bigbrotherbot.net/forums/downloads/?sa=view;down=64
    Du kannst es jetzt entweder Manuell herunterladen und dann wieder hoch, dann überspringst du den nächsten Schritt und machst bei unzip weiter. Oder du machst es wie ich und klickst den Link im Browser nur an. In dem anschliessenden Download Dialog erfährst du wo die Datei auf dem Server liegt und kannst den Pfad dann auf der Linuxmaschine benutzen um das Paket per wget direkt herunterzuladen. Oder du nimmst gleich lynx... Wie auch immer ich benutze jetzt hier die wget Methode mit dem Pfad den mir der Server verät wenn ich den Link folge.

    kellerkind@ubuntu:~/$ wget http://download.github.com/BigBrotherBot-big-brother-bot-v1.3.2-0-g5bd503b.zip
    
    |#|--2010-07-28 18:13:52--  http://download.github.com/BigBrotherBot-big-brother-bot-v1.3.2-0-g5bd503b.zip
    |#|Aufl-sen des Hostnamen +download.github.com½.... 207.97.227.240
    |#|Verbindungsaufbau zu download.github.com|207.97.227.240|:80... verbunden.
    |#|HTTP Anforderung gesendet, warte auf Antwort... 200 OK
    |#|L¦nge: 575918 (562K) [application/zip]
    |#|In +BigBrotherBot-big-brother-bot-v1.3.2-0-g5bd503b.zip½ speichern.
    |#|
    |#|100%[======================================>] 575.918      575K/s   in 1,0s
    |#|
    |#|2010-07-28 18:13:53 (575 KB/s) - +BigBrotherBot-big-brother-bot-v1.3.2-0-g5bd503b.zip½ gespeichert [575918/575918]
    |#|
    
    kellerkind@ubuntu:~$ unzip BigBrotherBot-big-brother-bot-v1.3.2-0-g5bd503b.zip
    
    |#|Archive:  BigBrotherBot-big-brother-bot-v1.3.2-0-g5bd503b.zip
    |#|5bd503b23844ba5be2f6bc653d02a42f0afa94e9
    |#|   creating: BigBrotherBot-big-brother-bot-5bd503b/
    |#|  inflating: BigBrotherBot-big-brother-bot-5bd503b/.gitignore
    |#|  inflating: BigBrotherBot-big-brother-bot-5bd503b/CHANGELOG
    |#|  inflating: BigBrotherBot-big-brother-bot-5bd503b/ChangeLogDetailed.txt
    |#| -------------------->8------SCHNIPP für Lesbarkeit------->8--------
    |#| inflating: BigBrotherBot-big-brother-bot-5bd503b/versions.txt
    
    kellerkind@ubuntu:~$ mv BigBrotherBot-big-brother-bot-5bd503b/ jenny/    # Den Ordner in etwas einfacher zu merkendes umbennenen   
    kellerkind@ubuntu:~$ cd jenny/
    kellerkind@ubuntu:~/jenny$ python b3_run.py
    
    |#|Searching for config file: b3.xml
    |#|Searching for config file: conf/b3.xml
    |#|Searching for config file: b3/conf/b3.xml
    |#|Searching for config file: /home/kellerkind/b3.xml
    |#|Searching for config file: /home/kellerkind/conf/b3.xml
    |#|Searching for config file: /home/kellerkind/b3/conf/b3.xml
    |#|Searching for config file: /home/kellerkind/jenny/b3/conf/b3.xml
    |#|b3/conf/b3.xml
    
    |#|    WELCOME ubuntu, TO THE B3 SETUP PROCEDURE
    |#|----------------------------------------------------------------
    |#|We're about to generate a main configuration file for
    |#|BigBrotherBot. This procedure is initiated when:
    |#|
    |#| 1. you run B3 with the option --setup or -s
    |#| 2. the config you're trying to run does not exist
    |#|    (b3/conf/b3.xml)
    |#| 3. you did not modify the distributed b3.xml prior to
    |#|    starting B3.
    |#|
    |#|[Enter] to continue, 'abort' to abort Setup:
    
    
    
    
    
    
    
    
                                                                                     

    Beim ersten Start wird ein Wizzard ausgeführt der alle Parameter abfragt und die Configurationsdatei b3.xml erstellt. Die vorausgewählten Werte sind sinnvoll, nur bei database, gamelog und rcon Passwort müssen die Vorgaben angepasst werden. Hier im Beispiel für die Datenbank der String mysql://b3:geheim@localhost/usrdb_b3

    --B3 SETTINGS---------------------------------------------------
    parser         : cod2
    database       : mysql://b3:geheim@localhost/usrdb_b3
    bot_name       : b3
    bot_prefix     : ^0(^2b3^0)^7:
    time_format    : %I:%M%p %Z %m/%d/%y
    time_zone      : CST
    log_level      : 9
    logfile        : b3.log

    --GAME SERVER SETTINGS------------------------------------------
    rcon_password  : geheim
    port           : 28960

      NOTE for game_log:
      You are running python 2.6.4, the gamelog may also be
      ftp-ed in.
    Define game_log like this:
      ftp://[ftp-user]:[ftp-password]@[ftp-server]/path/to/games_mp.log
    game_log       : /home/kellerkind/cod2/main/games_mp.log

    > The public IP your gameserver is residing on
    public_ip [127.0.0.1]:
    4) Datenbank create:

    Nach der Installation des B3 im letzten Punkt befindet sich nun unter /home/kellerkind/jenny/b3/docs/ ein Datenbank Dump mit dem die Tabellen - der Inhalt für die Datenbank - erstellt werden müssen.

    kellerkind@ubuntu:~/jenny$ mysql usrdb_b3 -u b3 -p < /home/kellerkind/jenny/b3/docs/b3.sql
    Enter password: ********

    Achtung - im Erfolgsfall gibt dieser Befehl nichts zurück. Aber wir können nachschauen wenn kein Fehler kommt ob das alles seine Richtigkeit hat (und zum üben):


    kellerkind@ubuntu:~/jenny$ mysql -u b3 -p

    Enter password:
    |#|Welcome to the MySQL monitor. Commands end with ; or \g.
    |#|Your MySQL connection id is 107
    |#|Server version: 5.1.41-3ubuntu12.3 (Ubuntu)
    |#|
    |#|Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    |#|
    mysql> show databases;
    |#| +--------------------+
    |#| | Database |
    |#| +--------------------+
    |#| | information_schema |
    |#| | usrdb_b3|
    |#| +--------------------+

    |#| 2 rows in set (0.00 sec)

    mysql> use usrdb_b3;
    Database changed
    mysql> show tables;
    +--------------+
    | Tables_in_usrdb_b3 |
    +--------------+
    | aliases      |
    | clients      |
    | groups       |
    | penalties    |
    +--------------+
    4 rows in set (0.00 sec)

    mysql> quit
    Bye

    5) B3 und Gameserver starten

    Na bitte. Alles paletti soweit. B3 Installiert und konfiguriert, Datenbank installiert, Konfiguriert und ready für Daten, denn mal den Gameserver starten:


    Start Server:

    kellerkind@ubuntu:/home/kellerkind/cod2$ /home/kellerkind/cod2/cod2_lnxded +set dedicated 1 +rcon_password geheim +set sv_punkbuster 1
    CoD2 MP 1.3 build linux-i386 Jun 23 2006
    ----- FS_Startup -----
    Current language: english
    Current search path:
    /home/kellerkind/.callofduty2/main
    /home/kellerkind/cod2/main/iw_15.iwd (85 files)
    /home/kellerkind/cod2/main/iw_14.iwd (4038 files)
    /home/kellerkind/cod2/main/iw_13.iwd (22624 files)
    /home/kellerkind/cod2/main/iw_12.iwd (1016 files)
    /home/kellerkind/cod2/main/iw_11.iwd (1462 files)
    /home/kellerkind/cod2/main/iw_10.iwd (1936 files)
    /home/kellerkind/cod2/main/iw_09.iwd (2142 files)
    /home/kellerkind/cod2/main/iw_08.iwd (2723 files)
    /home/kellerkind/cod2/main/iw_07.iwd (3384 files)
    /home/kellerkind/cod2/main/iw_06.iwd (990 files)
    /home/kellerkind/cod2/main/iw_05.iwd (928 files)
    /home/kellerkind/cod2/main/iw_04.iwd (698 files)
    /home/kellerkind/cod2/main/iw_03.iwd (26 files)
    /home/kellerkind/cod2/main/iw_00.iwd (102 files)
    /home/kellerkind/cod2/main
    /home/kellerkind/.callofduty2/raw
    /home/kellerkind/.callofduty2/raw_shared
    /home/kellerkind/.callofduty2/devraw
    /home/kellerkind/.callofduty2/devraw_shared
    /home/kellerkind/cod2/raw
    /home/kellerkind/cod2/raw_shared
    /home/kellerkind/cod2/devraw
    /home/kellerkind/cod2/devraw_shared
    /home/kellerkind/cod2/main/localized_english_iw11.iwd (1 files)
        localized assets iwd file for english

    File Handles:
    ----------------------
    42155 files in iwd files
    execing default_mp.cfg
    couldn't exec language.cfg
    couldn't exec config_mp_server.cfg
    dedicated is read only.
    Opening IP socket: localhost:28960
    Hostname: ubuntu
    IP: 192.168.1.1
    --- Common Initialization Complete ---
    dedicated is read only.
    sv_punkbuster is write protected.
    PunkBuster Server: 0 Power Players loaded from /home/kellerkind/.callofduty2/pb/pbpower.dat
    PunkBuster Server: 0 PB Rcon Filters loaded from /home/kellerkind/.callofduty2/pb/pbrcon.dat
    PunkBuster Server: 0 Map lines loaded from /home/kellerkind/.callofduty2/pb/pbsvmaps.cfg
    PunkBuster Server: Attempting to resolve master7.evenbalance.com
    PunkBuster Server: Resolved to [216.240.146.139]
    PunkBuster Server: PunkBuster Server (v1.276 | A1383 C1.520) Enabled
    Hitch warning: 3249 msec frame time
    PunkBuster Server: Game Version [CoD2 MP 1.3 build pc_1.3_1_1 Mon May 01 2006 05:05:43PM linux-i386]
    map mp_carentan
    g_gametype random is not a valid gametype, defaulting to dm
    ------ Server Initialization ------
    Server: mp_carentan
    ----- FS_Startup -----
    Current language: english
    Current search path:
    /home/kellerkind/.callofduty2/main
    /home/kellerkind/cod2/main/iw_15.iwd (85 files)
    /home/kellerkind/cod2/main/iw_14.iwd (4038 files)
    /home/kellerkind/cod2/main/iw_13.iwd (22624 files)
    /home/kellerkind/cod2/main/iw_12.iwd (1016 files)
    /home/kellerkind/cod2/main/iw_11.iwd (1462 files)
    /home/kellerkind/cod2/main/iw_10.iwd (1936 files)
    /home/kellerkind/cod2/main/iw_09.iwd (2142 files)
    /home/kellerkind/cod2/main/iw_08.iwd (2723 files)
    /home/kellerkind/cod2/main/iw_07.iwd (3384 files)
    /home/kellerkind/cod2/main/iw_06.iwd (990 files)
    /home/kellerkind/cod2/main/iw_05.iwd (928 files)
    /home/kellerkind/cod2/main/iw_04.iwd (698 files)
    /home/kellerkind/cod2/main/iw_03.iwd (26 files)
    /home/kellerkind/cod2/main/iw_00.iwd (102 files)
    /home/kellerkind/cod2/main
    /home/kellerkind/.callofduty2/raw
    /home/kellerkind/.callofduty2/raw_shared
    /home/kellerkind/.callofduty2/devraw
    /home/kellerkind/.callofduty2/devraw_shared
    /home/kellerkind/cod2/raw
    /home/kellerkind/cod2/raw_shared
    /home/kellerkind/cod2/devraw
    /home/kellerkind/cod2/devraw_shared
    /home/kellerkind/cod2/main/localized_english_iw11.iwd (1 files)
        localized assets iwd file for english

    File Handles:
    ----------------------
    42155 files in iwd files
    ------- Game Initialization -------
    gamename: Call of Duty 2
    gamedate: Jun 23 2006
    -----------------------------------
    -----------------------------------
    Hitch warning: 7471 msec frame time
    Resolving cod2master.activision.com
    cod2master.activision.com resolved to 63.146.124.40:20710
    Sending heartbeat to cod2master.activision.com                                 

     

    Ich spare mir jetzt mal eine ausführliche Beschreibung zum Gameserver, diese eine Zeile reicht zum testen wenn du in der console dann noch map mp_carentan eintippst. Ansonsten lies dir die HowTos zu Dedicated Servern durch.
    Und Jetzt den b3_run.py starten:

    kellerkind@ubuntu:~/jenny$ python b3_run.py
    Searching for config file: b3.xml
    Searching for config file: conf/b3.xml
    Searching for config file: b3/conf/b3.xml

    checking for updates...
    ...no update available.

    Starting www.BigBrotherBot.com (b3) v1.3.2 [posix] (Daniel)

    Using config file: b3/conf/b3.xml
    Using external plugin directory: /home/kellerkind/jenny/b3/extplugins
    Activating log   : b3.log                                                      

    Connecting to DB : OK
    Using Gamelog    : /home/kellerkind/cod2/main/games_mp.log
    Loading Events   : 32 events loaded
    Loading Plugins  : ........... (11)
    Starting Plugins : ........... (11)
    Startup Complete : Let's get to work!

    (Please check b3.log in the B3 root directory for more detailed info)

    Erstellt von KK.You are free to copy, redistribute and change this work

    This work is in the Public Domain.

    Diese Anleitung steht unter einer Creative Commons Lizenz und darf ausdrücklich kopiert, verändert, verlinkt und verbessert werden.

    BigBrotherBot(B3) ist Copyright (C) 2005 Michael "ThorN" Thornton und wurde unter den Bedingungen der GNU General Public License Version 2 (oder Später) veröffentlicht.

     

      MySQL Community Server ist Copyright (C) Oracle
      Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
      This software comes with ABSOLUTELY NO WARRANTY. This is free software,
      and you are welcome to modify and redistribute it under the GPL v2 license

      Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
      This software comes with ABSOLUTELY NO WARRANTY. This is free software,
      and you are welcome to modify and redistribute it under the GPL license