UrT

Go to content

Main menu

Install Notes

The UrT server itself is easy to install and get working first time.
I followed instructions on the Urban Terror website
http://www.urbanterror.info/support/174-linux-server-install/
Not much point in repeating it here

However B3 and XLRSTATS was a nightmare.

These notes are very rough and might not make sense,
I tried to write down every step I did to install B3 and XLRSTATS
because it is not an easy install.

References used

http://wiki.bigbrotherbot.net/installation:preparing_the_environment
http://bigbrotherbot-user-documentation.readthedocs.io/en/latest/getting-started/first_run.html


https://mariusvw.com/wp-content/uploads/urban-terror-server-setup.pdf
https://github.com/BigBrotherBot/big-brother-bot/wiki/installing_python



Prerequisites
Several components are required before installing B3 in itself:
• A MySQL server and therefore PhPMyAdmin and a Web server (the later
being mandatory for xlrstats). Under Debian, just run:

apt-get install apache2 mysql-server phpmyadmin
sudo apt-get install python-mysqldb

When you're installing the source distribution package you can unzip the source code package to any directory you like.
download big-brother-bot-1.12.tar.gz from https://github.com/BigBrotherBot/big-brother-bot/releases
I copied to /home/urt
extract file
tar -xvzf big-brother-bot-1.12.tar.gz

Creating the database
I installed and used webmin here to have access to the mysql
cd /home/urt/big-brother-bot-1.12/b3/sql/mysql
I opened the file b3-db.sql

in my putty session I typed in
mysql
CREATE DATABASE b3 CHARACTER SET utf8;
GRANT ALL ON b3.* TO 'b3'@'localhost' IDENTIFIED BY '1288Merlot';
exit

checked in webmin and it is created database b3 with user b3
In webmin I gave phpmyadmin and b3 users ALL permissions
I was having problem before with phpmyadmin because the user was no permissions.
now phpmyadmin is working so I can either user phpmyadmin or webmin for executing sql scripts

Initializing the database

On the database you just created, import the b3.sql file located in
/home/urt/big-brother-bot-1.12/b3/sql/mysql
to create the tables and insert the initial values in your database.

I used phpmysql for this under the import tab I was able to import b3.sql and successfully run it
successfully

Need to install XLRSTATS next
https://github.com/XLRstats/xlrstats-web-v3/blob/master/INSTALL.md

Download from http://www.xlrstats.com/
and extract to /var/www folder
tar -xvzf xlrstats-web-v3-3.0.0-beta.10.tar.gz
Need to change permissions for /apps/Config and apps/tmp so that the webserver

can write to them
sudo chmod -R 777 /app/Config
sudo chmod -R 777 /app/tmp
Or use a file manager to do this.

Need to enable mod_rewrite:
sudo a2enmod rewrite
Then open up the following file, and replace every occurrence of "AllowOverride None" with "AllowOverride all".
sudo nano /etc/apache2/sites-available/default
sudo service apache2 restart



then in web browser open the URL that you uploaded XLRstats to
http://lepiney.geek.nz/xlrstats-web-v3-3.0.0-beta.10/
Installation process begins

1. License agreement
2. Server test (tests if the webserver meets the minimal credentials)
- need to get a key? XLR3-ESV3-CN9C-Q88Z-8XSL-WDDA
3. Database setup (a database, database user with password and write access to the database must already exist)

created database XLRSTATS in phpmyadmin
updating - In order to update the tables properly you need to execute the app/Config/Schema/xlrstats.sql against
your xlrstats database. It will recreate a number of tables. It will leave the users and servers data intact

4. Adding the administrative (super)user
5. Adding the first gameserver
6. Finishing up

IMPORTANT!!!
Whole thing won't work unless you run all the SQL updates on the b3 database
in phpmyadmin bring up the b3 database
import and execute all the update sql scripts in b3
there are six from b3-update-1.3.0.sql to b3-update-1.10.0.sql

Setting up the plugin for v3
edit file b3/conf/plugin_xlrstats.ini
to reflect your situation
webfrontversion: 3
webfronturl: http://lepiney.geek.nz/xlrstats-web-v3-3.0.0-beta.10/
servernumber: 1 (it's the last digit in the url when I have it in a web browser)

xlrstats.ini file tweaks
[settings]
minplayers: 1
minlevel: guest
# automatically purge players from xlrstats after a year of inactivity? (cannot be undone!)
auto_purge: yes
# exclude_bots: do not count kills and damages to and from bots - allowed value: yes or no
exclude_bots: no (for testing purposes - turn back on when OK)

Setting up B3's main config file

I tried running the wizrd but it didn't work so using the file generator instead
http://config.bigbrotherbot.net/form.php?parser=iourt42
Unfortunately no option for selecting Urban Terror 4.3 so using 4.2 instead

NOTE:
Make sure to put to log file for Urban Terror in /home/urt/urbanterror43/q3ut4/games.log
Not the game log in the b3 directory

NOTE1:
The section called built-in plugins and External plugins refer to .XML files
They are not - they are .ini files

NOTE2:
Under external plugins the xlrstat plugin.ini file is actually not in the /b3/extplugins folder.
It is in the b3/plugins folder.
I pointed the reference to b3/plugins
These are the plugins I used
   <plugin name="admin" config="@conf/plugin_admin.ini"/>
   <plugin name="stats" config="@conf/plugin_stats.ini"/>
   <plugin name="pingwatch" config="@conf/plugin_pingwatch.ini"/>
   <plugin name="status" config="@conf/plugin_status.ini"/>
   <plugin name="welcome" config="@conf/plugin_welcome.ini"/>
   <plugin name="xlrstats" config="@conf/plugin_xlrstats.ini"/>



Once I created the b3.xml file with the generator I copied it to the /b3/conf folder
b3.xml leave time zone as CET (not sure what it should be for NZ but it breaks if you change it)



In a putty session I went to the b3 directory
cd /home/urt/big-brother-bot-1.12/b3

Next step is to run b3
python /home/urt/big-brother-bot-1.12/b3_run.py -c /home/urt/big-brother-bot-1.12/b3/conf/b3.xml

Error ImportError: no module named dateutil.tz
tried
sudo apt-get install python-dateutil
that fixed that error

reran python ./b3_run.py -c /conf/b3.xml
next error
can not read file /home/urt/big-brother-bot-1.12/b3/game.log

created a file for this and reran
still same error
need to use format @b3/ or @conf/ to specify file locations
not the whole path name
THat fixed that error

Now next error
cannot connect to RCON
game port has to be 27960 and not the default 28960 in the b3.xml file
that fixed that error

after running python ./b3_run.py -c /conf/b3.xml again

Everything Worked!

to run in background
screen -m -d -S XLRSTAT python /home/urt/big-brother-bot-1.12/b3_run.py -c /home/urt/big-brother-bot-1.12/b3/conf/b3.xml


So, it is wise to go in game immediately after starting B3 and typing !iamgod in chat, it will register you as the SuperAdmin and disable the !iamgod command.



---------------------------------------------------------------
Urban Terror 4.1 and 4.2

Make sure your game server config sets the g_logsync cvar correctly.


set g_logsync 2


You might want to log every bullet hit to the game log file in order for B3 to work with plugins such as XLRstats. Then set the cvar g_loghits as bellow.


set g_logsync "2"    // 0=no log, 1=buffered, 2=continuous, 3=append
set g_loghits "1"    // log hits which allows b3 to recognize headshots and xlrstats to provide hit locatio


Back to content | Back to main menu