NL/Server Manual: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 40: Line 40:
*Klaar!
*Klaar!


==Configuring your server==
==Configureren van de server==
Begin by opening the ''''mtaserver.conf'''' file, which is located in the <SERVER>/mods/deathmatch directory in a text editor, for example Windows Notepad.
Begin door ''''mtaserver.conf'''', in de map <SERVER>/mods/deathmatch, te openen in een tekstverwerker, bijvoorbeeld kladblok.


This file is fairly straightforward; every variable has a description of what to do with it and how to change it.
Het bestand is duidelijk: elke variabele heeft een beschrijving van wat het doet of wat je er mee moet doen, en hoe je het moet veranderen. Let op: deze beschrijvingen zijn Engels!


===Adding admins===
===Administrators toevoegen===
''For a full explanation of acl.xml (access control list) read: [[Access_Control_List|Access Control List]]''<br/><br/>
''Voor een volledige uitleg van acl.xml (access control list (toegangsbeheerlijst)) lees: [[Access_Control_List|Toegangsbeheerlijst]]''<br/><br/>
To add admins to your sever follow these steps:<br>
Volg deze stappen om admins toe te voegen::<br>
<ol>
<ol>
<li>Browse to your servers 'deathmatch' folder and open Accounts.xml</li>
<li>Ga naar de 'deathmatch' map van je server, en open Accounts.xml</li>
<li>Add a new account into the file with the syntax below
<li>Voeg een nieuwe account toe met de volgende syntax:
<div style="padding: 10px">
<div style="padding: 10px">
''''Accounts.xml syntax''''
''''Accounts.xml syntax''''
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<account name="Username" password="UserPassword" />
<account name="Gebruikersnaam" password="Wachtwoord" />
</syntaxhighlight>
</syntaxhighlight>
</div>
</div>
<li>Save and close the file</li>
<li>Sla het bestand op, en sluit het af.</li>
<li>Open acl.xml</li>
<li>Open acl.xml</li>
<li>Select the rights of the admin, either Moderator, SuperModerator or Admin</li>
<li>Kies de rechten van de admin, moderator, of supermoderator</li>
<li>Within the group you have selected add the account you have created above with the syntax below
<li>Voeg de account toe in de gekozen groep op de volgende manier:
<div style="padding: 10px">
<div style="padding: 10px">
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<object name="user.Username" />
<object name="user.Gebruikersnaam" />
</syntaxhighlight>
</syntaxhighlight>
</div>
</div>


You will finish with something like this:
Je eindigt met iets als:
<div style="padding: 10px">
<div style="padding: 10px">
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<group name="Admin">
<group name="Admin">
...
...
<object name="user.Username" />
<object name="user.Gebruikersnaam" />
</group>
</group>
</syntaxhighlight>
</syntaxhighlight>
Line 79: Line 79:
</li>
</li>
<li>
<li>
You're done! You can add as many admins as you want this way, just keep creating accounts under eachother and the same with the ACL rights.<br>
Je bent klaar! Je kan zoveel admins toevoegen als je wilt op deze manier, blijf gewoon accounts onder elkaar zetten, en doe hetzelfde met de ACL rechten.<br>
</li>
</li>
</ol>
</ol>
'''Note''': Changing these files requires a restart of the server<br />
'''Note''': Je moet de server herstarten voordat het veranderen van deze bestanden effect heeft.<br />
'''Note 2''': There are also ways to add accounts and edit rights for the server while it's running. "addaccount <user> <password>" is an internal command to add accounts, through the web interface you can manage ACL rights while it's running. (This option may be a better option for you if the first does not work)
'''Note 2''': Er zijn andere manieren om dit te doen terwijl de server draait. "addaccount <gebruikersnaam> <wachtwoord>" is een intern commando om accounts toe te voegen, en met de web interface kun je ACL rechten veranderen terwijl de server draait. Deze optie is misschien beter, als het eerste niet werkte.


=== Configuring an external web server ===
=== Configuring an external web server ===

Revision as of 20:48, 19 March 2008

Beginnen

