Jump to content
BBSDeadEye

How to: Set Up DayZ Server on Linux with Wine

Recommended Posts

Since it basicly is a pain in the ass for everyone who trys to set up a linux dayz server, I decided to put this tutorial.

It is for all those who have basic Linux knowlege, but no idea how to accomplish a dazy server setup based on the windows binarys.

Contribution

And first of all I want to thank [WoP] Psycho Dad who pushed me in the right direction since I was pretty lost myself. He did provide me with the

basic procedure of setting up a basic dayz Server under linux.

This tutorial will cover

How to install (compile) wine an a minimal Debian 6 environment

How to reroute the wine output to your local PC for testing purpose. I will only cover Windows, but I guess it is even simpler on *nix and Mac OS Systems

How to reroute the wine output to Xvfb (Virtual XServer) for productive use

This tutorial will not cover

How to install and configure your basic Server system or Arma2 setup itself

How to create / manage different users on your server or how to upload files to it

Links that could help

Wine on 64 bit Systems from WineHQ: http://wiki.winehq.org/WineOn64bit

Wine on 64 bit Systems from tjworld.net: http://tjworld.net/w...ildWinePackages

Another Wine help page from WineHQ: http://wiki.winehq.o...e667664c0e7536f

XMing basic manual: http://aruljohn.com/.../x11forwarding/

XMing download: http://www.straightr...com/XmingNotes/

This tutorial is based on a Debian 6 64Bit minimal Net-Installion.

However most of it can also be used for 32Bit Debian, Ubuntu and other Debian based distributions. Maybe even other Distributions.

I have separated the Tutorial in 2 Parts.

The first Part is for all those who have Linux knowlege and only need the right commands.

The second Part is a more noob-like tutorial, for noobs or those who are interested in more details about what or why im doing it.


Part 1 (for Linux Pros)


aptitude update
aptitude install bzip2 flex bison ia32-libs libc6-dev-i386 lib32z1-dev ia32-libs-dev libpng-dev libxcursor-dev libfontconfig1-dev libldap2-dev libxslt-dev libgl1-mesa-dev libglu1-xorg-dev libgnutls-dev libxi-dev lib32ncurses5-dev libxrandr-dev libxxf86vm-dev
wget http://downloads.sourceforge.net/project/wine/Source/wine-1.5.19.tar.bz2
tar -xjf ./wine-1.5.19.tar.bz2
./configure
make
make install

192.168.0.20 is my local IP, where I got XMing running. (If you are behind a NAT, you have to Forward Port 6000 to this IP)

DISPLAY=192.168.0.20:0.0;export DISPLAY;

I have Uploaded the DirectX Setup files which are contained in the Arma2 Installation

wine DXSetup.exe

If you get to this point the rest is self explaining. You should also test the server startup at least once, but after that you can


aptitude install Xvfb
Xvfb :1 -screen 0 800x600x16 &
DISPLAY=localhost:1.0;export DISPLAY;

and start your server with

wine YourDayzServerCommandLine


Part 2 (for Linux Noobs and those who want to know more)

Preperation

The following things are needed for a dayz Linux server:

  1. Wine with a bunch of librarys
  2. DirectX (the one which is contained in arma2)
  3. XMing for Debugging/Testing
  4. xvfb - A Virtual XServer (like a Virtual Desktop on Windows) for rerouting the Output of Arma2 to XMing and later on to the background
  5. Putty, for connecting to your Servers console

I also read many Tutorials or Forum posts where people have talked about DotNet Installations. Well you definitly dont need no DoNet Framework for running Arma2. The only mandatory thing is DirectX!

Arma2 Windows binarys will not work with any Wine version. I had very good results with the latest build which was at the time 1.5.19. Thanks to [WoP] Psycho Dad who I think had tried many times until he figured this out ;)

So first of all, connect to your server via putty or a similar tool.

1. Download Wine - do not use the debian repository version, you have to compile it yourself later

wget http://downloads.sourceforge.net/project/wine/Source/wine-1.5.19.tar.bz2

Wine is an Emulator for various Systems who Emulates Windows. And in my opinion the best there is for Linux.

Note: Version 1.5.19 is still Beta. However it seems to do the job.

2. Extract the Wine Archive

tar -xjf ./wine-1.5.19.tar.bz2

Note: if you have a real basic debian system, you may need to install bzip2 via aptitude install bzip2

Note2: use tar -xjvf ./wine-1.5.19.tar.bz2 if you want to see which files are getting extracted

3. Install needed libarys.


aptitude update
aptitude install flex bison ia32-libs libc6-dev-i386 lib32z1-dev ia32-libs-dev libpng-dev libxcursor-dev libfontconfig1-dev libldap2-dev libxslt-dev libgl1-mesa-dev libglu1-xorg-dev libgnutls-dev libxi-dev lib32ncurses5-dev libxrandr-dev libxxf86vm-dev

Notes:

- flex and bison are needed to even build wine.

- ia32-libs libc6-dev-i386 lib32z1-dev ia32-libs-dev are needed if you have a 64bit system.

- The rest are needed for wine. At least libpng-dev is mandatory, you wont see any output without it and even get a bunch of error messages.

4. Build Wine

./configure

note: you will get a bunch of errors on the end. This is okay for OUR case.

configure: libxinerama 32-bit development files not found, multi-monitor setups won't be supported.

configure: libxcomposite 32-bit development files not found, Xcomposite won't be supported.

configure: libOSMesa 32-bit development files not found (or too old), OpenGL rendering in bitmaps won't be supported.

configure: OpenCL 32-bit development files not found, OpenCL won't be supported.

