Building MTASA Server on GNU Linux: Difference between revisions
No edit summary |
|||
Line 5: | Line 5: | ||
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 depends on your distribution. | 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 depends on your distribution. | ||
Our network module is distributed as a precompiled binary library. The latest version for GNU/Linux can be found on our [http:// | Our network module is distributed as a precompiled binary library. The latest version for GNU/Linux can be found on our [http://code.google.com/p/mtasa-blue/downloads/list Downloads page] on Google Code. | ||
Line 46: | Line 46: | ||
USE=“net-misc/curl ssl” emerge -v curl | USE=“net-misc/curl ssl” emerge -v curl | ||
</syntaxhighlight> | </syntaxhighlight> | ||
'''Fedora''' | |||
You will need these packages to be able to successfully compile a MTA server on Fedora: | |||
* '''glibc-devel:''' | |||
* '''curl-devel:''' contains the cURL library | |||
* '''pcre-devel:''' contains the PCRE library | |||
* '''sqlite3-devel:''' contains the SQLite library | |||
* '''readline-devel:''' contains the readline library | |||
* '''lua-devel:''' contains the Lua libraries | |||
* '''subversion:''' contains the SVN client to check out the source code | |||
To install these packages through yum, use the yum install <package list> command as in the following example (executed as root): | |||
<syntaxhighlight lang="lua">yum install glibc-devel curl-devel pcre-devel sqlite3-devel readline-devel lua-devel subversion</syntaxhighlight> | |||
Line 52: | Line 71: | ||
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. | 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 (use the -m32 flag). | ||
== General instructions == | == General instructions == |
Revision as of 13:21, 10 November 2010
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 depends on your distribution.
Our network module is distributed as a precompiled binary library. The latest version for GNU/Linux can be found on our Downloads page on Google Code.
Debian Linux
Includes derivative distributions such as Ubuntu.
You will need the necessary build tools, headers and libraries, which are distributed through the following Debian packages (e.g. Debian Lenny):
- build-essential: contains the necessary tools, headers and libraries to build 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 repository
To install these packages through apt, use the apt-get install <package list> command as in the following example (executed as root):
apt-get install build-essential automake libtool libcurl4-openssl-dev libpcre3-dev libsqlite3-dev libreadline5-dev subversion
Gentoo Linux
You will need the necessary build tools, headers and libraries. Because Gentoo’s portage system is designed to compile any packages on your own system, the necessary 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 net-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 omitted. (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.) Refer to the Gentoo Handbook or manual for more information on emerge.
Example:
emerge -v subversion sqlite USE=“net-misc/curl ssl” emerge -v curl
Fedora
You will need these packages to be able to successfully compile a MTA server on Fedora:
- glibc-devel:
- curl-devel: contains the cURL library
- pcre-devel: contains the PCRE library
- sqlite3-devel: contains the SQLite library
- readline-devel: contains the readline library
- lua-devel: contains the Lua libraries
- subversion: contains the SVN client to check out the source code
To install these packages through yum, use the yum install <package list> command as in the following example (executed as root):
yum install glibc-devel curl-devel pcre-devel sqlite3-devel readline-devel lua-devel subversion
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 (use the -m32 flag).
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’s package manager provides a sparsehash 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/output/ directory.
Run the server
Grab the latest net.so from the Downloads page on GitHub and place it in your output directory, install the accounts.xml, mtaserver.conf and acl.xml files into the mods/deathmatch/ directory and grab the latest resources from the multitheftauto-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 tracker or our IRC channel