Weapons Of Destruction: Lethal Orifice eXamination

 

Binding Commands History How to install Linux Server setup LOX Development Progress Weapons

 

 

My purpose in writing this tutorial is to give the Quake2 Community the tools and information needed to install, configure, and operate a fully functional Quake2 Server running LOX mod. Much of my knowledge has been accrued over a span of four years, most of which has been spent directly playing and operating Quake2 Servers. I have installed, configured and administered a variety of Quake2 Servers on Linux, FreeBSD, and Windows operating systems. I personally tend to use Windows for the Quake2 client and Linux for the Quake2 Server. Linux provides a solid platform for running Q2 and can even be run on as little as a Pentium I 100mhz for a LAN game, but don't expect to get 32 people ;).

This tutorial will be covering the main aspects of configuring a Quake2 Server, including installation all the updated server files, compiling a new q2ded binary, and installing LOX mod. Most importantly we'll cover aspects of Server security including cheat/bot protection and creating a different user to run the Q2 Server as. Many old tutorials run the Server as the root user and this is a path to the darkside. If there was one single thing you took away from this tutorial, I would hope you DO NOT RUN THE SERVER AS ROOT! Some, many, may think this is totally paranoid, but I feel this is a good step at securing your machine especially if it will be online. There are a couple of security flaws in Quake2 and minimizing the risks are the number one priority. I hope this tutorial will help the Quake2 Community to build, configure and operate 'safer', smoother running Q2:LOX Linux Servers.


Deacon  

I. Tools Needed

- Linux (Fedora Core 3 used in this tutorial).
- Quake2 CD or appropriate files from a Windows installation.
- Approximately 350Mb of disk space, more with mods, maps, and players.

You'll also need an internet connection for downloading files if you want to follow along with the tutorial.



II. System and user preparation

This is the important step of adding a new user for your Quake2 server to run under. Adding a new user gives a little protection incase the machine were to be taken over by hostile forces, this way they don't get your root account right off the bat.

1. Switch to the ‘root’ user and create a new user to run the Quake2 Server and set a complex password. When selecting a password use something with capitals, numbers, symbols, etc.

       # /bin/su root
       # /usr/sbin/adduser q2user
       # /usr/bin/passwd q2user

2. The above adduser command on Fedora creates a home directory by default (in our case it created /home/q2user), if not, create one and change directory to the users home. Create a directory named quake2 in your users home directory:
       # mkdir /home/q2user/quake2
       # cd /home/q2user/quake2
 
III. Linux Quake 2 Installation
Here we will install Quake 2 version 3.19, then update it to 3.20. Later in the next step we will compile and install version 3.21.

3. Put the Q2 CD in your CD-Rom and mount the drive:

       # mount /dev/cdrom


Note: Some older systems may require this command:

       # mount –t iso9660 /dev/cdrom /mnt/cdrom
4. Make sure you are in the directory you created, ie. /home/q2user/quake2 and proceed to copy the files from the CD-Rom, 
don’t forget the “.” Period at the end to tell your machine to copy all files to the current location:
       # cp –r /media/cdrom/Install/Data/* .
5. Now we want to get rid of all the windows files that we don’t need:
       # rm –rf /usr/local/games/quake2/*.dll
       # rm –rf /usr/local/games/quake2/quake2.exe
       # rm –rf /usr/local/games/quake2/baseq2/gamex386.dll
6. Now, download the Quake2 Linux Binaries. There are a number of places that offer them for download, in this particular install we are using the quake2-3.20-glibc-i386-unknown-linux2.0.tar.gz file, here are a couple download links:

ftp://ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.20-glibc-i386-unknown-linux2.0.tar.gz  
ftp://ftp.deaconstomb.org/pub/q2/quake2-3.20-glibc-i386-unknown-linux2.0.tar.gz

       # ncftpget ftp://ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.20-glibc-i386-unknown-linux2.0.tar.gz

or

       # wget ftp://ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.20-glibc-i386-unknown-linux2.0.tar.gz