configure: libdbus 32-bit development files not found, no dynamic device support.

configure: libsane 32-bit development files not found, scanners won't be supported.

configure: libv4l 32-bit development files not found.

configure: libgphoto2 32-bit development files not found, digital cameras won't be supported.

configure: liblcms 32-bit development files not found, Color Management won't be supported.

configure: gstreamer-0.10 base plugins 32-bit development files not found, gstreamer support disabled

configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.

configure: libcapi20 32-bit development files not found, ISDN won't be supported.

configure: libcups 32-bit development files not found, CUPS won't be supported.

configure: libgsm 32-bit development files not found, gsm 06.10 codec won't be supported.

configure: libtiff 32-bit development files not found, TIFF won't be supported.

configure: libmpg123 32-bit development files not found (or too old), mp3 codec won't be supported.

configure: libopenal 32-bit development files not found (or too old), OpenAL won't be supported.

configure: WARNING: gettext tools not found (or too old), translations won't be built.

configure: WARNING: prelink not found, base address of core dlls won't be set correctly.

configure: WARNING: OpenSSL 32-bit development files not found, SSL won't be supported.

configure: WARNING: libjpeg 32-bit development files not found, JPEG won't be supported.

configure: WARNING: No sound system was found. Windows applications will be silent.

configure: Finished. Do 'make' to compile Wine.


make
make install

Note: the commands ./configure and make will take some time. Dont get impatient here.

5. Install Xvfb

aptitude install Xvfb

We need Xvfb later to reroute the display output of the arma server to the background.

Xvfb is a Virtual X Server. (If you dont know what X is, please google for it... a description would be way out of scope this tutorial)

6. On your Windows machine: We need XMing

  1. Download http://switch.dl.sou...-0-31-setup.exe
  2. Install it
  3. Run XLaunch
    - Set to Display Number to 0
    - click on the 'next' buttons until you are 'finish'ed
  4. Open File "X0.hosts" which is in you XMing install directory
    your file looks like this:
    localhost


    you have to add the Server IP here, so he (the server) can access your XMing Server

    localhost
    192.168.0.10


    192.168.0.10 is the IP of my Debian Testserver in this case.

  5. Start / Restart XMing

XMing is an X Server for Windows (or also available for Windows). We need it to see the graphical output of the Direct X installation later on and to see the output of the arma2 console!

(If you dont know what X is, please google for it... a description would be way out of scope this tutorial)

7. On your server again, you have to tell your system it should reroute the output of X to your XMing Server.

DISPLAY=192.168.0.20:0.0;export DISPLAY;

192.168.0.20 is the ip of my Windows Client, where XMing is started.

0.0 Is the display which we configured on step 5 with XLaunch

If you are behind a NAT (router/firewall etc..) you have to forward Port 6000 to your IP where XMing is running.

Port 6000 is needed for X to communicate with a X Server.

8. Install directX on your server (you will have to do this with every user you are planning running the server with)


wine DXSetup.exe

If everything is fine, you should see the output of the directX installation on your computer :)

Note: You have to do this with every User you want to start an arma2 Server with because all wine files / installation files etc.. are in the .wine dir of youre Users home directory

9. Upload Arma2 CO / Dayz Files

This step is a pain in the ass. Upload your Arma2 / Dayz Server files (about 16GB) to your server.

Note: I have created a /home/shared folder where I uploaded all DirectX and Arma files, so that I only have to link them for every server instance.

You only have to create a new arma2 Profile for every server and you should be good to go.

At least you dont have to upload them twice..

10. Start your server via wine

wine YourDayzStartCommandLine

now you should see the output of arma2 starting up and the arma2 console / hive console on your computer!

11. If everything is fine, reroute the X output to your local system

Xvfb :1 -screen 0 800x600x16 &

this sets Xvfb to :1.0 with an resultion of 800x600 and 16bit color deep.

the "&" starts the Xvfb in background.

I choose Display 1 as representation of my instance Ids, but the importent thing is that you should have seperated Displays for every server you are planning to run with wine.

An other approach would be to use the ID of the User you are running you dayz server with to be shure each Server installation has its own Display Port.

DISPLAY=localhost:1.0;export DISPLAY;

this sets your Display to the Xvfb Server. (which runs local and is set to have a Display on port 1 at the line above)

12. Now your should be able to start your server, with the output rerouted to Xvfb.

"Thats it".


I did create this Tutorial with a Debian 6 64Bit Net-Installation, with sshd as only packet installed.

Your results may vary if you have a different Installation package or a different distribution. However the basics should remain the same.

I hope this Tutorial helps at least a few of you who want to set up a Dayz Server on Linux.

Edited by BBSDeadEye

Share this post


Link to post
Share on other sites

This is a great post. I'm running a Debian 6 64-bit. The packages I needed to install were a little different than the ones you had up. I needed to use:

aptitude install flex bison ia32-libs libc6-dev-i386 lib32z1-dev libpng12-dev libxcursor-dev libfronconfig1-dev libldap2-dev libxslt1-dev libg11-mesa-dev libg1u1-mesa-dev libgnutls-dev libxi-dev lib32ncurses5-dev libxrandr-dev libxxf86vm-dev lib32bz2-dev

It seemed to cry when trying to install ia32-libs-dev, so I looked it up and seems the ia32-libs install is universal.

Also the wine install, I needed to use ./configure --without-freetype which I'm not too concerned about because you'll still have fonts despite that error

I haven't completed the full setup yet, but progress is going very well for me so far. Thank you for this. I just wanted to add these kinks I ran into while doing the initial setup.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×