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.
Step 1: Prepare Server files.
nitro@phoenix:/$ cd home/nitro/
nitro@phoenix:~$ wget ftp://ftp.snt.utwente.nl/pub/games/urbanterror/full_install/linux_or_mac/UrbanTerror411.zip
nitro@phoenix:~$ sudo apt-get install unzip
nitro@phoenix:~$ unzip UrbanTerror411.zip
nitro@phoenix:~$ cd UrbanTerror/
## 64bit server users may wish to install ia32libs for compatibility reasons
## You can also use the 64 bit binary instead (ioUrTded.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
nitro@phoenix:~/UrbanTerror$ vi start.sh
Inside this new file add:
#!/bin/bash
# change to the script's directory
cd $(dirname $0)
# start the server in the background
./ioUrTded.i386 +set fs_game q3ut4 +set fs_basepath /home/nitro/UrbanTerror/ +set fs_homepath /home/nitro/UrbanTerror/ +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:
: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)
nitro@phoenix:~/UrbanTerror$ vi stop.sh
Inside this file add:
#!/bin/bash
# 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.
nitro@phoenix:~/UrbanTerror$ vi q3ut4/server.cfg
nitro@phoenix:~/UrbanTerror$ 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.
nitro@phoenix:~/UrbanTerror$ cd /q3ut4/
nitro@phoenix:~/UrbanTerror/q3ut4$ wget ftp://ftp.snt.utwente.nl/pub/games/urbanterror/maps/q3ut4/ut4_baeza.pk3
nitro@phoenix:~/UrbanTerror/q3ut4$ vi mapcycle.txt
nitro@phoenix:~/UrbanTerror/q3ut4$ 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.
nitro@phoenix:~/UrbanTerror$ sudo chmod a+x start.sh stop.sh ioUrTded.i386
nitro@phoenix:~/UrbanTerror$ sudo chown -R nitro:nitro *
nitro@phoenix:~/UrbanTerror$ ./start.sh
Stopping your server to make changes:
nitro@phoenix:~/UrbanTerror$ ./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.
nitro@phoenix:~$ sudo apt-get install screen
nitro@phoenix:~$ cd UrbanTerror/
nitro@phoenix:~/UrbanTerror/$ screen -S UrbanTerror
nitro@phoenix:~/UrbanTerror/$ ./start.sh
To detach from the screen then logout use CTRL + A + D
To reattach once logged back in use:
nitro@phoenix:~$ screen -r UrbanTerror
Now that you have a working server you can do many wonderful things with it, Click here to find out more
This walkthrough was made of the top of my memory if you spot any errors please pm me to correct them
This post has been edited by Nitro: 20 January 2013 - 03:11 AM