Het is veel makkelijker dan het lijkt om een server aan te krijgen voor internet of LAN vrienden: doe wat hier staat en je bent (hopelijk) op je weg met je eigen MTA:SA DM server!

De server installeren

Het server programma is beschikbaar in verschillende formaten, afhankelijk van het platform waarop de server gedraait wordt.

Linux installation

Ubuntu

I installed the server on ubuntu 6.05 LTS. I will add installation instructions for other linux distros at a later time. This install was done on a fresh os install so a few things have to be installed first. First of all ssh into your server using whatever client you like. I prefer putty. Start by typing sudo apt-get upgrade It will prompt you to put your password in again. After the upgrade is done running type sudo apt-get install pico this will install the easy to use pico text editor that you will use to edit the config files. After the install is done running you need to get a copy of libcurl3 for the server to run so type sudo apt-get install libcurl3 Once again it will ask you for your password. Once this is done now we have to get the server program onto your Linux server. There are a few methods for doing this. you can install a ftp server. you can use putty file transfer. If you know someone with a website you can ask them to put the file on their website then use wget http://wwww.websitename.com/file.tar Obviously where website name is change to your friends website. Either way once you have the tar file on your server you need to unpack it you do this by using the command tar -zxvf filename.tar

Gentoo

I assume that if people are using Gentoo, they know enough of an operating system to get files from the web to their server theirselves... (otherwise, look above and read the ubuntu part)

These versions I needed for DP2:

Update your gcc version to 4.2.2:

  • unmask gcc in /etc/portage/package.unmask)
  • emerge gcc
  • switch to gcc 4.2.2: gcc-config i686-pc-linux-gnu-4.2.2

Update your libstdc++ version to 3.3 if you haven't got that version

  • emerge libstdc++

Install libcurl:

  • emerge libcurl

Unpack mtasa, and run it...

Windows installatie

Installatie van de MTA:SA DM server op Windows is zo makkelijk als taart.

  • Ga naar de download pagina en scroll naar de "Dedicated servers" sectie
  • Klik op de Windows download link.
  • Open het installatie programma zodra gedownload is.
  • Selecteer een map waar je de server wilt installeren.
  • Druk op installeren.
  • Klaar!

Configureren van de server

Begin door 'mtaserver.conf', in de map <SERVER>/mods/deathmatch, te openen in een tekstverwerker, bijvoorbeeld kladblok.

Het bestand is duidelijk: elke variabele heeft een beschrijving van wat het doet of wat je er mee moet doen, en hoe je het moet veranderen. Let op: deze beschrijvingen zijn Engels!

Administrators toevoegen

Voor een volledige uitleg van acl.xml (access control list (toegangsbeheerlijst)) lees: Toegangsbeheerlijst

Volg deze stappen om admins toe te voegen::

  1. Ga naar de 'deathmatch' map van je server, en open Accounts.xml
  2. Voeg een nieuwe account toe met de volgende syntax:

    'Accounts.xml syntax'

    <account name="Gebruikersnaam" password="Wachtwoord" />
    
  3. Sla het bestand op, en sluit het af.
  4. Open acl.xml
  5. Kies de rechten van de admin, moderator, of supermoderator
  6. Voeg de account toe in de gekozen groep op de volgende manier:
    <object name="user.Gebruikersnaam" />
    

    Je eindigt met iets als:

    <group name="Admin">
    ...
    <object name="user.Gebruikersnaam" />
    </group>
    
  7. Je bent klaar! Je kan zoveel admins toevoegen als je wilt op deze manier, blijf gewoon accounts onder elkaar zetten, en doe hetzelfde met de ACL rechten.

Note: Je moet de server herstarten voordat het veranderen van deze bestanden effect heeft.
Note 2: Er zijn andere manieren om dit te doen terwijl de server draait. "addaccount <gebruikersnaam> <wachtwoord>" is een intern commando om accounts toe te voegen, en met de web interface kun je ACL rechten veranderen terwijl de server draait. Deze optie is misschien beter, als het eerste niet werkte.

Configuring an external web server