7. Untar the Quake2 Linux Binaries package:

       # tar –zxvf quake2-3.20-glibc-i386-unknown-linux2.0.tar.gz

8. The main files are now essentially setup for a working Quake2 Server and we should set permissions for the new user we created to be able to alter files and start the server, if all goes well this should start up a basic DM Quake2 Server:

       # chown –R q2user /usr/local/games/quake2 ; chgrp –R q2user /usr/local/games/quake2
       # su q2user
       # ./quake2 +set dedicated 1 +map q2dm1


IV. Quake 2 version 3.21 Installation

Now we are going to configure and compile the newest version of Quake 2 for Linux, version 3.21 provided by http://icculus.org/quake2/. This is very important for running the latest and greatest version of LOX v1.12.8, it will crash otherwise.

9. You can download the files a few different ways, but for this example we will use the CVS method. First let's prepare a place to work and download the files:

       # mkdir /home/q2user/new_q2
       # cd /home/q2user/new_q2

- Login to cvs.icculus.org with password: anonymous

       # cvs -d:pserver:anonymous@cvs.icculus.org:/cvs/cvsroot login

- Download, via CVS, all the files into the directory "quake2"

       # cvs -z3 -d:pserver:anonymous@cvs.icculus.org:/cvs/cvsroot co quake2

10. Time to edit the Makefile to better suit our needs of a dedicated server only. The Makefile controls which settings get compiled into the new binary. Open up the Makefile with vi or any other editor and set Build_Dedicated to YES and the following to NO:

       # vi Makefile

BUILD_SDLQUAKE2=NO      # sdlquake2 executable (uses SDL for cdrom and sound)
BUILD_SVGA=NO           # SVGAlib driver. Seems to work fine.
BUILD_X11=NO            # X11 software driver. Works somewhat ok.
BUILD_GLX=NO            # X11 GLX driver. Works somewhat ok.
BUILD_FXGL=NO           # FXMesa driver. Not tested. (used only for V1 and V2).
BUILD_SDL=NO            # SDL software driver. Works fine for some people.
BUILD_SDLGL=NO          # SDL OpenGL driver. Works fine for some people.
BUILD_CTFDLL=NO         # game$(ARCH).so for ctf
BUILD_XATRIX=NO         # game$(ARCH).so for xatrix (see README.r for details)
BUILD_ROGUE=NO          # game$(ARCH).so for rogue (see README.r for details)
BUILD_JOYSTICK=NO       # build in joystick support
BUILD_ARTS=NO           # build in support for libaRts sound.
BUILD_ALSA=NO           # build in support for ALSA (default sound on 2.6)
BUILD_DEDICATED=YES     # build a dedicated quake2 server
BUILD_AA=NO             # build the ascii soft renderer.
BUILD_QMAX=NO           # build the fancier GL graphics
BUILD_RETEXTURE=NO      # build a version supporting retextured graphics
BUILD_REDBLUE=NO        # build a red-blue 3d glasses renderer...
STATICSDL=NO
11. Now we'll change directory into the "quake2" directory and build the new q2ded binary and gamei386.so files with the make 
command:
       # cd quake2
       # make

12. Rename and replace the old gamei386.so file and install the new q2ded server binary in the quake2 and baseq2 directories:

       # mv /home/q2user/quake2/baseq2/gamei386.so /home/q2user/quake2/baseq2/gamei386.so.old
       # mv releasei386/gamei386.so /home/q2user/quake2/baseq2/
       # mv releasei386/q2ded /home/q2user/quake2/
       # chown -R  q2user:q2user /home/q2user/quake2/*
V. LOX Installation
13. To install LOX mod we need to download the necessary files, make sure you are in the main Quake2 directory, ie.
 /usr/local/games/quake2 The example assumes you have ‘wget’, but you can download the files here also:

