docker-tmserver/xaseco/DOCS/quickstart_tmn.html

227 lines
14 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>TrackMania Nations - TMN &amp; XASECO quick start guide</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<META NAME="author" CONTENT="Frans P. de Vries">
<META NAME="generator" CONTENT="vi :)">
<style type="text/css">
body { width: 960px; margin-left: 30px; font-family: Arial,Helvetica,sans-serif; font-size: 15px; }
li,div { padding: 3px; }
code,pre { font-size: 14px; }
pre { width: 90%; margin: 3px 0px; padding: 3px 0px 3px 12px; background-color: #F0F0F0; }
</style>
<META NAME="keywords" CONTENT="TrackMania, Nations, Original, Sunrise, racing, games, XASECO, ASECO, RASP, Jfreu, plugins, records, jukebox, Nadeo">
<META NAME="description" CONTENT="Information on setting up a dedicated server and the XASECO system for TrackMania Nations, a racing game by Nadeo">
</HEAD>
<BODY TEXT="#000000" LINK="#ff0000" VLINK="#0000ff" ALINK="#00ff00" BGCOLOR="#ffffff">
<P ALIGN="center">
<A TARGET="_blank" HREF="http://eswc.trackmanianations.com/"><IMG SRC="banner.jpg" ALT="TrackMania Nations" BORDER="0" WIDTH="590" HEIGHT="149"></A>
<HR>
<H3>Quick Start Guide:</H3>
This is step-by-step guide to setting up a classic TrackMania Nations (TMN) dedicated server with XASECO for those lost in or confused by the <A HREF="/tmn/#resources">available readme's and tutorials</A>, and those just too lazy to read them. ;-)
<P>
It's written for Linux but should largely apply to Windows too, and your system needs to have a working MySQL 4.x or 5.x and PHP 5.x setup. To manage the database, enter the MySQL commands in the mysql command prompt, PhpMyAdmin or another tool of your choice. You need to run the TMN server and XASECO on the same machine, running them on separate machines is beyond the scope of this guide.
<P>
First, the dedicated server:
<OL>
<LI>Ideally, the TMN server and XASECO run under a user account rather than root, so create a user e.g. "<b>tmn</b>" with home directory "<b>/home/tmn</b>".
<LI>Login as (or switch to) user "tmn" so that all files created down the road receive the correct ownership and permissions.
<LI>Download and unzip the final TMN server (<A TARGET="_blank" HREF="http://www.tm-forum.com/viewtopic.php?t=1350">TmDedicatedServer_2006-05-30.zip</A>) into this home directory, the default path will be <b>TmDedicatedServer/</b>.
<LI>Edit <b>TmDedicatedServer/dedicated.cfg</b>:
<OL type="a">
<LI>In the &lt;authorization_levels&gt; section, change all three <b>passwords</b>, but do <u>not</u> change the names (SuperAdmin, Admin, User).
<LI>In the &lt;masterserver_account&gt; section, enter a <u>new</u> server <b>&lt;login&gt;</b> (different from your player login) with its own <b>&lt;password&gt;</b> (again different) and an appropriate and valid three-letter <b>&lt;nation&gt;</b>. If you're not sure your chosen login is new, use your TMN client to test it first, in both cases the account will be registered automatically with the masterserver.
<LI>In the &lt;server_options&gt; section, give your server a <b>&lt;name&gt;</b> and configure the other options to your liking.
<LI>In the &lt;system_config&gt; section, set <b>&lt;connection_type&gt;</b> to a value closest to your connection's speed (see the <A TARGET="_blank" HREF="/tmn/docs/readme_dedicated.html">server readme</A> for correct values), and remember the three port numbers (default: 2350 for the server, 3450 for P2P and 5000 for XMLRPC; these can be changed to other free port numbers, but it's recommended to keep the defaults at least until your server comes online successfully).
</OL>
<LI>Edit the default match settings file TmDedicatedServer/GameData/Tracks/MatchSettings/Internet/AdvancedTraining.txt to your liking (again, see the <A TARGET="_blank" HREF="/tmn/docs/readme_dedicated.html">server readme</A> for details).
<LI>On your firewall/router, open the server port 2350 and the P2P port 3450 for both UDP and TCP traffic, but <u>not</u> the XMLRPC port 5000. For the Dedimania system in XASECO port <b>8002</b> needs to be open as well. For more information on this, <A TARGET="_blank" HREF="http://www.portforward.com/">PortForward.com</A> may be useful.
<LI>Start the server:<br>
<div>
&nbsp;&nbsp;&nbsp;<b><CODE>cd ~/TmDedicatedServer/</CODE></b><br>
&nbsp;&nbsp;&nbsp;<b><CODE>./RunTrackmaniaNations.sh</CODE></b> (or <CODE>RunTrackmaniaNations.bat</CODE>)<br>
</div>
You should see output like the following:<br>
<PRE>
Starting TmNationsESWC v2006-05-30...
Unable to open '/home/tmn/TmDedicatedServer/Default.SystemConfig.GbxInitializing...
Configuration file : dedicated.cfg
Loading system configuration...
...system configuration loaded
Loading cache...
...OK
Listening for xml-rpc commands on port 5000.
Trackmania server daemon started with pid=28936 (parent=28935).
</PRE>
If you get a Segmentation Fault here, the server cannot create files/directories due to ownership/permission problems (perhaps you forgot step 2?).
<LI>The first time the server starts, it creates that Default.SystemConfig.Gbx file, as well as the blacklist.txt and guestlist.txt files and a number of directories like Logs/, GameData/Cache/, GameData/Profiles/, GameData/Scores/, GameData/Tracks/Campaigns/, GameData/Tracks/Replays/, GameData/Tracks/Challenges/Downloaded/ and GameData/Tracks/Challenges/My Challenges/. The files in the Logs/ directory are useful to monitor your server's activity.
<LI>Start your TMN client and check in the Internet server browser that the server is running in your Nation with your chosen server name and the Nadeo Advanced tracks.
<LI>Join your server, and have a friend join from elsewhere on the Internet, to verify that the server is accessible.
<LI>Ignore the private network warning that is always logged in ConsoleLog.*.txt.
<LI>To start &amp; stop your TMN server on Linux more easily, you can use this <A TARGET="_blank" HREF="http://www.tm-forum.com/viewtopic.php?t=10240">start-up script</A>.
<LI>Collect your own tracks in GameData/Tracks/Challenges/My Challenges/, copy and edit a new match settings file in GameData/Tracks/MatchSettings/Internet/ that lists those tracks, use that file in RunTrackmaniaNations.sh (or RunTrackmaniaNations.bat), and restart your server. It should now be running your track selection. Congratulations. :-)
</OL>
<A NAME="xaseco"></A>
Secondly, the XASECO system:
<OL>
<LI>Create the XASECO database in MySQL (default "aseco" but any other name is okay too):<br>
<div>
&nbsp;&nbsp;&nbsp;<b><CODE>CREATE DATABASE aseco;</CODE></b><br>
</div>
Also create a separate user (e.g. "<b>tmn</b>") in MySQL with a <b>password</b>, and grant this user all rights to the "<b>aseco</b>" database. The basic MySQL commands are:<br>
<div>
&nbsp;&nbsp;&nbsp;<b><CODE>CREATE USER 'tmn'@'localhost';</CODE></b><br>
&nbsp;&nbsp;&nbsp;<b><CODE>SET PASSWORD FOR 'tmn'@'localhost' = password('password');</CODE></b><br>
&nbsp;&nbsp;&nbsp;<b><CODE>GRANT all ON aseco.* TO 'tmn'@'localhost';</CODE></b>
</div>
<LI>Login as (or switch to) user "tmn" so that all files created down the road receive the correct ownership and permissions.
<LI>Download and unzip XASECO (<A HREF="/tmn/#download">latest version</A>) into the "/home/tmn/" directory too, the default path will be <b>xaseco/</b> so that future releases can be unpacked into the same directory tree.<br>
In the zip file, all *.XML and config files are located inside the <b>newinstall/</b> directory. Go into the newinstall/ directory and move all *.XML files into the main directory (next to aseco.php), and move all *.PHP files into the includes/ directory.<br>
Also, move Aseco.sh (on Linux) or Aseco.bat (on Windows) into the main directory and adjust it to your situation if necessary.
<LI>Setting up the database tables in MySQL is done automatically the first time XASECO runs, but if you prefer you can do it manually in advance:<br>
<div>
&nbsp;&nbsp;&nbsp;<b><CODE>USE aseco;</CODE></b><br>
&nbsp;&nbsp;&nbsp;<b><CODE>SOURCE /home/tmn/xaseco/localdb/aseco.sql;</CODE></b><br>
&nbsp;&nbsp;&nbsp;<b><CODE>SOURCE /home/tmn/xaseco/localdb/rasp.sql;</CODE></b><br>
&nbsp;&nbsp;&nbsp;<b><CODE>SOURCE /home/tmn/xaseco/localdb/extra.sql;</CODE></b>
</div>
<LI>Edit <b>xaseco/localdatabase.xml</b>:
<OL type="a">
<LI>Replace YOUR_MYSQL_LOGIN with the MySQL user you created above, e.g. <b>tmn</b>.
<LI>Replace YOUR_MYSQL_PASSWORD with the MySQL password you set above.
<LI>Use the same database name as you created above, e.g. <b>aseco</b>.
<LI>localhost is your own machine, so the server option is okay.
</OL>
<LI>Edit <b>xaseco/config.xml</b>:
<OL type="a">
<LI>In the &lt;masteradmins&gt; section, uncomment and replace YOUR_MASTERADMIN_LOGIN with your player login, and add further logins for other players you want to grant all XASECO admin rights.
<LI>In the &lt;tmserver&gt; section, replace YOUR_SUPERADMIN_PASSWORD with the password you chose for SuperAdmin in dedicated.cfg (TMN step 4a above) but do <u>not</u> change the SuperAdmin login itself.
<LI>The &lt;port&gt; field should contain the same XMLRPC port number you chose in dedicated.cfg (TMN step 4d above), default 5000.
<LI>IP 127.0.0.1 is your own machine again, so that option is okay too.
</OL>
<LI>Edit <b>xaseco/adminops.xml</b>:
<OL type="a">
<LI>In the &lt;admins&gt; section, uncomment and replace YOUR_ADMIN_LOGIN with an admin's login, and add further logins for other players you want to grant partial XASECO admin rights. Or leave the &lt;tmlogin&gt; entry commented out if there are none.
<LI>In the &lt;operators&gt; section, uncomment and replace YOUR_OPERATOR_LOGIN with an operator's login, and add further logins for other players you want to grant XASECO operator rights. Or leave the &lt;tmlogin&gt; entry commented out if there are none.
</OL>
<LI>Edit <b>xaseco/dedimania.xml</b> if you want to use the Dedimania world records system:
<OL type="a">
<LI>In the &lt;masterserver_account&gt; section, replace YOUR_SERVER_LOGIN and YOUR_SERVER_PASSWORD with the &lt;login&gt; and &lt;password&gt; values from
your dedicated.cfg file.
<LI>Also, replace YOUR_SERVER_NATION with the &lt;nation&gt; value.
<LI>Instead of the password you can also enter the community code for your server which can be obtained by using the server login/password on the <a target="_blank" href="http://links.xaseco.org/official.php">official site</a> for your game (TMO/TMS/TMN).
<LI>To disable Dedimania support, remove or comment out the chat.dedimania.php and plugin.dedimania.php entries in plugins.xml.
</OL>
<LI>Start the XASECO system:<br>
<div>
&nbsp;&nbsp;&nbsp;<b><CODE>cd ~/xaseco/</CODE></b><br>
&nbsp;&nbsp;&nbsp;<b><CODE>./Aseco.sh</CODE></b> (or <CODE>Aseco.bat</CODE>)<br>
</div>
You won't see output, but logfile.txt should contain something like the following:<br>
<PRE>
[XAseco] PHP Version is 5.3.x on Linux
[XAseco] Load settings [config.xml]
[XAseco] Load admin/ops lists [adminops.xml]
[XAseco] Load banned IPs list [bannedips.xml]
[XAseco] Load plugins list [plugins.xml]
[XAseco] Load plugin [plugin.localdatabase.php]
[XAseco] Load plugin [plugin.rounds.php]
[...snip plugins...]
[XAseco] Load plugin [jfreu.plugin.php]
[XAseco] Load plugin [mistral.idlekick.php]
[XAseco] Try to connect to TM dedicated server on 127.0.0.1:5000 timeout 180s
[XAseco] Try to authenticate with username 'SuperAdmin' and password 'PASSWORD'
[XAseco] Connection established successfully!
[Local DB] Load settings file
[Local DB] Try to connect to MySQL server on 'localhost' with database 'aseco'
[Local DB] MySQL Server Version is 5.1.56-log
[RASP] Cleaning up unused data
*-*-*-*-*-* RASP is running! *-*-*-*-*-*
|...Loading Settings
|...Loaded!
|...Checking database structure
|...Structure OK!
|...Calculating ranks
|...Done!
[12/xx,xx:11:17] ************* (Dedimania) *************
[12/xx,xx:11:17] * Dataserver connection on Dedimania ...
[12/xx,xx:11:17] * Try connection on http://dedimania.net:8002/Dedimania ...
[12/xx,xx:11:18] Webaccess (dedimania.net:80): send: deflate, receive: gzip
[12/xx,xx:11:18] * Connection and status ok! :)
[12/xx,xx:11:18] * NEWS (Dedimania, 08/05): news
[12/xx,xx:11:18] ------------- (Dedimania) -------------
[12/xx,xx:11:18] Load auto timelimit config [autotime.xml]
###############################################################################
XASECO v1.1x running on 127.0.0.1:5000
Name : YOUR SERVER NAME
Game : TmNationsESWC - TimeAttack
Version: 0.1.7.4 / 2006-05-30
Authors: Florian Schnell & Assembler Maniac
Re-Authored: Xymph
###############################################################################
Begin Race
[12/xx,xx:11:18] track changed [none] >> [Pro - 38~74~75~89~93]
[12/xx,xx:11:18] currently no record on Pro - 38~74~75~89~93
</PRE>
If you get an RPC Permission Error here, there is an XMLRPC port mismatch or the dedicated server isn't running (anymore).
<LI>To start &amp; stop your XASECO on Linux more easily, you can use this <A TARGET="_blank" HREF="http://www.tm-forum.com/viewtopic.php?p=123826#p123826">start-up script</A>.
<LI>Edit the <A HREF="/tmn/#config">configuration options</A> to your liking, and restart XASECO. It should now be ready to manage tracks, receive players, and record... er... records. Congratulations. :-)
</OL>
Finally, to run another server on the same machine:
<OL>
<LI>Basically follow the same steps above, but use a second user account (e.g. "tmn2"), another new server login/password in dedicated.cfg, a separate server name, a second set of ports (e.g. 2351, 3451 and 5001), a new database (e.g. "aseco2"), optionally a second MySQL account (e.g. "tmn2"), and the corresponding updates in localdatabase.xml and config.xml.
<LI>Don't use symbolic links in the GameData/ directory tree (e.g. to symlink the tracks from the first server to the second one), as the TMN server will crash without an error message.
</OL>
And for the last time, read the <A HREF="/tmn/#resources">readme's and tutorials</A> completely for a more thorough understanding of the entire setup.
<br><br>
<HR>
<ADDRESS>
Copyright &copy; 2007-2013 &ndash; Frans P. de Vries <A HREF="mailto:tm&#64;&#103;&#97;&#109;&#101;&#114;&#115;&#46;&#111;&#114;&#103;">&lt;tm&#64;&#103;&#97;&#109;&#101;&#114;&#115;&#46;&#111;&#114;&#103;&gt;</A>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
Last updated 08-May-2013
</ADDRESS>
</BODY>
</HTML>