Urban Terror Forums: [HowTo] Start your first server. - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • This topic is locked

[HowTo] Start your first server. Rate Topic: ***** 1 Votes

#1 User is offline   Nitro Icon

  •   QA member   
  • Account: nitro
  • Main tag: |P|
  • Country:
  • Joined: 15-March 10
  • Posts: 1,133

Posted 21 July 2011 - 02:38 AM

How to Install Urban Terror Server on Linux.

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

Lian Li pc-o11dw Der 8auer Edition · Gigabyte x570 Aorus Xtreme · AMD Ryzen 9 5950x 16-Core
32GB DDR4 3800MHz CL16 · 2x 1TB Samsung NVMe RAID 0 · 16GB Radeon RX 6900XT Liquid Cooled

#2 User is offline   theRipper Icon

  • Account: theripper
  • Main tag: CMM|
  • Country:
  • Joined: 26-September 10
  • Posts: 924

Posted 21 July 2011 - 06:48 AM

very nice :)

This post has been edited by PartyPoison: 21 July 2011 - 05:40 PM

A.K.A. [idgaf.]Face(Clan Leader)


#3 User is offline   ObScUrE Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: obscure
  • Country:
  • Joined: 28-February 10
  • Posts: 2,192

Posted 21 July 2011 - 02:33 PM

Looks good!
-> Topic pinned!

Quote

BenQ-XL2420T|Filco-Ninja-TKL-MXRed|Logitech-G403|AKG-K70201000010 01101100 01110101 01110100 01010010 01100001 01110101 00100100 01100011 01101000~The quieter you become, the more you are able to hear.~

#4 User is offline   Nitro Icon

  •   QA member   
  • Account: nitro
  • Main tag: |P|
  • Country:
  • Joined: 15-March 10
  • Posts: 1,133

Posted 21 July 2011 - 05:36 PM

View PostPartyPoison, on 21 July 2011 - 06:48 AM, said:

very nice :)

good tutorial.

if you dont have a server though.. pm me and i can get you one cheap:D lol



dude seriously? its bad enough your ignore the soliciting rule in your banner, but hijacking a thread to make profit is just crazy, go buy some google adwords or something. :mellow:
Lian Li pc-o11dw Der 8auer Edition · Gigabyte x570 Aorus Xtreme · AMD Ryzen 9 5950x 16-Core
32GB DDR4 3800MHz CL16 · 2x 1TB Samsung NVMe RAID 0 · 16GB Radeon RX 6900XT Liquid Cooled

#5 User is offline   theRipper Icon

  • Account: theripper
  • Main tag: CMM|
  • Country:
  • Joined: 26-September 10
  • Posts: 924

Posted 21 July 2011 - 05:41 PM

sorry. wasnt thinking :)

no harm intended. sorry for the lack of judgment.

edited above post.

This post has been edited by PartyPoison: 21 July 2011 - 05:46 PM

A.K.A. [idgaf.]Face(Clan Leader)


bullet_loaderAdvertisement

#6 User is offline   oldasdirt Icon

  • Account: oldasdirt
  • Joined: 13-September 11
  • Posts: 28

Posted 12 October 2011 - 05:34 PM

Great. but how do I do it in Windows 7, 64 bit?

#7 User is offline   Nitro Icon

  •   QA member   
  • Account: nitro
  • Main tag: |P|
  • Country:
  • Joined: 15-March 10
  • Posts: 1,133

Posted 14 October 2011 - 09:09 PM

View Postoldasdirt, on 12 October 2011 - 05:34 PM, said:

Great. but how do I do it in Windows 7, 64 bit?



If you find out make a thread about it :P I have never used a client OS as a server so I wouldn't know.
Lian Li pc-o11dw Der 8auer Edition · Gigabyte x570 Aorus Xtreme · AMD Ryzen 9 5950x 16-Core
32GB DDR4 3800MHz CL16 · 2x 1TB Samsung NVMe RAID 0 · 16GB Radeon RX 6900XT Liquid Cooled

#8 User is offline   wesker99 Icon

  • Account: wesker99
  • Joined: 23-February 12
  • Posts: 2

Posted 23 February 2012 - 06:00 PM

