MaddDogg

[TUT] How to get MTASA server working on Debian 5.0 64 bit

Recommended Posts

MaddDogg    0

How to get MTASA 1.1.x (and newer) server working on Debian Lenny 64 bit

Introduction

IMPORTANT: I noticed that the 32 bit emulation concept changed for Debian 6.0 Squeeze. If you have this OS, please understand that the following will NOT work for you! If you really are desperate, just send me a message and I will explain to you, how to do it on this system.

Since I see a lot of people having troubles with 64 bit systems and having MTA run on it, I decided to make a nice tutorial for those people.

I also just recently switched again to a Debian 64 bit OS for my server and so I was able to gain some more knowledge, so that I could show you how to set up everything in around 15 minutes.

And notice that I wrote this tutorial using Debian as my OS. I don't support other distributions, since I have no experience with them. If someone knows how to do this on other OS, then let me know and I might add another section for it in this tutorial.

What you need

Although you don't need to be an expert, first of all you need some basic knowledge about linux systems. I assume that you know how to use a tool like PuTTy and at least have a little knowledge in how the Shell works.

I also assume that you already have your MTA server files set up and configured. I won't go over this, since there are already tutorials about this and it shouldn't be part of this tutorial.

You also, of course, need a server (dedicated or virtual), which already runs Debian 5 64 bit.

The basic set up

First of all, to be able to run 64 bit programs, you need the "ia32 Suite", which emulates a 32 bit system environment and provides programs with the correct 32 bit libraries.

To install this on your system (when not already done), do the following:

apt-get install ia32-libs 

This will take a bit, but after it's done, there should be a new directory called /emul. Within this you will find your emulated environment.

Moving your server files

Now you have to move your server files into the ia32-linux directory.

If you want to do this using Shell, you could use the following example:

mv /PATH/TO/MTA/FILES /emul/ia32-linux 

Installing additional libraries

Although the main set up is already done, you still have to install some mandatory libraries.

MTA uses SQLite to store data internally, so you need to support this.

Since (the current version of) ia32-libs doesn't come with this lib, we have to install it manually.

Now because we're working within our emulated env, we cannot just use apt-get to install the library.

We now have to search for the correct lib package for Debian.

At this point you could use apt-file, but I don't like it, so we will do it using the debian website.

The needed package can be found here:

http://packages.debian.org/lenny/libsqlite3-0

On this site, choose the download link for the "i386" architecture and then download it.

The best way to directly get it onto your server is using wget.

First copy the download link from debian using right click in your browser.

Then do the following steps:

cd / 
wget DOWNLOAD_LINK_HERE 

Now the package was downloaded to your server. The next step is to install it.

For this you use the Debian package manager, or short dpkg.

Use the following command now:

dpkg -X libsqlite3-0_3.5.9-6_i386.deb /emul/ia32-linux 

If your package has a different name due to a different version number, just change the command line accordingly.

Now the package should be correctly installed within your 32 bit env.

If there is the rare case that other libraries are mandatory, just repeat this step above.

You can find most of the needed libraries using the search on this site:

http://www.debian.org/distrib/packages

Running the server

Now the server should be ready to be started up.

You should first start the server with no suppression of the output or nohup to see, if any error messages still pop up.

If this happens, post them here and I may add additional info for this case.

Apart from that just start your server in known manner and everything should just work fine.

Last words

If you find any mistakes in this tutorial, please let me know and I will gladly correct them.

Also, if this method will not work with newer version due to changes to MTA, note, that I wrote this tutorial using an MTA server version 1.0.4.

Happy playing! :)

Madd

Edited by Guest

Share this post


Link to post
Strika    0

Thank you, I got it working finally.

And what if I have no such dir as /emul/ia32-linux? There is nothing like this after the installation of ia32-libs

you apt-get install ia32-libs

Share this post


Link to post
SHC//Sniper    0
And what if I have no such dir as /emul/ia32-linux? There is nothing like this after the installation of ia32-libs

Create those directories and it will work!

mkdir emul

