(ve):Install Team Fortress 2 Dedicated Server
- This page was last modified on February 13, 2011, at 17:03.
From (mt) Community Wiki
Contents |
This is an INCOMPLETE article. Please excuse our dust as we improve and organize the CommunityWiki. Help us keep this article up-to-date by joining our wiki!
Cribbed from the Wikipedia entry on Team Fortress 2:
Team Fortress 2 is focused around two opposing teams competing for an objective. These teams, Reliable Excavation & Demolition (RED) and Builders League United (BLU), are meant to represent two holding corporations that between them secretly control every government on the planet. Players can choose to play as one of nine classes in these teams, each with his own unique strengths and weaknesses. Although the abilities of a number of classes have changed from earlier Team Fortress incarnations, the basic elements of each class have remained. The game was released with six official maps, although 13 extra maps and eight arena maps have been included in subsequent updates. In addition, a number of community assembled maps have been released. When players join a level for the first time, an introductory video shows how to complete its objectives. During matches, an eternally dissatisfied woman voiced by Ellen McLain announces various game events over loudspeakers. A vanilla server can hold 24 players, but can be configured to support a maximum of 32 players.
Important Information Before Beginning
Installation, configuration and troubleshooting is not supported by (mt) Media Temple.
Installing a Team Fortress 2 dedicated server onto a (dv) Dedicated-Virtual or (ve) Server is a relatively simple process. Make sure your server is as optimized as can be, and turn off all unnecessary processes to so the dedicated server has as much free resources available as possible.
Installation Steps
Note before proceeding
The steps below are written with the assumption that;
- You are connected to the server via SSH using a non root username
- The username has sudo access
- The (ve) Server is configured to use Ubuntu
This guide is for installing the server into the root level of your home directory (ie /home/MTUSER/), if you want to change the directories, substitute where needed.
For a (ve) Server
MTuser@ve:~$ sudo apt-get install lib32gcc1 MTuser@ve:~$ sudo apt-get install gdb
This is needed because you are on a 64-bit version of linux, and the Steam client/TF2 server are 32-bit programs. Also gdb allows for debugging of server crash logs.
MTuser@ve:~$ wget http://www.steampowered.com/download/hldsupdatetool.bin MTuser@ve:~$ chmod +x hldsupdatetool.bin MTuser@ve:~$ ./hldsupdatetool.bin
The Steam Subscriber Agreement will appear on the screen. Read the agreement and then type 'yes' when prompted. It will return you to the command prompt.
MTuser@ve:~$ ./steam
This will start the Steam client and make sure it is up to date. Once it has finished updating it will return you to the command prompt. This will take some time. Please be patient.
MTuser@ve:~$ ./steam -command update -game tf -dir .
This will install Team Fortress 2 into the current directory. If you want to change the directory, make sure to remove the '.' after '-dir' and replace it with the preferred directory. The installation will proceed, and can take quite a while. Please be patient.
MTuser@ve:~$ cd orangebox MTuser@ve:~$ ./srcds_run -game tf +map cp_badlands -debug
This starts the server on the map cp_bandlands.
Firewall Settings
Before your server is able to connect to Valve's Steam servers to allow VAC secure mode, you need to configure your firewall.
- 1. Log into Parallels Control Panel
- 2. Click on Firewall
- 3. Choose 'Advanced firewall mode with default policy Accept'
- 4. Choose 'New Rule' and enter the following information:
- Screenshot of (ve) firewall rules
- Name: Steam UDP
- Policy: Accept
- Protocol: UDP
- Source Port or Port Range: 27000-27015
- The rule's position in the chain: Top
Press 'submit' and the rule will be active.
For a (dv) Dedicated-Virtual Server 3.5
MTuser@dv35:~$ wget http://www.steampowered.com/download/hldsupdatetool.bin MTuser@dv35:~$ chmod +x hldsupdatetool.bin MTuser@dv35:~$ ./hldsupdatetool.bin
The Steam Subscriber Agreement will appear on the screen. Read the agreement and then type 'yes' when prompted. It will return you to the command prompt.
MTuser@dv35:~$ ./steam
This will start the Steam client and make sure it is up to date. Once it has finished updating it will return you to the command prompt. This will take some time. Please be patient.
MTuser@dv35:~$ ./steam -command update -game tf -dir .
This will install Team Fortress 2 into the current directory. If you want to change the directory, make sure to remove the '.' after '-dir' and replace it with the preferred directory. The installation will proceed, and can take quite a while. Please be patient.
MTuser@dv35:~$ cd orangebox MTuser@dv35:~$ ./srcds_run -game tf +map cp_badlands -debug
This starts the server on the map cp_bandlands.
Firewall Settings
Before your server is able to connect to Valve's Steam servers to allow VAC secure mode, you need to configure your firewall.
- 1. Log into Plesk Control Panel
- 2. Click on Modules
- 3. Choose Firewall
- 4. Choose 'Edit Firewall Configuration'
- 5. Choose 'Add Custom Rule' and enter the following information:
- Screenshot of (dv) firewall rules
- Name of the rule: Steam UDP
- Match direction: Incoming
- Action: Allow
- Add port or port range: 27000-27015
Press 'submit' and the rule will be active
Post-Installation Notes
1. The Dedicated Server does not need root privileges to install or run.
2. (ve) Server Only: If you have problems running the installed server, you might need to install some packages for 32-bit binary compatibility. Simply run the following command:sudo apt-get install ia32-libs
2a. While this wiki entry was aimed at (ve) Servers using Ubuntu, the dedicated server is a binary file and it should work on any version of Linux offered with the (ve). You may need to use a different method (yum, rpm, aptitude), of loading lib32gcc1 depending on the distro used.
3. Create a file inside orangebox/ called 'server.sh', edit it with your favorite text editor, and add the following lines:
#!/bin/sh echo "Starting TF2 Server" sleep 1 screen -AmdS tf2 ./srcds_run -game tf +map cp_badlands -debugAfter the file is saved, run
chmod +x server.shThis will allow you to run the server in the background and still be able to work on the server via SSH. You can add or edit the flags (ie, -game, +map, -debug, etc.) as needed to run your server. If you need to look into the server console at any time, run
screen -r tf2
To exit the console and return to the command prompt hold down control + a + d
4. If you find yourself or others connecting to the game server for a few seconds then being unable to connect on any port or protocol for between 5-10 minutes, submit a support request in the AccountCenter listing your IP, the port number(s) used for the game server, and the steps you have taken to troubleshoot the problem.
Links
All links take you outside of (mt) Media Temple's network
- http://tf2wiki.net/wiki/Main_Page
- Fan-edited wiki site
- http://developer.valvesoftware.com/wiki/Command_Line_Options
- List of flags that can be passed when running the server from the command line
- http://www.metamodsource.net/
- C++ plugin environment for Source-based dedicated servers
- http://www.sourcemod.net/
- Third-party administrator tool based on Metamod
- http://forums.steampowered.com/forums/forumdisplay.php?f=45
- Steam Dedicated Server Forums