Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Tut] Installing a Dedicated Server on Linux

Опубликовано:

Setting up an IW4M dedicated server on Linux

 

Requirements: Basic Linux command line knowledge.

 

Some of the commands below will only work on Debian based distributions (Debain, Ubuntu, ...). If you're using something else, you'll most likely run into problems installing the packages (e.g. you have to use yum instead of apt-get on RHEL/CentOS) and compiling wine. Please use google to find out how to do so on other distributions.

 

//Update Jul 19: Got rid of Xvfb, added tutorial on how to compile wine.

//Update Jan 2: Added CentOS/Fedora/RHEL instructions (thanks to mission)

 

When you see a list like this, execute each line consecutively through the shell:

 


  • command 1
    command 2
    command 3

But now let's get started:

 

1. Installing necessary packages

Login as root. Install the following packages:

 

Debian, Ubuntu etc.:

 


  • apt-get install unzip mono-complete wget nano tar bzip2 make

Fedora, CentOS, RHEL (?):

 


  • yum install unzip mono-core wget nano

2. Installing wine

If you already have at least version 1.4 of wine installed, skip this step.

Use

 


  • wine --version

to determine your version of wine. If you have a version older than 1.4 installed, remove it.

 

Debian, Ubuntu etc.:

 

Download the latest version of wine from http://sourceforge.net/projects/wine/files/Source/ and extract it to /usr/src. As I write this, it's wine-1.5.9:

 


  • cd /usr/src
    wget -O wine-1.5.9.tar.bz2
http://sourceforge.net/projects/wine/files/Source/wine-1.5.9.tar.bz2/download
tar xvf wine-1.5.9.tar.bz2
rm wine-1.5.9.tar.bz2

Install the building dependencies of wine:

 


  • apt-get build-dep wine

Compile and install wine. This will take quite a while.

 


  • cd /usr/src/wine-1.5.9
    ./configure
    make && make install

Note that you need to adjust the commands to whatever version you downloaded!

 

Fedora, CentOS, RHEL (?):

 


  • wget
http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6*.rpm
yum --enablerepo=epel install wine

3. Creating a new user account

Don't use your root account to run a server. Instead, create a new one, e.g.

 

  • adduser gameserver

and log in with it.

 

4. Getting the game files

Create a new folder for your gameserver files. I chose

 


  • mkdir ~/iw4m/