cd emul

mkdir ia32-linux

@MaddDogg

How to use the emulator with the MySQL module? I get the error:

MODULE: Unable to find modules/mta_mysql.so (libmysqlclient.so.15: cannot open shared object file: No such file or directory)!

I've put that file (from my 32bit root) into the folder /emul/ia32-linux/usr/lib/ but it does not work.

Any solution?

Share this post


Link to post
Phat Looser    1

For 1.1 it seems you will need http://ftp.de.debian.org/debian/pool/ma ... _amd64.deb, too.

I'm testing it atm.

About those who don't have a /emul/ia32-linux/usr (or lib) folder:

You can either softlink your own lib32 to it (which is what most linux users would do, for the sake of allmighty linux order), or you can copy the stuff into /usr and /lib32 if you already chose to make them your own folder. Or if your distribution wants it to be that way.

Edit:

Ok, fuck, beat me to a pulp, amd64, what was I thinking.

http://ftp.de.debian.org/debian/pool/ma ... 1_i386.deb

and, for those with a minimal installation

http://ftp.de.debian.org/debian/pool/ma ... .1_all.deb

http://ftp.de.debian.org/debian/pool/ma ... 1_i386.deb

Share this post


Link to post
Phat Looser    1

Doublepost, I know. But:

#!/bin/bash 
MTA_VERSION="1.1" 
TARGET_FOLDER="./" 
SERVER_NAME="mta-server" 
  
mkdir $MTA_VERSION 
cd $MTA_VERSION 
wget "http://linux.mtasa.com/dl/110/multitheftauto_linux-$MTA_VERSION.tar.gz" 
tar xfvz "multitheftauto_linux-$MTA_VERSION.tar.gz" 
aArray=$(ls | grep -i "multitheftauto_linux-$MTA_VERSION") 
  
for currID in `echo $aArray` 
        do 
        echo "$currID" | grep -i ".tar.gz" 
        if [ $? -eq 1 ] 
        then 
                FOLDERNAME=$currID 
        fi 
done 
echo "------------" 
echo "$FOLDERNAME" 
echo "------------" 
cp -ruf "$FOLDERNAME"/* ./ 
rm -rf "multitheftauto_linux"* 
cd .. 
cp -ruf ./$MTA_VERSION/* ./ 
#mv -fu mta-server $SERVER_NAME 
rm -rf ./$MTA_VERSION 
  

Updates your Linux server to the newest version.

Share this post


Link to post
DEVEK    0

I have now this error: liblua.so.5: cannot open shared object file: No such file or directory. I understand that short of a file, setting please ...

Share this post


Link to post
AlvadoZ    0

i get following error:

libncursesw.so.5: cannot open shared object file: No such file or directory

ERROR: Could not load ./core.so

* Check installed data files.

Press enter to continue..

Share this post


Link to post
Phat Looser    1

Update for 1.2.0:

#!/bin/bash 
MTA_VERSION="1.2.0" 
TARGET_FOLDER="./" 
SERVER_NAME="mta-server" 
  
mkdir $MTA_VERSION 
cd $MTA_VERSION 
wget "http://linux.mtasa.com/dl/120/multitheftauto_linux-$MTA_VERSION.tar.gz" 
tar xfvz "multitheftauto_linux-$MTA_VERSION.tar.gz" 
aArray=$(ls | grep -i "multitheftauto_linux-$MTA_VERSION") 
  
for currID in `echo $aArray` 
        do 
        echo "$currID" | grep -i ".tar.gz" 
        if [ $? -eq 1 ] 
        then 
                FOLDERNAME=$currID 
        fi 
done 
echo "------------" 
echo "$FOLDERNAME" 
echo "------------" 
cp -ruf "$FOLDERNAME"/* ./ 
rm -rf "multitheftauto_linux"* 
cd .. 
cp -ruf ./$MTA_VERSION/* ./ 
#mv -fu mta-server $SERVER_NAME 
rm -rf ./$MTA_VERSION 

Share this post


Link to post
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.