Sie sind auf Seite 1von 8

Config files go into ./mods/deathmatch Resources go into .

/mods/deathmatch/resources Building MTASA Server on GNU Linux From Multi Theft Auto: Wiki Jump to: navigation, search Contents [hide] * * * * 1 2 3 4 Building on GNU/Linux Preparing your system General instructions Troubleshooting

Building on GNU/Linux Preparing your system In order to build the Multi Theft Auto dedicated server, you will have to set up your system with the correct libraries and tools. How these are installed depen ds on your distribution. Our network module is distributed as a precompiled binary library. The latest ve rsion for GNU/Linux can be found on our Downloads page on GitHub. Debian Linux Includes derivative distributions such as Ubuntu. You will need the necessary build tools, headers and libraries, which are distri buted through the following Debian packages (e.g. Debian Lenny): * build-essential: contains the necessary tools, headers and libraries to bu ild applications * automake: contains the automake tools * libtool: contains the libtool software required to build libraries * libcurl3-dev: contains the cURL library (version 3 without SSL support) * libpcre3-dev: contains the PCRE library (version 3) * libsqlite3-dev: contains the SQLite library (version 3) * libreadline5-dev: contains the readline library (version 5) * subversion: contains the tortoise client used to check out our code reposi tory To install these packages through apt, use the apt-get install <package list> co mmand as in the following example (executed as root): apt-get install build-essential automake libtool libcurl4-openssl-dev libpcre3-d ev libsqlite3-dev libreadline5-dev subversion

Gentoo Linux You will need the necessary build tools, headers and libraries. Because Gentoo s por tage system is designed to compile any packages on your own system, the necessar y build tools will have already been installed. This only leaves you to install the necessary libraries:

* sqlite: contains the SQLite library * git: contains the client used to check out our code repository * curl: contains the cURL library; to compile with SSL support, apply the ne t-misc/curl ssl USE flag To compile and install these packages through emerge, use the emerge -v <package list> command. The -v option shows additional * * information and can be omitte d. (If you want to use any USE flags, prepend emerge with USE="use flags here". You can also use the -pv option to verify that you re using the correct flags.) Refe r to the Gentoo Handbook or manual for more information on emerge. Example: emerge -v subversion sqlite USE= net-misc/curl ssl emerge -v curl A warning for x64 The MTA:SA server currently cannot be properly compiled in 64-bit mode. Instead, you should compile it in 32-bit mode and run it using 32-bit compatibility mode . General instructions Downloading the source. First you need to download the source. svn checkout http://mtasa-blue.googlecode.com/svn/trunk/ mtasa-blue cd mtasa-blue Prepare the sparsehash library You can skip this step if your distribution package that you can install. cd vendor/sparsehash/current autoreconf -fi sh ./configure make install cd ../../.. Compiling the server autoreconf -fi ./configure make install Your vanilla server will now be compiled and installed into the MTA10_Server/out put/ directory. Run the server s package manager provides a sparsehash

Grab the latest net.so from the Downloads page on GitHub and place it in your ou tput directory, install the accounts.xml, mtaserver.conf and acl.xml files into the mods/deathmatch/ directory and grab the latest resources from the multitheft auto-resources project. You can then run your server. cd MTA10_Server/output ./mta-server Troubleshooting Any errors during the compilation of json-c can be solved by calling autoreconf -fi from the json-c directory. If you re getting any unexpected errors while compiling, please check our Bug tracke r or our IRC channel Server Manual From Multi Theft Auto: Wiki Jump to: navigation, search Contents [hide] * 1 Getting started * 2 Installing the server o 2.1 Linux installation o 2.2 Windows installation * 3 Configuring your server o 3.1 General configuration o 3.2 Port forwarding o 3.3 Adding administrators o 3.4 Using the web interface o 3.5 Configuring an external web server * 4 Starting your server * 5 Installing/Updating resources on your server * 6 Uninstalling resources * 7 Administrating your server * 8 Starting a map/gamemode * 9 Useful Notes o 9.1 Need further help? Getting started It is much easier than it looks to get a server up and running for your internet or LAN buddies: follow this wiki article and you will hopefully be on your way to hosting your own MTA:SA Server in no time! Installing the server The dedicated server application is available in different flavours depending on the platform of the server. Linux installation There are different ways of getting a Linux server up and running: * Building the server on GNU/Linux * Getting a precompiled package

Windows installation Installation of the MTA:SA server on Windows is easy as pie. * * * * * Go to the download page and download the installer. Once the installer is downloaded, open it. Select a folder where you want to install the server. Click Install. Done!

For a full explanation of acl.xml (access control list) read: Access Control Lis t Configuring your server The Multi Theft Auto dedicated server is initially configurable through it's con sole window, from within the game, and from a webbrowser. In order to make use o f the two last options, it is necessary to add at least one administrator user t o your configuration file. General configuration All general configuration options can be found in the 'mods/deathmatch/mtaserver .conf' file and can be opened by any regular text editor. This file is fairly straightforward; every variable has a description of what to do with it and how to change it. Port forwarding If you run your server on your own private computer, and you have an router betw een the internet and your computer. You need to forward 3 ports. First of all open the file 'mods/deathmatch/mtaserver.conf' and search for the n ext lines: <serverport>22004</serverport> <httpport>22005</httpport> The ports are needed to setup the server right. We explain later how to set them , but first if you want your server to list in the server browser there is an ot her port we need, and that is the ase port. (quick example for how to turn ase o n or of): <ase>1</ase> <!-- 0 = off, 1 = on --> Now we going to forward the ports in router, which is not needed if you already have all ports open, or if you don't have a router with a firewall. If so, skip this part. If you don't know how port forwarding works in your router, go to: http://portfo rward.com/, find your router there, and follow the instructions there. In almost every router you can set the port type: UDP or TCP. The following list will explain which port type is needed for what: Main server port: UDP HTTP Port: TCP ASE Port: UDP (this is needed if you want your server to appear in the server li

