Shelby

Linux Dedicated Server Setup Guide (Debian 7 or similar)

48 posts in this topic

Updated 21/06/17

 

Hello fellow server admins. I know there are guides around on how to get a server running on linux but Debian 7 requires a few extra things so I might aswell post a full setup guide. This setup should also apply for Ubuntu and such but you don't need to setup libc6 2.19 for this.

Then again, I feel like I should mention that you can upgrade your debian to 8 without loosing any data if you do it right. You should do it because you can skip the lib stuff.
Anyways, here we go:

For the following guide comments on code will be written with // behind it like so:

_variable {
    function1; //this is a comment
    function2; //more comment
};


////////

sudo apt-get install somestuff //comment on a command

 

If you're gonna copy a command or something, don't copy the comment, obviously. Now that's out of the way, let's get started.

Note: I will not be covering the basics of handling Debian, just the more advanced stuff.

 

Step 1: Prerequisites

Before we can actually install our server, we need some stuff. First off, we will need either the root account or a user with sudo privileges. Using sudo is recommended and I will be using sudo. We want to create another user to run the server since using an administrator account would be risky if not downright stupid.

Creating a user by the name of exile: (Change it to whatever you want your user to be called)

sudo adduser exile

Set a password of your choosing. We won't be using this account quite yet.

Now we need some libs that steam and arma 3 depend on:

sudo apt-get install lib32gcc1
sudo apt-get install lib32stdc++6 //This might fail, see below

If you get an error along the lines of "The following packages have unmet dependencies: ia32-libs", add i386 as architecture using dpkg and install ia32-libs:

 dpkg --add-architecture i386
 apt-get update
 apt-get install ia32-libs

 

To install arma 3 we will need steamcmd, a command line version of steam. (duh :D ) ChangeDirectory to wherever you want steam and your server to be, download and unpack steam:

sudo mkdir /games/steam/ //making a games directory in the root folder, need to be root for that.
cd games/steam/
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xvzf steamcmd_linux.tar.gz //No, I can't remember the Syntax for tar either, I totally just looked that up
chmod +x steamcmd.sh //you want to make it executable because it doesn't run via sh for some reason

All set on the prerequisites, now let's take a look at

 

 

Step 2: Installing Arma

Start up steamcmd.

screen ./steamcmd

You should now see something like this:

GPDgZmW.png