Are there any guidelines for com_hunkmegs when running a UrT server? I see Nitro uses 128, but I'd like to run a server on a VPS with 256mb of memory (haha I know). If I could cut it down to even 64 and still get decent performance, that would be cool.

Thanks for any insight you guys might have!

This post has been edited by wesker99: 23 February 2012 - 06:00 PM


#9 User is offline   Nitro Icon

  •   QA member   
  • Account: nitro
  • Main tag: |P|
  • Country:
  • Joined: 15-March 10
  • Posts: 1,133

Posted 24 February 2012 - 01:43 AM

there is no point the server will never use 256 so allocating it is just a waste, the highest i have seen my server go to was 98MB on a custom map (simpsons map if memory serves) so no need also hunkmegs is not a be all end all option if you set 128 and require more the server will automatically allocate a further 128mb when needed.

Hunkmegs is related to your number of players also, I recently turn my server down to 24 players as I was getting fed up with 15v15 and wanted a more challenging game and less spam, the server is constantly always arround the ~63mb memory usage area, however this does not count for the server enviroment either so a vps of 128mb would probably be minimum, but 256mb vps would be more recommended if you play to have like a website for your clan and such things like server admin bots (b3, redcap, mandigo etc).

I am personally against hosting servers from VPS as its not a proper method for providing great quality game servers (something that urban terror lacks) but i could settle for one over a home server.

anyways if your going to be using a vps then hunkmegs should be the least of your concerns, I would probably focus on a vps host with good networking (not over cramming everyone on to a single connection) and high allocation of cpu time, urt is one of the most physically demanding servers in the business (cpu wise).

p.s. i mentioned a utility called "screen" in the setup stage, I use this method as it still allows access directly with the server console, that way anyone trying to mess about with kiddie scripts, or prevent access to rcon with dos attacks etc, then I still have direct access to my servers console for control. it also allows for a few other neat tricks, but you'll pick stuff up on the way.

this is how i start my server.

start.sh
#!/bin/bash

#server settings
ip="83.142.230.13"
port="27960"
name="urt_ctf"
mod="q3ut4"
base="/home/nitro/urt_ctf/"
home="/home/nitro/urt_ctf/"

#Remove any unwanted config files
rm q3ut4/q3config_server.cfg

# change to the script's directory
cd $(dirname $0)

# start the server under screen
screen -AmdS $name ./ioq3ded-UrT.i386 \
+exec ctf_server.cfg \
+set fs_game $mod \
+set fs_basepath $base \
+set fs_homepath $home \
+set dedicated "2" \
+set com_hunkmegs "128" \
+set sv_sanitizeNames "1" \
+set net_port $port
#+set net_ip $ip
# net_ip is disabed to allow incoming connections from localhost
# if you enable net_ip option remember to add a trailing slash "\"
# to the end of the previous line.

#create pid of screen session
echo | screen -list | grep $name | cut -f1 -d'.' | sed 's/\W//g' > urt.pid

# all done



stop.sh

#!/bin/bash

# change to the script's directory
cd $(dirname $0)

# kill, using the pid file
kill $(cat urt.pid)

# tidy up
screen -wipe > /dev/null
rm urt.pid

# all done



This post has been edited by Nitro: 24 February 2012 - 02:49 AM

Lian Li pc-o11dw Der 8auer Edition · Gigabyte x570 Aorus Xtreme · AMD Ryzen 9 5950x 16-Core
32GB DDR4 3800MHz CL16 · 2x 1TB Samsung NVMe RAID 0 · 16GB Radeon RX 6900XT Liquid Cooled

#10 User is offline   wesker99 Icon

  • Account: wesker99
  • Joined: 23-February 12
  • Posts: 2

Posted 24 February 2012 - 08:22 PM

Good info! Thanks!

I'm quite aware that a tiny little vps isn't really the best solution for a Q3A/UrT server. I was more hoping to get a game going between me and a few friends. Maybe 8 people max.

I know I'm a few years late, but I'm pretty new to the quake/ioquake server administration game, and I was under the impression that com_hunkMegs would cause the server to automatically start out at that amount of RAM. Thanks a lot for clearing that up!

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Sponsored link
https://www.frozensand.com/


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942