For the purpose of this walk through we'll have to make some assumptions.
1. We are using Ubuntu Server Edition.
2. Username is Nitro.
3. Users Home Dir is /home/nitro.
4. User has access either to Sudo/Root.
5. Server has an External IP of 85.140.33.17.
6. You are talented enough to understand the basics such as console editors or atleast competent enough to read a manual.
7. You have already downloaded the server files from the download section of this website.
Step 1: Prepare Server files.
Quote
nitro@phoenix:$ tar -xvf UrbanTerror42_ded-2.tar.gz
nitro@phoenix:$ cd UrbanTerror42/
nitro@phoenix:$ ./UrTUpdater_Ded.i386
## At this point follow the onscreen instructions to download the remaining server files, this may take a few minutes.
## 64bit server users may wish to install ia32libs for compatibility reasons
## You can also use the 64 bit binary instead (Quake3-UrT-Ded.x86_64) however it is not recommended.
nitro@phoenix:/$ sudo apt-get install ia32libs
Step 2: Creating a Server Start Script.
Lets create a start script using our favourite editor (mines is "vi" but you can substitute nano or others if you wish)
VI Manual
Quote
Inside this new file add:
Quote
# change to the script's directory
cd $(dirname $0)
# start the server in the background
./Quake3-UrT-Ded.i386 +set fs_game q3ut4 +set fs_basepath /home/nitro/UrbanTerror42/ +set fs_homepath /home/nitro/UrbanTerror42/ +set dedicated 2 +set net_ip 85.140.33.17 +set net_port 27960 +set com_hunkmegs 128 +exec server.cfg &
# write the pid file
echo $! > urt.pid
Save the file: :wq!
Step 3: Creating a Stop Script.
Lets create a stop script using our favourite editor (mines is "vi" but you can substitute nano or others if you wish)
Quote
Inside this file add:
Quote
# change to the script's directory
cd $(dirname $0)
# kill, using the pid file
kill $(cat urt.pid)
# tidy up
rm urt.pid
Save Again: :wq!
Step 4: Configuring your Server
lets open the configuration file to edit the server settings and customise it with our on personal server details and then followed by picking our map cycle.
Quote
nitro@phoenix:$ vi q3ut4/mapcycle.txt
Step 5: Adding Custom Maps to the server.
To add custom maps simply download the map.pk3 file into your /q3ut4/ directory then add its name minus the ".pk3" part to your mapcycle list.
Quote
nitro@phoenix:$ wget ftp://ftp.snt.utwent...4/ut4_baeza.pk3
nitro@phoenix:$ vi mapcycle.txt
nitro@phoenix:$ cd ../
Step 6: Testing out your Server.
First we need to make our scripts and server binary executable and then take ownership of all files to prevent any unnecessary errors.
Quote
nitro@phoenix:$ sudo chown -R nitro:nitro *
nitro@phoenix:$ ./start.sh
##Stopping your server to make changes:
nitro@phoenix:$ ./stop.sh
Step 7: Running your server under "Screen"
This step is for those of you that like to use the screen app to manage your servers.
Quote
nitro@phoenix:~$ cd UrbanTerror42/
nitro@phoenix:~$ screen -S UrbanTerror
nitro@phoenix:~$ ./start.sh
To detach from the screen then logout use CTRL + A + D
To reattach once logged back in use:
Quote