Перейти к содержимому
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

Опубликовано:
And how do you start your server?

 

with a 1to1 copy from first topic

 

Xvfb :9 -screen 9 800x600x16 &
DISPLAY=localhost:9.9 wine /home/mw2/iw4m.exe -dedicated -console +set net_port 28965 +set party_maxplayers 18 +exec server.cfg +map_rotate &

Опубликовано:
  • Автор
And how do you start your server?

 

with a 1to1 copy from first topic

 

Xvfb :9 -screen 9 800x600x16 &
DISPLAY=localhost:9.9 wine /home/mw2/iw4m.exe -dedicated -console +set net_port 28965 +set party_maxplayers 18 +exec server.cfg +map_rotate &

Mh. Make sure you forwarded your port (TCP and UDP) correctly. If that doesn't work, try uninstalling (purge) wine and install the newest stable version.

 

edit: Also try running it directly from the /home/mw2/ directory.

Опубликовано:
And how do you start your server?

 

with a 1to1 copy from first topic

 

Xvfb :9 -screen 9 800x600x16 &
DISPLAY=localhost:9.9 wine /home/mw2/iw4m.exe -dedicated -console +set net_port 28965 +set party_maxplayers 18 +exec server.cfg +map_rotate &

Mh. Make sure you forwarded your port (TCP and UDP) correctly. If that doesn't work, try uninstalling (purge) wine and install the newest stable version.

 

edit: Also try running it directly from the /home/mw2/ directory.

 

still the same :( i reinstall no my root server and try it again

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

still the same :( i reinstall no my root server and try it again

 

I'm pretty sure your server is functioning properly though. There's probably an issue with the firewall or something like that.

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

Hi i got problem with the linux server on 64bit i done everything but wen im trying to run it i get this

 

Xvfb :9 -screen 9 800x600x16 &
[1] 13642
serwer@V-5012:~/iw4m$ DISPLAY=localhost:9.9 \
>     wine iw4m.exe -dedicated -console \
>     +set net_port 28960 +set party_maxplayers 18 +exec server.cfg +map_rotate &_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/V-5012:9
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
SELinux: Disabled on system, not enabling in X server
[dix] Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
[dix] Could not init font path element /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType, removing from list!
libudev: udev_monitor_enable_receiving: bind failed: Operation not permitted
config/udev: failed to bind the udev monitor
[config] failed to initialise udev

 

:roll: :cry:

Опубликовано:
  • Автор
Hi i got problem with the linux server on 64bit i done everything but wen im trying to run it i get this

 

Xvfb :9 -screen 9 800x600x16 &
[1] 13642
serwer@V-5012:~/iw4m$ DISPLAY=localhost:9.9 \
>     wine iw4m.exe -dedicated -console \
>     +set net_port 28960 +set party_maxplayers 18 +exec server.cfg +map_rotate &_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/V-5012:9
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
SELinux: Disabled on system, not enabling in X server
[dix] Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
[dix] Could not init font path element /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType, removing from list!
libudev: udev_monitor_enable_receiving: bind failed: Operation not permitted
config/udev: failed to bind the udev monitor
[config] failed to initialise udev

 

:roll: :cry:

 

The errors are caused by Xfvb. I updated the tutorial and added instructions on how to compile wine. Please uninstall wine and try the new steps in the first post. You wont need Xvfb anymore then.

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

I get this wen im trying to run command apt-get build-dep wine

 

 apt-get build-dep wine
Reading package lists... Done
Building dependency tree... Done
E: You must put some 'source' URIs in your sources.list

Опубликовано:
  • Автор
I get this wen im trying to run command apt-get build-dep wine

 

 apt-get build-dep wine
Reading package lists... Done
Building dependency tree... Done
E: You must put some 'source' URIs in your sources.list

https://www.google.com/search?q=E%3A+Yo ... urces.list

;)

2nd link looks promising

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

Ok I have tried and tried lol, but I tend to keep failing. I have everything installed etc.

 

But when I use the start script O keep getting an error that was on a page previously but I cant get vnc working correctly, I just want this thing up and running but the error im getting is this.

 

 

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

 

 

Someone please help me, also in my script I am running wine64 so thats obviously added (64) to the end of wine to run it.

Опубликовано:
  • Автор
Ok I have tried and tried lol, but I tend to keep failing. I have everything installed etc.

 

But when I use the start script O keep getting an error that was on a page previously but I cant get vnc working correctly, I just want this thing up and running but the error im getting is this.

 

 

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

 

 

Someone please help me, also in my script I am running wine64 so thats obviously added (64) to the end of wine to run it.

what does

wine --version

return?

Опубликовано:
Ok I have tried and tried lol, but I tend to keep failing. I have everything installed etc.

 

But when I use the start script O keep getting an error that was on a page previously but I cant get vnc working correctly, I just want this thing up and running but the error im getting is this.

 

 

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

 

 

Someone please help me, also in my script I am running wine64 so thats obviously added (64) to the end of wine to run it.

what does

wine --version

return?

 

1.5.9

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

 

1.5.9

 

Mh, try starting the server manually without -console (only -dedicated +...)

Same thing :(

 

 

wine64 iw4m.exe -dedicated +set net_port 28960 +set party_maxplayers 18 +exec server.cfg +map_rotate &

[1] 14271

mc@eldercrest:~/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

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

 

1.5.9

 

Mh, try starting the server manually without -console (only -dedicated +...)

Same thing :)

 

 

wine64 iw4m.exe -dedicated +set net_port 28960 +set party_maxplayers 18 +exec server.cfg +map_rotate &

[1] 14271

mc@eldercrest:~/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

I just tried setting up a server with wine-1.5.9 and I got the same errors, but the server is still working. Make sure you're using the correct iw4m.exe (I accidentally uploaded the steam MW2's exe, which didn't work obviously). If that doesn't work either, you could also try going back to wine 1.4

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

 

1.5.9

 

Mh, try starting the server manually without -console (only -dedicated +...)

Same thing :)

 

 