login as anonymous: (the arma 3 DS doesn't need a purchased copy of the game)

mbIBW9N.png

Now set the path to wherever you want to install your server (../arma3 for me)  and start installing. The validate option is just to verify we have not received broken files.

force_install_dir ../arma3
app_update 233780 validate

Steam will now be doing its thing. Depending on your server's connection this can take a few minutes.

When the download is done you can exit steam by typing exit.

 

 

STEP 3: Installing exile

Now that your server is downloaded, we need to get the server and client files for Exile. cd to your server directory:

cd ../arma3/ //or whatever it is for you

Go to http://exile.majormittens.co.uk/downloads/ , copy the link addresses for the server and client files and download them. (1.0.3 "Lemon" at the time of this writing update. Hello from the past!)

EdCjUvx.png

wget https://cdn.whocaresabout.de/exile/@Exile-1.0.3.zip

9qjFhgo.png

wget http://exile.majormittens.co.uk/download-all-the-files/@ExileServer-1.0.3b.zip

 

Done? Good. unpack 'em.

sudo apt-get install unzip
unzip @Exile-1.0.3.zip
unzip @ExileServer-1.0.3b.zip

Since the server files only come with a version of extDB2 for windows we need to download it ourselves:

NOTE: If extDB2 v71 is not the newest version at the time of you reading this, choose a newer one from https://github.com/ArmaLife/extDB2/releases

This can be skipped now that exile includes the linux version again! Thanks devs!

 

Step 4: Setting up your database

Exile uses MySQL. Debian and also Ubuntu if I am not mistaken come with the mysql server pre-installed (Most dedicated hosting companies do this for you and give you the password.). If not, there is excellent guides on how to install it on the internet.

Log in as the root mysql user and create the database and user:

mysql -u root -p

CREATE DATABASE exile; //don't forget the friggin semicolon
GRANT ALL ON exile.* TO 'exile'@localhost IDENTIFIED BY 'password'; //You can name your user and password whatever you like
exit;

Now that you have a database you need to configure extDB to connect to it.

cd @ExileServer/
vim extdb-conf.ini //use vim or whatever editor you like. Nano for instance

DtY7qmv.png?1

//Old pic, it could look a little different for you.

Above is my configuration (well, I redacted my rcon password, obviously :P ) which you can use as guidance.

You want to change Name, Username and Password under [exile].

Name is your database name. (We set that to exile earlier)

Username is your  mysql user. (Also exile in our example)

Password is... your mysql password. (We set that to password, you should have changed that.)

Save the file.

 

Step 5: Fixing libc6

Here's the part where it gets interesting. Debian 7 "wheezy" uses a pretty outdated version of libc6. For our purpose we need a newer version. Since we can't just update it because it is a base library of unix we need to manually download the proper libs and tell Arma to use those. (I spent like 6 hours trying to get arma to load them until I figured out how -.-)

ONLY DO THIS STEP IF YOU ARE ON DEBIAN 7 OR SOME OBSCURE VERSION OF UNIX THAT DOESN'T USE LIBC6 2.15 OR GREATER

//I since upgraded to debian 8 which is using newer software. Consider upgrading: http://www.muktware.io/upgrade-from-debian-7-to-debian-8/

Here is how to do that:

wget http://ftp.de.debian.org/debian/pool/main/g/glibc/libc6_2.22-12_i386.deb
mkdir libs/ //making a libs dir in our A3 server's root folder
dpkg -x libc6_2.22-12_i386.deb libs/

//Just updated this with new URL since the old one was 404 - please tell me if this doesn't work.

The libs are now in libs/ and you can make your start script with the right parameters.

(On a side note, now two years after this thread was first conceived: There are better ways to do what I did here. While what I'm doing here isn't necessarily bad practice, I found out that my nerd friends will look at me angrily when I tell them about this solution. Someone also mentioned using debian backports. As I'm not too familiar with it I won't go into detail about it, but try googling and see what happens :P)

 

Step 6: Start script

Create a new file with an editor of your choice and name it something like launch.sh .

Now, to tell Arma to use the custom libs we installed previously, the file needs to begin with

./libs/lib/i386-linux-gnu/ld-2.19.so --library-path ./:./libs/lib/i386-linux-gnu

After that we can put ./arma3server and then any parameters we want to execute.

My start script looks like this:

./libs/lib/i386-linux-gnu/ld-2.19.so --library-path ./:./libs/lib/i386-linux-gnu ./arma3server -pid=2322 -cfg=@ExileServer/basic.cfg -config=@ExileServer/config.cfg -port=2322 -autoInit -ranking=plyrs.log -cpuCount=8 -exThreads=7 -mod=@allinarmaterrainpack\;@Esseker\;@Exile\;@Ryanzombies\;@L_Climb\;@JSRS2.2\; -servermod=@ExileServer\;

I have a whole bunch of mods installed but I'll go over what each option does.

./arma3server : starts your server. Yeah.

-pid=2322 : Sets my pid file. You can probably leave that but I'm just a geek like that.

-cfg=@ExileServer/basic.cfg : Sets your basic config file. You should set that as I did because Exile comes with it.

-config=@ExileServer/config.cfg : Sets your server config. See above. We will go over the config file in the next step.

-port=2322 : Sets your server's port. Standard would be 2302 but as I have a arma 2 server running on that port I chose another one.

-autoInit : Initializes your mission even if no player has connected. Useful for automatic restarts and should be set. Obsolete and broken now

-ranking=plyrs.log : Ignore that :P That's just me messing around with startup parameters.

-cpuCount=8 : Set the number of physical CPU cores with this.

-exThreads=7 : sets extra threads. If you don't know what it does, don't include it.

-mod=@Exile\; : Sets what mods will be used. This needs to say at least @Exile\; to run your exile server. NOTE: You need to put a backslash in front of semicolons ( ; ) or your server will stop loading whatever comes after!

-servermod=@ExileServer\; : This sets what other mods will be used. These however will not be broadcast to the client. (Won't show up in their multiplayer window)

 

Set the above to your liking and you should be good to go! You might want to edit the config.cpp in your @ExileServer/addons/ExileServer_config.pbo though. Unpack with PBOmanager or the like and configure. Then repack and reupload.

Wow, this got longer than I thought it would :D If this tutorial helped you, give it a like please. If people like this maybe I'll provide more tutorials in the future.

Hope this helps linux server admins so that they don't have to spend hours upon hours figuring stuff out like I did when I first installed a server. Thanks for reading.

If there is any questions about this process don't hesitate to ask here or contact me via PM or mail.

Regards,

Edited by Shelby
  • Like 6

Share this post


Link to post
Share on other sites

Hi,

i followed your guide but the Server not starts. This is what the server says.

22:55:00 "ExileServer - Server is loading..."
22:55:00 Client: Nonnetwork object ea580000.
22:55:00 "ExileServer - Installed extDB2 version: 65"
22:55:00 "ExileServer - MySQL connection error!"
22:55:00 "ExileServer - Please have a look at @ExileServer/extDB/logs/ to find out what went wrong."
22:55:00 "ExileServer - MySQL Error: Could not add database: [0,"Database Exception Error"]"
22:55:00 "ExileServer - Server will shutdown now :("
22:55:00 Extensions:
22:55:00   extDB2 (/home/steam/arma3exile/@ExileServer/extDB2.so) [] []

./start.sh: Zeile 1: 30942 Speicherzugriffsfehler  (Speicherabzug geschrieben) ./libs/lib/i386-linux-gnu/ld-2.19.so --library-path ./:./libs/lib/i386-linux-gnu ./arma3server -cfg=@ExileServer/basic.cfg -config=@ExileServer/config.cfg -port=2302 -autoInit -cpuCount=8 -mod=@Exile\; -servermod=@ExileServer\;

 

 Can you help me?

Share this post


Link to post
Share on other sites
Advertisement

or use this, i must change a few things & make a readme with how to & a topic here, but it's the best & easyest solution to host a exile server.

with predefined restart announcements & automatic arma 3 update

https://github.com/Kugane/exile_lgsm

Good job, but it seem don't work too by this way. 

 5:53:57 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted.exile_client                                                                     
 5:53:57 Mission Exile.Altis read from bank.                                                                                                                                                                
 5:53:57 Missing addons detected:                                                                                                                                                                           
 5:53:57   exile_client "

Having sooo many problem with LGSM & Exile
Same with clean install of arma3 without lgsm.
At this moment, I haven't still not found where the problem(s) is/are
^^

Share this post


Link to post
Share on other sites

the problem will be in Capital letters in addons files. 

find @foldername/ -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;

Use above to automatically change them to lowercase.

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.