Upload the following files from your local MW2 installation into your newly created folder:

 


  • binkw32.dll
    mss32.dll
    localization.txt
     
    main\iw_00.iwd
     
    zone\dlc\* (all files)
    zone\english\*mp*.ff (every file that has "mp" somewhere in it's name)
    zone\english\contingency.ff
    zone\english\gulag.ff
    zone\english\oilrig.ff

(Note that instead of 'english' the folders' name will be the language of your game installation).

 

Your gameserver folder should look like this now:

acx0fr.png

 

5. Getting the server files

CD to your gameserver folder. Download the dedicated server update tool and run it. Rename iw4m.dat to iw4m.exe.

 


  • cd ~/iw4m/
    wget
http://fourdeltaone.net/iw4m/dsut.zip
unzip dsut.zip
rm dsut.zip
mono iw4m_updater.exe
mv iw4m.dat iw4m.exe

6. Creating a config file

Create a folder called 'players'. Download the preconfigured server.cfg and customize it as desired.

 


  • mkdir players
    cd players
    wget -O server.cfg
http://pastebin.com/download.php?i=5wSjHTQT
nano server.cfg

7. Port forwarding

Pick a port you want to run the server on and forward it in your firewall (TCP and UDP). I chose 28960 (standard).

 

8. Running the server

Start your server without the -console parameter using wine, for example:

 


  • cd ~/iw4m/
    wine iw4m.exe -dedicated +set net_port 28960 +set party_maxplayers 18 +exec server.cfg +map_rotate &

Stop your server by killing iw4m.exe:

 


  • killall -9 iw4m.exe

You can download the following scripts to manage your server easily:

 


  • cd ~/iw4m/
    wget -O start.sh
http://pastebin.com/download.php?i=Nd8khDRU
wget -O stop.sh http://pastebin.com/download.php?i=5E43ZKq4
chmod +x start.sh stop.sh

This will start your server with 18 slots on port 28960 in the background. It will also execute your server.cfg. Edit start.sh to change the parameters.

 

And that's it! Run start.sh to start your server and stop.sh to stop it:

 


  • cd ~/iw4m/
    ./start.sh
     
    ./stop.sh

Check whether your server is running via

 


  • ps -ef | grep iw4m.exe

You might see errors when starting the server. Before asking, please check if the server is running correctly despite those errors.

 

Updating the server

 

Stop your server and run the updater.

 


  • cd ~/iw4m/
    ./stop.sh
    mono iw4m_updater.exe
  • Ответы 127
  • Просмотры 11,7k
  • Created
  • Последний ответ

Top Posters In This Topic

Featured Replies

Опубликовано:

Hm... I'm stuck with missing .dll files, and still errors after uploading them...

System: Debian Wheezy x64 with wine-1.4.1

 

gamesrv@ks24042:~/mw2$ err:module:import_dll Library WLDAP32.dll (which is needed by L"Z:\\home\\gamesrv\\mw2\\iw4m.dll") not found
err:module:import_dll Library iw4m.dll (which is needed by L"Z:\\home\\gamesrv\\mw2\\iw4m.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\home\\gamesrv\\mw2\\iw4m.exe" failed, status c0000135

 

uploaded WLDAP32.dll from my system folder:

 

gamesrv@ks24042:~/mw2$ err:module:import_dll Library API-MS-Win-Core-LocalRegistry-L1-1-0.dll (which is needed by L"C:\\windows\\system32\\WLDAP32.dll") not found
err:module:import_dll Library WLDAP32.dll (which is needed by L"Z:\\home\\gamesrv\\mw2\\iw4m.dll") not found
err:module:import_dll Library iw4m.dll (which is needed by L"Z:\\home\\gamesrv\\mw2\\iw4m.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\home\\gamesrv\\mw2\\iw4m.exe" failed, status c0000135

 

uploaded API-MS-Win-Core-LocalRegistry-L1-1-0.dll from my system folder:

 

gamesrv@ks24042:~/mw2$ err:module:attach_process_dlls "API-MS-Win-Core-LocalRegistry-L1-1-0.dll" failed to initialize, aborting
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\home\\gamesrv\\mw2\\iw4m.exe" failed, status c0000142

 

What can I do now?

Опубликовано:

Hey guys,

 

I'm truly stumped as to whats going on here. I have a VPS, port forwarding is enabled, everything is in its place so I run the command:

wine iw4m.exe -v -dedicated +set net_port 28960 +set party_maxplayers 14 +exec server.cfg +map_rotate &

Here's my output:

$ wine iw4m.exe -v -dedicated +set net_port 28960 +set party_maxplayers 14 +exec server.cfg +map_rotate &
[1] 1872
gameserver@ohaiworld:~/iw4m$ Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window
fixme:system:SystemParametersInfoW Unimplemented action: 59 (SPI_SETSTICKYKEYS)
fixme:system:SystemParametersInfoW Unimplemented action: 53 (SPI_SETTOGGLEKEYS)
fixme:system:SystemParametersInfoW Unimplemented action: 51 (SPI_SETFILTERKEYS)

It sits here and from what I can tell, users have said this means it should be functional. However, iw4m.exe is not in the processlist, and I don't see that port even listening when I do a `netstat`. So, I monitor `top` while starting it up and I see services.exe, winedevice.exe, plugplay.exe and explorer.exe start up and then shut down about 10 seconds later. My resources stay pretty stable during this time, in that they don't fluctuate at all.

 

Anyone got some insight? I'm solid with Linux and the CLI but I don't have any experience with wine.

Опубликовано:
  • Автор
wine iw4m.exe -v -dedicated
What does -v do? Something I dont know or just a typo? Try launching the server via wine iw4m.exe -dedicated +... &

 

If that doesn't work, please post (the last few lines of) console_mp.log (located in the m2demo folder).

Опубликовано:

Ha, that was my retardation; I was looking for a verbose flag to maybe discover what the issue was. I didn't realize there was a log file, this should definitely be handy. It appears I'm missing a file that I thought I uploaded but didn't. I'll update once I figure it all out. Thanks for letting me know about the log!

Опубликовано:
  • Автор
Ha, that was my retardation; I was looking for a verbose flag to maybe discover what the issue was.

alright :P

If you want to access the console, simply replace wine with wineconsole (and remove & at the end) - like this:

 

wineconsole iw4m.exe -dedicated +...

Опубликовано:

That seems to just crash straight up. No worries though, I seemed to get everything working. Is there a guide somewhere on how to use rcon via the command line in game, or how to do things from terminal on the server you're on?

 

EDIT: Oh, and do you know why the server doesn't show up in the server browser list?

Опубликовано:
  • Автор
That seems to just crash straight up. No worries though, I seemed to get everything working. Is there a guide somewhere on how to use rcon via the command line in game, or how to do things from terminal on the server you're on?

 

I'd suggest installing B3: http://www.bigbrotherbot.net/

There's also a way to use Rcon through the game console though.

 

EDIT: Oh, and do you know why the server doesn't show up in the server browser list?

Can you join the server by connecting to the ip address?

  • 3 weeks later...
Опубликовано:
  • Автор
aMacUser":3dnk4lyw]I get an error saying that

tar: wine-1.5.9.tar: Cannot open: No such file or directory

tar: Error is not recoverable: exiting now

 

Whats going on????

It clearly says whats going on :P

wine-1.5.9.tar doesnt exist. Why did you download the old version instead of wine-1.5.15 anyway?

Опубликовано:

for the ./stop.sh script i used to use "pkill -n iw4m.exe" to kill eveytimes the latest process

cos i run my server on Debian Squeeze...

 

to use "killall -9 iw4m.exe" i had to reinstall the "psmisc" package with:

 

apt-get install --reinstall psmisc

Опубликовано:
  • Автор
-TrusT-":1l8sd506]Hey,

 

iВґm using Ubuntu for my server, everytime when i try to start the Server i just become this fail:

 

Unbenanntaf784.png

 

wine version: 1.4

 

Whats going on there? I want to play but i cant because of this fu**ing fail.

 

Please post (the last few lines of) console_mp.log

Опубликовано:
  • Автор
-TrusT-":13f02znl]Okay i get it.

 

Now i want to install an Gungame server. How should i do this on Linux?

 

Greez

Just like you would do it on a windows server. Edit start.sh to use +fs_game ... (or simply extract the mod files to the m2demo folder)

Опубликовано:
  • Автор
-TrusT-":12p1w9bn]But first i dont even have a Mods folder and second I dont know which .iwd i should rename :)

Just follow the windows tutorial, it works the same on Linux...

  • 1 month later...
Опубликовано:

Hey,

 

my Servers was running really good, but since yesterday, nothing works anymore.

 

When i ask my Members what they have done, they said, some people went on our server and ban all admins.

 

Now it says an error when i want to start it:

 

[ 239968111] Console: ^0[^1CWA-Bot^0] ^7Everyone welcome Whhitekiller^7^7, player number ^3#9738^7, to the server

[ 239968111] handled rcon: say ^0[^1CWA-Bot^0] ^7Everyone welcome Whhitekiller^7^7, player number ^3#9738^7, to the server

[ 239970450] Whhitekiller: is the best

[ 239972200] 15:[CWA]-Jackass- EXE_DISCONNECTED

[ 239974212] Removing xuid 11000010006f916 (clientNum 15) from session

[ 239974212] Removing player at slot 15 (xuid is 11000010006f916) for this reason: PLATFORM_DISCONNECTED_FROM_SERVER

[ 239974212] V0001]

[ 239974212] We were unable to find our own clientNum inoice: Unregistering slot 15 (11000010006f916) from gameSession [0000 Voice_UnregisterRemotePlayer()

[ 239974212] Clearing party member 15's party info for gameSession

[ 239974213] Removing xuid 11000010006f916 from the session because nobody is registered at that slot (slot 15)

[ 239974213] Calling XSessionLeaveRemote for slot 15 (11000010006f916) in session 'gameSession' [00000001]

 

Can u help?

 

btw: Its on both of my servers. (Port 26061 and 26060)

 

greez

Опубликовано:

I am having this issue.

 

root@ark:/usr/src# rm wine-1.5.9.tar.bz2
rm: remove regular file `wine-1.5.9.tar.bz2'? n
root@ark:/usr/src# apt-get build-dep wine
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: You must put some 'source' URIs in your sources.list
root@ark:/usr/src#

Опубликовано:

Application tried to create a window, but no driver could be loaded.

Make sure that your X server is running and that $DISPLAY is set correctly.

err:systray:initialize_systray Could not create tray window

fixme:system:SystemParametersInfoW Unimplemented action: 59 (SPI_SETSTICKYKEYS)

fixme:system:SystemParametersInfoW Unimplemented action: 53 (SPI_SETTOGGLEKEYS)

fixme:system:SystemParametersInfoW Unimplemented action: 51 (SPI_SETFILTERKEYS)

 

Das ist der Error den ich bekomme wenn ich das teil starten will

 

Die letzten 3 sind normal aber die ersten 3 stehen da normalerweise nicht.

 

Mir wurde gesagt du kannst deutsch also schreibe ich deutsch ^^

  • 2 weeks later...
Опубликовано:

When trying to start the server I get this error:

 

fixme:system:SystemParametersInfoW Unimplemented action: 59 (SPI_SETSTICKYKEYS)
fixme:system:SystemParametersInfoW Unimplemented action: 53 (SPI_SETTOGGLEKEYS)
fixme:system:SystemParametersInfoW Unimplemented action: 51 (SPI_SETFILTERKEYS)
err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.

 

I have done research but I still don't know how to fix it and wondered if anyone else had the same issue and resolved it.

 

Help is greatly appreciated

  • 2 weeks later...
Опубликовано:

installing wine on centos6

 


  • wget epel-release-6-8.noarch.rpm
    rpm -Uvh epel-release-6*.rpm
    yum --enablerepo=epel install wine
    (this will install wine version 1.4.1)
    yum install mono-core
    yum install nano

 

i will send you the link woofy in pm, in case you want to add this to your OP.

Опубликовано:
  • Автор
installing wine on centos6

 


  • wget epel-release-6-8.noarch.rpm
    rpm -Uvh epel-release-6*.rpm
    yum --enablerepo=epel install wine
    (this will install wine version 1.4.1)
    yum install mono-core
    yum install nano

 

i will send you the link woofy in pm, in case you want to add this to your OP.

added, thanks

  • 1 month later...
Опубликовано:

Hey guys,

 

i followed the instructions but the server doesnt start :/

 

gameserver@ESXi:~/iw4m$ wine iw4m.exe -dedicated +set net_port 28960 +set party_maxplayers 18 +exec server.cfg +map_rotate &
[3] 11668
gameserver@ESXi:~/iw4m$ Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window
fixme:system:SystemParametersInfoW Unimplemented action: 59 (SPI_SETSTICKYKEYS)
fixme:system:SystemParametersInfoW Unimplemented action: 53 (SPI_SETTOGGLEKEYS)
fixme:system:SystemParametersInfoW Unimplemented action: 51 (SPI_SETFILTERKEYS)

 

any solution?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Account

Navigation

Поиск

Поиск

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.