wine64 iw4m.exe -dedicated +set net_port 28960 +set party_maxplayers 18 +exec server.cfg +map_rotate &

[1] 14271

mc@eldercrest:~/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

I just tried setting up a server with wine-1.5.9 and I got the same errors, but the server is still working. Make sure you're using the correct iw4m.exe (I accidentally uploaded the steam MW2's exe, which didn't work obviously). If that doesn't work either, you could also try going back to wine 1.4

Well im not sure if the server sis till working with that error cause im in ssh and it never stops doing something if you know what I mean unless I hit ctrl c so id like to have a console window like in windows, but I did the instructions exactly how they said so im sure I did it right and have the right file, if you have a mic and teamspeak hop on to mine, voice.eldercrest.com im stephen92. Thanks for the help I hope we can get this working.

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

stephen92 wrote:

Woofy wrote:

stephen92 wrote:

 

1.5.9

 

 

Mh, try starting the server manually without -console (only -dedicated +...)

 

Same thing

 

 

wine64 iw4m.exe -dedicated +set net_port 28960 +set party_maxplayers 18 +exec server.cfg +map_rotate &

[1] 14271

mc@eldercrest:~/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

 

I just tried setting up a server with wine-1.5.9 and I got the same errors, but the server is still working. Make sure you're using the correct iw4m.exe (I accidentally uploaded the steam MW2's exe, which didn't work obviously). If that doesn't work either, you could also try going back to wine 1.4

 

Well im not sure if the server sis till working with that error cause im in ssh and it never stops doing something if you know what I mean unless I hit ctrl c so id like to have a console window like in windows, but I did the instructions exactly how they said so im sure I did it right and have the right file, if you have a mic and teamspeak hop on to mine, voice.eldercrest.com im stephen92. Thanks for the help I hope we can get this working.

 

The server is working don't worry about this error.

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

Ok so do I need to do the convert command to convert it to 64 bit or whatever it is, because it wont let me ./configure ( I redid everything) it says (error: Cannot build a 32-bit program, you need to install 32-bit development libraries.) What I did last time was convert it then it let me, but idk if thats the issue. Please tell me everything you did extra.

Опубликовано:
  • Автор
when i do ./start.sh i get the following:

wine: cannot find L"C\\windows\\system32\\iw4m.exe"

Can this be fixed?

Thanks

Maybe you're running it from the wrong directory? Or did you forget to rename iw4m.dat / made a typo?

Опубликовано:
when i do ./start.sh i get the following:

wine: cannot find L"C\\windows\\system32\\iw4m.exe"

Can this be fixed?

Thanks

Maybe you're running it from the wrong directory? Or did you forget to rename iw4m.dat / made a typo?

 

Thanks i just forgot to rename!

Опубликовано:
  • Автор
Ok so i decided to load a mod but i'm faced with a new error, console gives me this

http://gyazo.com/b9dff79285820d70000da0e2b9176576

 

I've tried deleting games_mp.log and still this error appears.

Any solutions?

Thanks

Have you tried loading another mod? Looks like this one simply has an error.

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.