For performance or consistency reasons, you could choose to make use of an external web server already set up and running, instead of the built-in web server. The external web server needs to be accessible for the public, so any client will be able to download the necessary client-side files in order to join and play on your server.

To enable downloading off an external web server, you should configure the httpdownload and httpdownloadurl tags in your server configuration:

<httpdownload>1</httpdownload>	
<httpdownloadurl>http://www.myserver.tld/directory/here</httpdownloadurl>

Since all the default resources provided with the dedicated server are zipped, and are normally automatically extracted by the built-in web server, you now have to provide a way for the clients to download the unextracted files to their computers. The unextracted files are always available in the <SERVER>/mods/deathmatch/resourcecache directory.

  1. Launch the dedicated server once and exit again. This will extract the zip files into the <SERVER>/mods/deathmatch/resourcecache directory.
  2. Go into the directory above and copy the resources to your external web server's public directory, this can be done in several ways:
    • If you don't care about your server-side files being publically available: create a symbolic link (Linux), a junction (Windows) or just plain copy the contents of the resourcecache directory to your public web server directory.
    • If you don't want your server files to be publically available through your web server: go into the resourcecache directory and manually copy the folders over to your public web server directory, removing any server-side files (they are not necessary for the client-side downloading) you do not want to be hosting on your web server.

      A quick way of securing your server-side files is currently not available. We will investigate into developing a tool that automatically copies only the necessary client-side files for all resources on your server.

Note: Please try to avoid any special characters (e.g. ~, !) in your download URLs.
Note 2: Please do not use a trailing slash in your download URL (e.g. hxxp://www.myserver.tld/directory rather than hxxp://www.myserver.tld/directory/)

Starting your server

Begin by making sure that you have finished all configuration of your server, starting your server is the last stage so everything must be ready!

To start your server double click on MTA Server.exe, make sure you allow it through any firewalls and forward ports where nessessary.

Installing/Updating resources on your server

Resources can come in two formats, either a ZIP format or just a normal folder with the script files inside it. The MTA:SA DM server supports both these methods.

  1. Move or copy the new resource to your <SERVER>\mods\deathmatch\resources folder.
  2. In the server window type in the command "refresh" (without the quotes), this will re-scan the resources folder and update the live resources where necessary.

Uninstalling resources

Resources can easily be removed from your server if you no longer want them.

  1. Delete the ZIP file or the folder of the resource you wish to uninstall
  2. In the server window type in the command "refresh" (without the quotes), this will re-scan the resources folder and update the live resources where necessary.

Administrating your server

You can start resources by typing the command "start resourcename" in the server console, or stop ones with "stop resourcename".

It's also possible to execute these and other admin commands from the ingame console (which you can bring up with the ` key or F8); for this to work, you first need to log in with the command "login username password". Additionally, you can press the p key to bring up the admin panel: this is a graphical interface which allows you to easily kick or ban misbehaving players, among others.

For further commands, type "help" in a console.

Starting a map/gamemode

See the commands section of the documentation for mapmanager for more information.

Remotely administrating your server

This article assumes you have setup a working account with 'Admin' user rights, and have these resources started:

  1. resourcebrowser
  2. resourcemanager
  3. webadmin
  4. webmap

Please make sure that you have followed the steps above, involving creating your administrator account and setting it's right before you can access these tools.

You're able to access these great remote admin tools by visiting http://<yourserverip>:<httpport>/resourcebrowser in your Firefox. NOTE: Internet Explorer will NOT work, it will not display the resource browser, other browsers (Opera namely) will have mixed results. If you want it to work in Internet Explorer, feel free to recode the resource :)

Useful Notes

  1. You may also update the resources while ingame as long as you have the correct access levels by typing "refresh" in the clients console or "/refresh" in the chat window. This may cause a second of lag if you have many resources.
  2. In the above instructions, <SERVER> is the path to your server's main directory. In most cases this is C:\Program Files\MTA San Andreas\server

Need further help?

Why not pop over to our Forums or join us on IRC (irc.multitheftauto.com #mta - MIRC)