- http://www.clanwos.org/programs/lox_1_12_7_full.zip
- ftp://ftp.deaconstomb.org/pub/q2/mods/lox/lox_1_12_7_full.zip

       # wget http://www.clanwos.org/programs/lox_1_12_7_full.zip
       # unzip -a lox_1_12_7_full.zip
       # cd lox
         Note - set file permissions for lox files:
       # chmod 644 * ; chmod 755 gamei386.so

14. Edit the Server.cfg file to change the Server name, edit the game variables, etc. We also need to enter in some vital information to better help administrate the Server.

       # vi testserver.cfg

-Edit the line “set rcon_password somepassword” (now you can issue remote commands via the console, such as changing the map, ie. rcon map q2dm2) and enter in a unique rcon password.

-Edit the server name line to designate your server.

15. Edit the motd.txt for a unique message when entering the server.

# vi motd.txt

16. With the basic LOX mod setup we can check and see if we have a working LOX Server. Change to the main Quake2 directory and start the server:

       # cd ..
       # ./q2ded +set dedicated 1 +set game lox +exec testserver.cfg

You should see a lot more console feedback this time with the addition of the LOX mod. To verify some information, you can issue the commands, “serverinfo”, “status” and “game”. That’s about it for the general Server configuration, now’s it a matter of fine tuning the Server.cfg file variables and getting things just right.

 

VI. BW-Admin Installation

17. Download the BW-Admin files into your main quake2 directory, in this case it's /home/q2user/quake2 and you will also need to su to the new user you created, we are using 'q2user'.

       # wget http://bw-admin.sourceforge.net/files/bw-admin.linux.v1.74.tar.gz
       # tar -zxvf bw-admin.linux.v1.74.tar.gz
       # cd bw-admin

18. With BW-Admin installed we need to edit bw-admin.cfg to tell the BW-Admin DLL what the renamed LOX mod "gamei386.so" is named. More information about this procedure in the bw-admin.html file in the bw-admin directory.

       # vi bw-admin.cfg

-Add on the second line:
dll = gamei386.so.real

-Enable all logging features:
track_connect = 1
track_disconnect = 1
track_renames = 1
track_refused = 1

-Uncomment the admin password:
admin = someG00Dp4ssword

19. For each mod that we want to run BW-Admin on, we need to rename the original mod "gamei386.so" to "gamei386.so.real" and copy the BW-Admin "gamei386.so" to the mods main directory, in this example we are using LOX, ie: /home/q2user/quake2/lox , before we do anything, we will create a few backups, then copy all the neccessary files.

       # cp /home/q2user/quake2/lox/gamei386.so /home/q2user/quake2/lox/gamei386.so.bak
       # mv /home/q2user/quake2/lox/gamei386.so /home/q2user/quake2/lox/gamei386.so.real
       # cp /home/q2user/quake2/bw-admin/release/gamei386.so /home/q2user/quake2/lox/gamei386.so
       # cp /home/q2user/quake2/bw-admin/server_bans.txt /home/q2user/quake2/lox/
       # cp /home/q2user/quake2/bw-admin/bw-admin.cfg /home/q2user/quake2/lox/

20. All that's left now is to start up our BOT Protected server and fill it up with LOX hungry people.

       # cd ..
       # ./quake2 +set dedicated 1 +set game lox +exec Server.cfg

Helpful Links:

IDSoftware - http://www.idsoftware.com/games/quake/quake2/
IDSoftware FTP - ftp://ftp.idsoftware.com/idstuff/quake2
BW-Admin - http://bw-admin.sourceforge.net/
Well of Souls - Clan WOS - http://www.clanwos.org
Well of Souls Message Boards - LOX Help Forums - http://www.clanwos.org/forums
Quake 2 Linux Server Setup with LOX - http://www.clanwos.org/docs/loxlinux/
Deacons|TOMB| FTP Warehouse - ftp://ftp.deaconstomb.org

I hope this will help some of you who are trying to create Linux Quake2:LOX Servers so that we can continue the Q2:LOX legacy.

If you have any questions, comments, and/or suggestions please email me or leave a message on the WOS message board.

Lasted edited on 02/08/2005