I've updated Rambo's work to reflect the 2199 server package. Comments/Suggestions?
***********************************************
aViCiOuSllama (llama)
Introduction & Acknowlegdements
This How-To will cover installing and configuring a dedicated server on a box running RedHat 8.0. As such it shoudl also apply pretty easily to other RedHat-based distros like Mandrake.
The content is an update of Rambo's original piece and draws heavily on other work posted at
www.unrealadmin.org. My thanks, and those of the community at large go out to those fragalicious authors.
Assumptions
you have a basic understanding of linux commands
you are able to create a user account
you are installing v2199 of the dedicated server
we will install the game to /home/utserver
What You Need
Dedicated Server for Linux v2199
Dedicated CD-Key
Disk Space
Preparations
This step is largely optional, but it's a good idea froma security point of view. Essentially, you create a user that will do nothing other than run the server for you. Aside from the server files, this account would be treated as just another user with respect to the rest of the system.
Here's what we will do:
become root
create a user account with a home directory /home/utserver and name utserver
set the account's password
$ su
password: enter_password
$ useradd -d /home/utserver utserver
$ passwd utserver
Enter Password: enter_password
Re-enter Password: enter_password
All Authentication Tokens Updated Successfully
$ exit
Now we need the server package from the link provided above. I suggest logging as utserver at this point. While you're waiting for the 250MB+ download to complete, go get a cd key from the link above. Note:
Installation
Unlike the earlier version of the server package, 2199 does not have an installer package. Rather, it's a compressed archive that simply needs to be unpacked to a directory of your choosing. In this case, we are using /home/utserver.
In the following steps we are going to set permissions so we can work with the archive, decompress the archive using bzip2 and unpack it using tar. I'm assuming you now have the downloaded package in /home/utserver and that you are logged in as utserver.
$ chmod a+rx ut2003-lnxded-2199.tar.bz2
$ bzip2 -d ut2003-lnxded-2199.tar.bz2
$ tar -xvf ut2003-lnxded-2199.tar
You should now be faced with a new directory called "/home/utserver/ut2003_dedicated". While you could leave the server files where they are, I prefer to shorter path names so let's rename the folder to ut2k3.
$ mv ut2003_dedicated ut2k3
By now, your CD-key should be in your inbox. Just place it in /home/utserver/ut2k3/System and ensure that the file name is simply "cdkey" with no extensions.
Next we create a directory for logs.
$ mkdir ut2k3/logs
Our final step is to make every file in the installation the sole property of the utserver user account and ensure that only that account and group can touch them.
$ su
password: enter_password
$ chown -R server. /home/utserver/ut2k3
$ chmod -R 770 /home/utserver/ut2k3
$ exit
That's it. The server is installed! Now we just have to confirm that it runs.
Initial Test
Move into the server's directory and try and launch a basic server:
$ cd ut2k3
$ ./ucc server DM-Asbestos?game=xGame.xDeathMatch -nohomedir -ini=UT2003.ini -log=/home/utserver/ut2k3/logs/ucc.log
Upon hitting enter, the server should start-up and load a DeathMatch in DM-Asbestos. If it doesn't, take note of the error message and search this site for a solution. Your log will prove useful in debugging.
Assuming the server launches, it's time to move on the initial configuration. For now, just kill the server by hitting CTRL-C.
Initial Configuration
As Rambo suggested in the first version of this How-To, it's a good idea to make a backup of your UT2003.ini.
$ cp ut2k3/System/UT2003.ini ut2k3/System/UT2003.ini.bak
That way you can simply edit UT2003.ini with your favorite text editor.
The following is a straight copy from Rambo's original version of this How-To. As such, they are all his settings.
[prompt]$ vi ut2k3/System/UT2003.ini
[url]
...
Port=7777 (choose your server port)
...
[IpDrv.TcpNetDriver] (these are Rambo's settings)
AllowDownloads=True
ConnectionTimeout=30.0
InitialConnectTimeout=30.0
AckTimeout=1.0
KeepAliveTime=0
MaxClientRate=10000
SimLatency=0
RelevantTimeout=5.0
SpawnPrioritySeconds=1.0
ServerTravelPause=4.0
NetServerMaxTickRate=20
LanServerMaxTickRate=35
DownloadManagers=IpDrv.HTTPDownload
DownloadManagers=Engine.ChannelDownload
AllowPlayerPortUnreach=True
LogPortUnreach=False
...
[Engine.GameReplicationInfo] (Information for clients)
ServerName=MY UT2003 SERVER
ShortName=YEAH
ServerRegion=0
AdminName=PickMe!
[email protected]
MOTDLine1=Message to clients
...
[Engine.AccessControl]
AdminPassword=HaRdPaSsWoRd (the console password)
...
[Engine.GameInfo] (a few Server Settings)
...
MaxSpectators=2
MaxPlayers=10
TimeLimit=20
GoalScore=0
GameStatsClass=IpDrv.MasterServerGameStats
SecurityClass=UnrealGame.UnrealSecurity
...
[IpDrv.MasterServerUplink]
DoUplink=True (to enable UT2003 querys and masterserver querys)
UplinkToGamespy=True (to enable GameSpy querys)
SendStats=True (to enable UT2003 stats)
ServerBehindNAT=False (put true if behind a firewall)
DoLANBroadcast=False
...
At the very minimum, I recommend that you make the following changes to your ini. They are set-out as by [Section.Heading]. If a value is already there, change it. If not, add the whole line.
[Engine.GameInfo]
AccesControlClass=XAdmin.AccessControlIni
[UWeb.WebServer]
bEnabled=True
ListenPort=(insert some number between 10000 and 15000 - totally arbitrary)
ServerName=(enter server's ip)
At this point, do another test run to make sure you didn't introduce any typos or glitches into the ini file. You should now be able to access the webadmin at
http://serversip:listenport/ (Admin with password Admin). Use the webadmin to set-up your server's name and game rules, etc. If you don't anything else, at least to the Users & Groups section and choose a new password.
If it works, move on to a brief discussion of how to run the server. Otherwise, check those logs against info on this site. Again CTRL-C will kill the server.
Running the Server
There are a number of ways to launch your server. You can find and script that works with SysInit and have the server come up at boot. You can launch manually with a script that restarts the server when it crashes. Or, you can do it all manually.
Personally, I like the manual approach given that a linux box doesn't do a lot fo rebooting and for the control it offers.
My Prefered Approach
We start by saving our command line. Create a text file that contains the command line with which you intend to start the server and make it executable. This way, you don't need to do a lot of typing. For example, I could store:
/home/utserver/ut2k3/ucc server CTF-Citadel?game=xGame.xDeathMatch?mutator=XGame.MutZo omInstaGib
in a file called "start". That way launching my server would require that I type:
$ ./start
The next step is to use a little program called screen, which creates a virtual terminal that can be hidden (detached) for future use. This allows you start the server, detach from the screen session, and logout without affecting the server.
$ screen
$ ./start
.. server launches
At this point, you "detach" from the session by hitting CTRL-A-D keys. You'll be returned to your original command prompt with the text [detached]. You can now logout.
To return to your game server:
$ screen -r
At this point, you can kill the server with CTRL-C or detach with CTRL-A-D. Nice and simple.
Conclusion
That's it. You're ready to roll! Go install the DE and Epic Bonus Packs. Read-up on advanced map rotations, mutators, and mods. Add tons of maps (disk space is cheap)! As Rambo so eloquently put it, "The Sky Is The Limit".
***********************************
Thanks!