Sunteți pe pagina 1din 6

Building your own Wolfenstein: Enemy Territory

Linux Dedicated Server


G.R.V. Kroon, BSc
September 27, 2014
Abstract
This is a short article on how to build your own Wolfenstein: Enemy
Territory Linux Dedicated Server. This article assumes basic to interme-
diate Linux knowledge and also assumes an Ubuntu 14.04.1 LTS x86 64
machine. Other Linux distributions may dier, but this article could still
be used as a reference.
1 Introduction
Building your own Wolfenstein: Enemy Territory Linux Dedicated Server can
be a challenge if you dont know where to begin. I therefore documented this,
primarily for my own documentation, but also to share this with others. The
steps in this article have been tested using an Ubuntu 14.04.1 LTS (GNU/Linux
3.13.0-35-generic x86 64) machine. It is actually advised to use a x86 Ubuntu
system since the 32-bit library dependencies (ia32-libs) have been deprecated
since Ubuntu 13.10 Saucy. However, since were all so very much accustomed
to 64-bit systems nowadays (and for good reason, to use all your RAM to say
the least) I created this article for people that use a 64-bit system.
Id like to thank Kirk Schnable on http://binaryimpulse.com/ whose Linux
guide inspired me to create this article. (Schnable, 2013)
2 Installing the 32-bit libraries
Since were using a 64-bit version of Ubuntu, we need the 32-bit libraries. You
probably dont need to install these libraries if youre already on a 32-bit system.
To install the 32-bit libraries, we will be installing the old and deprecated ia32-
libs package using the old 13.04 Raring repositories.
Since I do not know which exact 32-bit libraries the Call of Duty 2 Linux
Dedicated Server depends on, this article actually uses a quick and dirty work
around to install the 32-bit libraries If anyone could provide me with a more
elegant solution, Id be happy to hear about it.
Heres how to install the 32-bit libraries (the quick and dirty way):
1
$ sudo touch /etc/apt/sources.list.d/ia32-libs-raring.list
$ sudo echo "deb http://old-releases.ubuntu.com/ubuntu/ \
raring main restricted universe multiverse" | sudo tee \
/etc/apt/sources.list.d/ia32-libs-raring.list > /dev/null
$ sudo apt-get update
$ sudo apt-get install ia32-libs
3 Installing other dependencies
By default, Ubuntu doesnt have unzip to unzip the archives you just down-
loaded, and when running the installer, you also need dialog and ntp. You
can install unzip, dialog and ntp with the following command:
$ sudo apt-get install unzip dialog ntp
4 Separate service account
For security reasons, create a new service account to run the server on. The
adduser command should automatically create a home directory and ask you
to set a password as well. Check this and set them manually if it doesnt:
$ sudo adduser wetserver
5 Downloading the Linux packages
NOTE: It has occurred to me that, while youre logged in using your own user
account, you cant simply su into another account (like the wetserver service
account) and then run the installer. Because for some reason it cant render
the text interface to choose how you would like to retrieve an etkey. So,
save yourself some trouble and really logon to your server using the wetserver
service account (so dont use su). Also, because the installer requires sudo
privileges (even to download an etkey, for some reason), temporarily grant the
service account sudo privileges. While still logged in with your own user account
(because you need sudo prvileges to grant sudo to others) issue the following
command:
$ sudo visudo
Now look up the following lines:
# User privilege specification
root ALL=(ALL:ALL) ALL
2
Add the service account below root in the same fashion as root, like this:
# User privilege specification
root ALL=(ALL:ALL) ALL
wetserver ALL=(ALL:ALL) ALL
Good, now log in as wetserver (again, not using su) and create a new wet
folder to store all the server les in:
$ mkdir ~/wet
Since Wolfenstein: Enemy Territory is open-source, it can be freely (not as
in beer) downloaded from their own servers, so download the complete Linux
package to your own server. The following command downloads the latest (at
the time of writing) Linux package from the ocial Splash Damage servers:
$ mkdir ~/Downloads
$ wget -P ~/Downloads http://filebase.trackbase.net/et/full/\
et260b.x86_full.zip http://www.unitedfederationofgaming.com/\
dist/wolfet/linux/ET-2.60b-linux.zip
Note: You may want to check if newer packages exist on the website: http://
www.splashdamage.com/content/wolfenstein-enemy-territory-barracks
6 Installing Wolfenstein: Enemy Territory
Unzip both archives:
$ unzip Downloads/et260b.x86_full.zip
$ unzip Downloads/ET-2.60b-linux.zip
Next you need to make the installer executable:
$ chmod +x ~/et260b.x86_keygen_V03.run
Then you can run the installer (not as root):
$ ~/et260b.x86_keygen_V03.run
6.1 ETkey
If you dont have an etkey yet, you can choose to create one when the in-
staller prompts you. However, for some reason option 1 doesnt work, so choose
option 3 if you wish to automatically download a new from the site. This will
automatically be saved to /.etwolf/etmain/etkey. You might be prompted for
3
a sudo password (the password of your service account), so enter it. If it doesnt
work the rst time, exit the installer (CTRL+C) and try again. Eventually it
should say something like this:
etkey saved to: /home/wetserver/.etwolf/etmain/etkey
etkey : <your_etkey>
6.2 Installation location, EULA and changelog
The installer then prompts you for the root password (which is actually your
own password if you use sudo), because it recommends to install the game in
/usr/local/games (which, of course, requires root privileges). You dont have
to do this and I actually dont want to, so I will be installing this in the home
directory of the service account. I will just be pressing enter here, because I will
not be installing the game in /usr/local/games.
After that, it asks you to agree to the End-user License Agreement (EULA).
When you agree it then asks you to read the changelog. Then it asks you where
to install the game. I will be installing this in the following directory (also for
the symbolic links):
/home/wetserver/wet
6.3 Punkbuster
Next it asks you whether or not to install Punkbuster, which is kind of sad
because Evenbalance decided to stop all services for our loved game Wolfenstein
Enemy Territory This spoils new player to join PunkBuster enabled server.
1
You may choose to install it either way and it then asks you to agree to another
EULA.
6.4 Installation
After that it asks you to install startup menu entries. Im on a server that
doesnt have a GUI, so Im choosing no here. Then it asks you to continue
the installation. When you choose Yes it will install the game. Then it will
ask you to start the game once its installed. Choose no, because we still need
to congure some things before we can start the server.
6.5 Patching the game
Now that the game is installed we need to patch it. After that we can remove
all the leftover folders and zip les:
1
http://etkey.org/
4
$ cp ~/Enemy\ Territory\ 2.60b/linux/* ~/wet
$ rm -rf Enemy\ Territory\ 2.60b/ README\ FIRST\ \!\ \
IMPORTANT.txt et260b.x86_keygen_V03.run \
Downloads/ET-2.60b-linux.zip Downloads/et260b.x86_full.zip
7 Uploading server les
If you use SSH on your server, you can use SFTP to upload les with an SFTP
client (like FileZilla). Be sure to set the ownership of the uploaded les to your
new service account wetserver. If you SFTP into your server, you can use
the wetserver credentials. That will automatically set the ownership of all the
uploaded les to wetserver. Or you can do it manually:
$ chown -R wetserver:wetserver /home/wetserver/wet/
Now upload the server.cfg le /home/wetserver/wet/etmain which con-
tain all the settings for the server. Change any lines in this le to whatever
suits you. Just to name a few:
set dedicated "2"
set net_ip "123.123.123.123"
set net_port "27960"
set sv_maxclients "20"
set g_password "yourpassword"
set sv_privateclients "4"
set sv_privatepassword "yourpassword"
set rconpassword "yourpassword"
set refereePassword "yourpassword"
8 Firewall rules
When hosting a server accessible from the Internet, open the port which the
server is listening on (27960 by default, unless specied otherwise). You can
use ufw (iptables front-end), or iptables directly. I nd ufw to be much easier.
Also, only add the SSH rule if you use SSH and change port numbers if you use
dierent ones:
$ sudo ufw enable
$ sudo ufw allow ssh
$ sudo ufw allow 27960/udp
5
9 Startup script
Log in with your own user account again. Then create a script in your own
home directory to run the server:
$ echo -e #!/bin/bash"\n"cd /home/wetserver/wet "\n"\
./etded +set com_hunkmegs 512 +set net_ip \
"192.168.0.102" +exec server.cfg >/dev/null 2>&1 & \
> ~/wetserver.sh
Make the script executable:
$ chmod +x ~/wetserver.sh
10 Removing the temporary sudo privileges
Now that we installed the server we can remove the temporary sudo privileges
for the service account. While still logged in with your own user account, issue
the following command:
$ sudo visudo
Now look up the following lines:
# User privilege specification
root ALL=(ALL:ALL) ALL
wetserver ALL=(ALL:ALL) ALL
Remove the service account below root, like this:
# User privilege specification
root ALL=(ALL:ALL) ALL
11 Launching the server
To launch the server, simply log in with your own user account and issue the
following command:
$ su wetserver -c ~/wetserver.sh
References
Schnable, K. (2013, July 20). Installing & conguring a vanilla wolfenstein
enemy territory dedicated server on ubuntu linux. Retrieved from http://
binaryimpulse.com/2013/07/wolfenstein-enemy-territory-server-linux/
6

S-ar putea să vă placă și