st) The ASE port is also simply to get: ASE port = Main Server port + 123 So, if you have the main server port set to 22003, then the ASE port will be 221 26. Good luck! Adding administrators It is strongly recommended to add at least one administrator to your server in o rder to make use of the built-in webserver to easily maintain and configure your server. This administrator will then also be able to log-in from within the gam e and control the server. To add an administrator to your server, follow these steps: 1. Make sure your server is stopped; if your server is still running, all cha nges you make will be overwritten 2. Open the file 'mods/deathmatch/'accounts.xml' with any text editor 3. Add a new account into the file by using the XML-syntax below, we use the username "BennyLava" with password "123password" for illustration purposes <accounts> ... <account name="BennyLava" password="123password" /> </accounts> 4. Save and close the file 5. Open the file 'mods/deathmatch/'acl.xml' with any text editor 6. Add the account to the Admin group by using the XML-syntax below <ACL> ... <group name="Admin"> <acl name="Admin"/> ... <object name="user.BennyLava" /> </group> ... </ACL> You can actually add your user to any group you want. Each group is linked to an ACL (Access Control List). Each ACL contains a series of specific allowed or denied rights. These groups exist so different users can be assigned differe nt rights. The Admin group points to the Admin ACL, which is empty (thus allowin g all possible commands). The Everyone group points to the Default ACL that puts a series of restrictions on the available commands (to disallow regular players from using admin commands). 7. You're done! You can add as many administrators or users as you want this way, take a look at some of the other groups and ACLs for example. The ACL is al so accessible through the Lua scripting engine. It is recommended to take a look at the web interface, we will explain how to do this below. Note: There are also ways to add accounts and edit rights for the server while i t's running. "addaccount <user> <password>" is an internal command to add accoun

ts, but you will have to use the web interface to add these accounts to specific groups/ACLs! Using the web interface The dedicated server comes with a few Lua resources that provide a nice little w eb interface to your server. This can be used to easily maintain your server, as it allows you to add users, start/stop resources, and more. The web interface resources are enabled by default and are served through the bu ilt-in HTTP web server. To make sure the built-in HTTP web server runs on a port you like (22005 by default), follow these steps: 1. Make sure your server is stopped 2. Open the file mods/deathmatch/mtaserver.conf with any text editor 3. Verify that the HTTP server is enabled: <httpserver>1</httpserver> 4. Change the HTTP server port to your liking: <httpport>22005</httpport> 5. Save and close the configuration file 6. Start your server 7. If you happened to have changed the start-up resources in your configurati on file, make sure the following resources are started: 1. resourcebrowser 2. resourcemanager 3. webadmin 4. webmap These are automatically started in the default configuration file, in case you just installed your server. 8. Open a web browser (Internet Explorer 6 or 7 are NOT supported: use Mozill a Firefox, Google Chrome, Apple Safari, Opera or others) and navigate to the HTT P server URL: http://server:port/. For example, If you are running a local serve r on HTTP port 22005, use http://127.0.0.1:22005/. 9. Enter the username and password of the administrator you added in the prev ious section. You should now be able to maintain your server from the web interface. Configuring an external web server The built-in web server is also used to serve files that are required by resourc es running on your server to any player that is connected to your server. For ex ample, if you are running a game script with a scripted graphical user interface , or custom models, these need to be transferred to every connected player in or der to function properly. This is done by either the built-in web server, or an external web server (that is usually a bit faster) but needs to be set up separa tely. For performance use of such an ver needs to be d the necessary or consistency reasons during the game, you could choose to make external web server if you have one set up. The external web ser accessible for the public, so any client will be able to downloa client-side files in order to join and play on your server.

To enable downloading off an external web server, you should configure the httpd ownload 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, a nd 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 com puters. The unextracted files are always available in the <SERVER>/mods/deathmat ch/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 se rver's public directory, this can be done in several ways: * If you don't care about your server-side files being publically avai lable: create a symbolic link (Linux), a junction (Windows) or just plain copy t he contents of the resourcecache directory to your public web server directory. * If you don't want your server files to be publically available throu gh your web server: go into the resourcecache directory and manually copy the fo lders 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 ho sting on your web server. A quick way of securing your server-side files is currently not avai lable. We will investigate into developing a tool that automatically copies only the necessary client-side files for all resources on your server. Note 1: 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, st arting 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 thro ugh 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 w ith the script files inside it. The MTA:SA server supports both these methods. 1. Move or copy the new resource to your <SERVER>\mods\deathmatch\resources f older. 2. In the server window type in the command "refresh" (without the quotes), t his will re-scan the resources folder and update the live resources where necess ary. 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), t his will re-scan the resources folder and update the live resources where necess ary. 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 con sole (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 whic h 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 informatio n. Useful Notes 1. You may also update the resources while ingame as long as you have the cor rect access levels by typing "refresh" in the clients console or "/refresh" in t he 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 dire ctory. In most cases this is C:\Program Files\MTA San Andreas\server 3. You can choose a different config file for the server to use by passing it in the command line after a --config argument, e.g. mtaserver.exe --config anot herconfig.cfg. 4. Do not be alarmed by the warning regarding the parsing of the settings.xml file. This happens because your server installation is still clean and unused. Need further help? Why not pop over to our Forums or join us on IRC (irc.multitheftauto.com #mta MIRC)

Das könnte Ihnen auch gefallen