<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Keksbg</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Keksbg"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Keksbg"/>
	<updated>2026-04-28T06:23:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Installing_and_Running_MTASA_Server_on_GNU_Linux&amp;diff=65871</id>
		<title>Installing and Running MTASA Server on GNU Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Installing_and_Running_MTASA_Server_on_GNU_Linux&amp;diff=65871"/>
		<updated>2020-04-16T16:29:20Z</updated>

		<summary type="html">&lt;p&gt;Keksbg: /* Added a small step to help out people with older/newer libraries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation 64 bit ==&lt;br /&gt;
&lt;br /&gt;
=== Main binary ===&lt;br /&gt;
Download the latest stable 64 bit Linux binaries:&lt;br /&gt;
 rm -f multitheftauto_linux_x64.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack into a directory:&lt;br /&gt;
 tar -xf multitheftauto_linux_x64.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Default config ===&lt;br /&gt;
Download the default config files:&lt;br /&gt;
 rm -f baseconfig.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/baseconfig.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack and move into the deathmatch directory:&amp;lt;br/&amp;gt;&lt;br /&gt;
('''''Note:''' Only do this for new installations as it will overwrite any existing config files.)''&lt;br /&gt;
 tar -xf baseconfig.tar.gz&lt;br /&gt;
 mv baseconfig/* multitheftauto_linux_x64/mods/deathmatch&lt;br /&gt;
&lt;br /&gt;
Change to the MTA server install directory:&lt;br /&gt;
 cd multitheftauto_linux_x64&lt;br /&gt;
&lt;br /&gt;
=== Test ===&lt;br /&gt;
You can now test if the server will start correctly:&lt;br /&gt;
 ./mta-server64&lt;br /&gt;
If your server comes up with issues such as:&lt;br /&gt;
 libtinfo.so.5: cannot open shared object file: No such file or directory&lt;br /&gt;
you may have either a newer or older version of the Shared Object file. &lt;br /&gt;
In such cases, it is warranted to create a symbolic link with that same name to the newer or older Shared Object file, with for example:&lt;br /&gt;
 sudo ln -s /usr/lib/libtinfo.so.6 /usr/lib/libtinfo.so.5&lt;br /&gt;
Of course, the location of these files could depend on your distribution of GNU/Linux; refer to your distribution's documentation on the location of the files.&lt;br /&gt;
&lt;br /&gt;
=== Default resources ===&lt;br /&gt;
If you need the default resources:&lt;br /&gt;
Download the latest default resources zip from http://mirror.mtasa.com/mtasa/resources/&lt;br /&gt;
and unzip into '''mods/deathmatch/resources'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Make sure you are in the MTA server install directory when following this example:'''&lt;br /&gt;
 apt-get install unzip&lt;br /&gt;
 mkdir mods/deathmatch/resources&lt;br /&gt;
 cd mods/deathmatch/resources&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
 unzip mtasa-resources-latest.zip&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 cd ../../..&lt;br /&gt;
&lt;br /&gt;
== Installation 32 bit ==&lt;br /&gt;
&lt;br /&gt;
=== Main binary===&lt;br /&gt;
Download the latest stable 32 bit Linux binaries:&lt;br /&gt;
 rm -f multitheftauto_linux.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/multitheftauto_linux.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack into a directory:&lt;br /&gt;
 tar -xf multitheftauto_linux.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Default config ===&lt;br /&gt;
Download the default config files:&lt;br /&gt;
 rm -f baseconfig.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/baseconfig.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack and move into the deathmatch directory:&amp;lt;br/&amp;gt;&lt;br /&gt;
('''''Note:''' Only do this for new installations as it will overwrite any existing config files.)''&lt;br /&gt;
 tar -xf baseconfig.tar.gz&lt;br /&gt;
 mv baseconfig/* multitheftauto_linux/mods/deathmatch&lt;br /&gt;
&lt;br /&gt;
Change to the MTA server install directory:&lt;br /&gt;
 cd multitheftauto_linux&lt;br /&gt;
&lt;br /&gt;
=== Test ===&lt;br /&gt;
You can now test if the server will start correctly:&lt;br /&gt;
 ./mta-server&lt;br /&gt;
&lt;br /&gt;
=== Default resources ===&lt;br /&gt;
If you need the default resources:&lt;br /&gt;
Download the latest default resources zip from http://mirror.mtasa.com/mtasa/resources/&lt;br /&gt;
and unzip into '''mods/deathmatch/resources'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Make sure you are in the MTA server install directory when following this example:'''&lt;br /&gt;
 apt-get install unzip&lt;br /&gt;
 mkdir mods/deathmatch/resources&lt;br /&gt;
 cd mods/deathmatch/resources&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
 unzip mtasa-resources-latest.zip&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 cd ../../..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running with 32 or 64 bit Linux==&lt;br /&gt;
=== Make sure your server libraries and stuff are up to date ===&lt;br /&gt;
On Debian/Ubuntu this is done with:&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
* If you get a problem with such as &amp;quot;libreadline.so.5: cannot open shared object file: No such file or directory.&amp;quot;, it can be solved on 32 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libreadline5&lt;br /&gt;
&lt;br /&gt;
* If you get a problem with such as &amp;quot;libncursesw.so.5 cannot open shared object file: No such file or directory&amp;quot;, it can be solved on 32 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libncursesw5&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you experience this issue on a 64-bit machine while trying to run the 32-bit MTA server, then you should install the following package on a 64-bit Debian/Ubuntu machine (as root):&lt;br /&gt;
&lt;br /&gt;
 apt-get install lib32ncursesw5&lt;br /&gt;
&lt;br /&gt;
You can find more 32-bit library alternatives on this page: [http://www.debian.org/distrib/packages#search_contents www.debian.org/distrib/packages#search_contents].&lt;br /&gt;
&lt;br /&gt;
== MySQL Troubleshooting==&lt;br /&gt;
* If you are using the inbuilt MySQL functions such as [[dbConnect]] and [[dbQuery]], you will need to have '''libmysqlclient.so.16''' installed.&lt;br /&gt;
* If you get a problem with such as &amp;quot;libmysqlclient.so.16: cannot open shared object file: No such file or directory&amp;quot;, it can be solved on Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libmysqlclient16&lt;br /&gt;
&lt;br /&gt;
If that fails:&lt;br /&gt;
* For 32 bit Linux, download [http://nightly.mtasa.com/files/modules/32/libmysqlclient.so.16 32 bit libmysqlclient.so.16] and put it in '''/usr/lib/'''&lt;br /&gt;
* For 64 bit Linux, download [http://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16 64 bit libmysqlclient.so.16] and put it in '''/usr/lib/'''&lt;br /&gt;
&lt;br /&gt;
==[Optional] Installing and Configuring an External Web Server==&lt;br /&gt;
Instructions on how to install and configure Nginx as an external web server for MTA is here: [[Installing and Configuring Nginx as an External Web Server]]&lt;br /&gt;
&lt;br /&gt;
== Server crashes ==&lt;br /&gt;
&lt;br /&gt;
If your Linux server crashes, please obtain a backtrace and post a report on our [http://bugs.mtasa.com/ Bug tracker]&lt;br /&gt;
&lt;br /&gt;
====To obtain a backtrace:====&lt;br /&gt;
===Do you have a core dump file in the the MTA server directory?===&lt;br /&gt;
It's usually called 'core', and usually over 100MB, and looks something like this:&lt;br /&gt;
 [[Image:Core.png]]&lt;br /&gt;
====If you have a core dump file in the the MTA server directory:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA install directory do this command&lt;br /&gt;
 gdb mta-server -c core&lt;br /&gt;
*When gdb launches, do this command to get a  module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
====If you do not have a core dump file in the the MTA server directory:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA server directory start the mta-server like this:&lt;br /&gt;
 gdb -ex &amp;quot;set print thread-events off&amp;quot; --eval-command run --args mta-server -q&lt;br /&gt;
*Now wait for a crash. (Ignore any weird screen output in the meantime)&lt;br /&gt;
*When a crash occurs, do this command to get a module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Server freezes''' ==&lt;br /&gt;
&lt;br /&gt;
If your Linux server freezes, please obtain a backtrace with thread information and post a report on our [http://bugs.mtasa.com/ Bug tracker]&lt;br /&gt;
&lt;br /&gt;
====To obtain a backtrace with thread information:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA server directory start the mta-server like this:&lt;br /&gt;
 gdb -ex &amp;quot;set print thread-events off&amp;quot; --eval-command run --args mta-server -q&lt;br /&gt;
*Now wait for a freeze. (Ignore any weird screen output in the meantime)&lt;br /&gt;
*When a freeze occurs, press ctrl-c to start gdb&lt;br /&gt;
*Then do this command to get a module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*And then this command to get thread information:&lt;br /&gt;
 info threads&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
== Automatic installer ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
Make sure you have bash, unzip, tar and wget available on your server.&lt;br /&gt;
Also notice that for 64-bit servers the 64-bit binary will be installed, otherwise 32-bit binary will be.&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
  #!/bin/bash -x&lt;br /&gt;
  #==============================================================================#&lt;br /&gt;
  #                                mtasa-install                                 #&lt;br /&gt;
  #------------------------------------------------------------------------------#&lt;br /&gt;
  #  This shellscript installs MTA:SA on your server. You can configure it and   #&lt;br /&gt;
  #  modify it as desired, you can even improve it if you want.                  #&lt;br /&gt;
  #==============================================================================#&lt;br /&gt;
   &lt;br /&gt;
  ARCH_TYPE=&amp;quot;&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
  getArchitecture()&lt;br /&gt;
  {&lt;br /&gt;
      if ((1&amp;lt;&amp;lt;32)); then&lt;br /&gt;
          ARCH_TYPE=&amp;quot;_x64&amp;quot;&lt;br /&gt;
      fi&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  downloadFiles()&lt;br /&gt;
  {&lt;br /&gt;
      wget http://linux.mtasa.com/dl/multitheftauto_linux${ARCH_TYPE}.tar.gz&lt;br /&gt;
      wget http://linux.mtasa.com/dl/baseconfig.tar.gz&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  unpack()&lt;br /&gt;
  {&lt;br /&gt;
      tar -xf multitheftauto_linux${ARCH_TYPE}.tar.gz&lt;br /&gt;
      tar -xf baseconfig.tar.gz&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  moveConfig()&lt;br /&gt;
  {&lt;br /&gt;
      mv baseconfig/* multitheftauto_linux${ARCH_TYPE}/mods/deathmatch&lt;br /&gt;
      rm -rf baseconfig&lt;br /&gt;
      cd multitheftauto_linux${ARCH_TYPE}&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  installResources()&lt;br /&gt;
  {&lt;br /&gt;
      mkdir mods/deathmatch/resources&lt;br /&gt;
      cd mods/deathmatch/resources&lt;br /&gt;
      wget http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
      unzip mtasa-resources-latest.zip&lt;br /&gt;
      cd ../../..&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  clean()&lt;br /&gt;
  {&lt;br /&gt;
      rm -f ../multitheftauto_linux${ARCH_TYPE}.tar.gz&lt;br /&gt;
      rm -f ../baseconfig.tar.gz&lt;br /&gt;
      rm -f mods/deathmatch/resources/mtasa-resources-latest.zip&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  main()&lt;br /&gt;
  {&lt;br /&gt;
      getArchitecture&lt;br /&gt;
      clean&lt;br /&gt;
      downloadFiles&lt;br /&gt;
      unpack&lt;br /&gt;
      moveConfig&lt;br /&gt;
      installResources&lt;br /&gt;
      clean&lt;br /&gt;
   &lt;br /&gt;
      if ((1&amp;lt;&amp;lt;32)); then # 64 bits&lt;br /&gt;
          echo &amp;quot;Installation ready! Use ./mta-server64 to initialize server&amp;quot;&lt;br /&gt;
      else&lt;br /&gt;
          echo &amp;quot;Installation ready! Use ./mta-server to initialize server&amp;quot;&lt;br /&gt;
      fi&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  main # calling program entry point&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
To proceed with installation, save somewhere with read-write-execute access (777) the mtasa-install shell. Finally, proceed to execute it (./mtasa-install for example).&lt;br /&gt;
&lt;br /&gt;
=== Alternative way to install server ===&lt;br /&gt;
https://linuxgsm.com/lgsm/mtaserver/&lt;/div&gt;</summary>
		<author><name>Keksbg</name></author>
	</entry>
</feed>