Step 1.
Step 2.
1 2 |
apt-get install screen |
1 2 |
apt-get install lib32gcc1 |
Step 3.
Create a new user by running the command:
1 2 |
adduser tf2 |
Step 4.
Step 5.
1 2 |
mkdir steamcmd |
Then enter the folder by running:
1 2 |
cd steamcmd |
After this, SteamCMD can be downloaded by running the command:
1 2 |
wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz |
Once the download has completed (should only take a few seconds) run the command:
1 2 |
tar -xvzf steamcmd_linux.tar.gz |
Step 6.
Launch SteamCMD by typing:
1 2 |
./steamcmd.sh |
SteamCMD devrait effectuer une mise à jour automatique, puis afficher une ligne indiquant la vapeur >. À ce stade, vous devez vous connecter à Steam en exécutant
1 2 |
login anonymous |
Next, at the Steam>
prompt, type:
1 2 |
force_install_dir /home/tf2/server/ |
1 2 |
app_update 232250 validate |
Step 7.
Create a script to launch the server. This can be done by running:
1 2 3 |
cd /home/tf2 nano start_tf2.sh |
Then copy the following into the file:
1 2 3 4 5 |
#!/bin/sh sleep 1 screen -A -m -d -S tf2-server ./ttt/srcds_run -console -game tf2 +map cp_badlands +maxplayers 24 echo "TF2 Server Started, type screen -r to view console" |
1 2 |
chmod +x start_tf2.sh |
Step 8.
Start the server by running:
1 2 |
./start_tf2.sh |
The server will then start and can be connected to in-game.
Step 9.
1 2 3 |
cd server/tf/cfg nano server.cfg |
1 2 |
hostname "My Vultr Server" |
1 2 |
mp_maxrounds 5 |
1 2 |
nano mapcycle.txt |
In this file, a list is written with one map on each line. For example:
1 2 3 4 |
cp_badlands cp_granary cp_degrootkeep |
1 2 |
./start_tf2.sh |
Alternatively, the TF2 Server can be restarted by typing:
1 2 |
screen -r |
Then press Ctrl + C and type:
1 2 3 |
cd /home/tf2 ./start_tf2.sh |
Final notes
The server console can be accessed at any point by typing the following into the terminal screen.
1 2 |
screen -r |
1 2 3 |
cd /home/tf2/steamcmd/ ./steamcmd.sh +login anonymous +force_install_dir /home/tf2/server/ +app_update 232250 |
After a few minutes, you can restart the server and clients will be able to connect again.
Leave a Reply