I25 on Linux
Wine can run mapserver.exe itself more or less flawlessly, but, at least at the time I was setting up Linux servers for it, it did not return the system performance information that Launcher needs for load balancing. This may have changed since then, but I never upgraded past Wine 1.7.30 since it seemed to work fine. I am documenting the changes here in the hopes that someone can chime in on whether they’re needed for the latest version of Wine, and if they are, port them and maybe find someone willing to integrate them with the official releases.
The base is Release 1.7.30 here: https://github.com/wine-mirror/wine/commit/288f1868b7e32b1dd4f35caaed2239e66c2bafd2
The changes are on this commit: https://github.com/leandrotlz/wine/commit/ed0b13fc7f51d08cba97d64a1b80a39dff86e452
This is based on a bare Ubuntu Server 14.04.x LTS install; the End of Standard Support date just passed last month, so upgrading this guide to a newer version should be a priority. This assumes you’ve already set up networking in order to communicate with dbserver over a private network range. Set up network time syncing and a very bare bones desktop in which to run Wine on:
sudo apt-get update sudo apt-get install ntp ntpdate vnc4server lxpanel openbox
Increase network buffers to prevent mapserver Winsock crashes:
sudo nano /etc/sysctl.conf
Add the following lines and restart:
Set up your default VNC password and connect to it in order to make sure it works. If you’re doing over a public IP address, leave out -localhost for initial setup, but make sure it’s there once you’re ready to tell everybody about your server, or it’s a gigantic security hole. If you don’t know how to connect via VNC, download TightVNC Viewer and use the line:
tvnviewer.exe -host=host_ip -port=5172 -password=your_password
Once you have verified it works, you need to kill the process and edit the VNC settings.
vncserver -kill :1 nano ~/.vnc/xstartup
The following is the full config I use, feel free to replace the whole file or just add openbox and lxpanel.
#!/bin/sh [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey openbox & lxpanel &
sudo dpkg --add-architecture i386 sudo add-apt-repository ppa:ubuntu-wine/ppa sudo apt-get update sudo apt-get install wine1.7
If you built Wine from source with the extra patches above, now it’s time to install your .deb packages on top of the 1.7 release.
sudo dpkg -i wine*.deb
Copy all the COH binaries, data, settings, etc to ~/coh or whatever other directory you prefer. You need to launch COH under Wine once while looking at it from VNC in order to complete some initial Wine setup.
vncserver -localhost -depth 24 -geometry 1152x864 :1 env DISPLAY=:1 wineconsole ~/coh/bin/launcher.exe & disown
After you’re done with initial setup, you should see the Launcher screen pop up. If it connects to the dbserver it should start serving maps immediately, like any other Mapserver host. If not, you may have to tweak your server configs.
To shut everything down and wipe crash dump logs, use:
pkill launcher pkill mapserver pkill MapServer rm ~/coh/bin/*.dmp rm ~/coh/bin/*.mdmp vncserver -kill :1