Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":2259,"date":"2019-11-26T07:10:01","date_gmt":"2019-11-26T07:10:01","guid":{"rendered":"https:\/\/support.aklwebhost.com\/?post_type=manual_kb&p=2259"},"modified":"2019-12-11T00:25:18","modified_gmt":"2019-12-11T00:25:18","slug":"install-team-fortress-2-on-ubuntu","status":"publish","type":"manual_kb","link":"https:\/\/support.aklwebhost.com\/knowledgebase\/install-team-fortress-2-on-ubuntu\/","title":{"rendered":"Install Team Fortress 2 On Ubuntu"},"content":{"rendered":"

This tutorial explains how to install\u00a0Team Fortress 2<\/strong>\u00a0on the Ubuntu operating system. It was performed on\u00a0Ubuntu 12.04 x86<\/strong>. Other versions of Debian or Ubuntu may also work without any changes.<\/p>\n

Step 1.<\/strong><\/h3>\n

Connect to your VPS using the root login details.<\/p>\n

Step 2.<\/strong><\/h3>\n

Install the necessary packages by typing:<\/p>\n

apt-get install screen\r\n<\/code><\/pre>\n

If you are running a 64 bit system, you will also need to run:<\/p>\n

apt-get install lib32gcc1\r\n<\/code><\/pre>\n

Notice that package ends in a\u00a01<\/code>\u00a0(one), not an\u00a0L<\/code>.<\/p>\n

Step 3.<\/strong><\/h3>\n

Create a new user by running the command:<\/p>\n

adduser tf2\r\n<\/code><\/pre>\n

Follow the onscreen prompts by filling in the desired information. Note that fields regarding information such as “Full name” and “Address” are optional.<\/p>\n

Step 4.<\/strong><\/h3>\n

Reconnect to the VPS with the username\u00a0tf2<\/code>\u00a0and the password you selected in the user creation.<\/p>\n

Step 5.<\/strong><\/h3>\n

Create a new folder for the server copy of Steam by running the command:<\/p>\n

mkdir steamcmd\r\n<\/code><\/pre>\n

Then enter the folder by running:<\/p>\n

cd steamcmd\r\n<\/code><\/pre>\n

After this, SteamCMD can be downloaded by running the command:<\/p>\n

wget http:\/\/media.steampowered.com\/installer\/steamcmd_linux.tar.gz\r\n<\/code><\/pre>\n

Once the download has completed (should only take a few seconds) run the command:<\/p>\n

tar -xvzf steamcmd_linux.tar.gz\r\n<\/code><\/pre>\n

Step 6.<\/strong><\/h3>\n

Launch SteamCMD by typing:<\/p>\n

.\/steamcmd.sh\r\n<\/code><\/pre>\n

SteamCMD should perform a self-update, then show a line saying\u00a0Steam><\/code>. At this point, you need to log into Steam by running:<\/p>\n

login anonymous\r\n<\/code><\/pre>\n

Next, at the\u00a0Steam><\/code>\u00a0prompt, type:<\/p>\n

force_install_dir \/home\/tf2\/server\/\r\n<\/code><\/pre>\n

At this point, Steam is ready to download the Team Fortress 2 server files. Run the following command to begin the download. This may take some time.<\/p>\n

app_update 232250 validate\r\n<\/code><\/pre>\n

Step 7.<\/strong><\/h3>\n

Create a script to launch the server. This can be done by running:<\/p>\n

cd \/home\/tf2\r\nnano start_tf2.sh\r\n<\/code><\/pre>\n

Then copy the following into the file:<\/p>\n

#!\/bin\/sh\r\nsleep 1\r\nscreen -A -m -d -S tf2-server .\/ttt\/srcds_run -console -game tf2 +map cp_badlands +maxplayers 24\r\necho \"TF2 Server Started, type screen -r to view console\"\r\n<\/code><\/pre>\n

Press\u00a0Ctrl + X<\/strong>\u00a0followed by\u00a0Y<\/strong>\u00a0to save the file.<\/p>\n

To make the file executable, run the command:<\/p>\n

chmod +x start_tf2.sh\r\n<\/code><\/pre>\n

Step 8.<\/strong><\/h3>\n

Start the server by running:<\/p>\n

.\/start_tf2.sh\r\n<\/code><\/pre>\n

The server will then start and can be connected to in-game.<\/p>\n

Step 9.<\/strong><\/h3>\n

Customize the server by typing\u00a0nano start_tf2.sh<\/code>\u00a0and changing the value after “+map” or “+maxplayers” to the map or player count you would like. After making those edits, press\u00a0Ctrl + X<\/strong>\u00a0followed by\u00a0Y<\/strong>\u00a0to save.<\/p>\n

To change other config options, type:<\/p>\n

cd server\/tf\/cfg\r\nnano server.cfg\r\n<\/code><\/pre>\n

This opens the main configuration file for the server. These values can be modified in a number of ways to make your server appear different.<\/p>\n

The first value that you should add is the “hostname”. This variable is used to set the name for your server. It can be edited by adding a line saying:<\/p>\n

hostname \"My AKLWEB Host Server\"\r\n<\/code><\/pre>\n

Another commonly changed variable is “mp_maxrounds”. This variable is used to change the number rounds between each map change. It can be modified by adding another line to\u00a0server.cfg<\/code>\u00a0and typing:<\/p>\n

mp_maxrounds 5\r\n<\/code><\/pre>\n

Once you set the “mp_maxrounds” value, press\u00a0Ctrl + X<\/strong>\u00a0then\u00a0Y<\/strong>\u00a0to save and exit.<\/p>\n

One last aspect of configuration that I will cover in this tutorial is the map cycle. The map cycle is just written as a list in the file\u00a0mapcycle.txt<\/code>. Open the map cycle by typing:<\/p>\n

nano mapcycle.txt\r\n<\/code><\/pre>\n

In this file, a list is written with one map on each line. For example:<\/p>\n

cp_badlands\r\ncp_granary\r\ncp_degrootkeep\r\n<\/code><\/pre>\n

After typing all of the desired maps, press\u00a0Ctrl + X<\/strong>\u00a0then\u00a0Y<\/strong>\u00a0to save and exit. These settings will require a server restart. This can either be achieved by logging into the AKLWEB Host Member Home, and restarting the server, and reconnecting as the user\u00a0tf2<\/code>, and typing:<\/p>\n

.\/start_tf2.sh\r\n<\/code><\/pre>\n

Alternatively, the TF2 Server can be restarted by typing:<\/p>\n

screen -r\r\n<\/code><\/pre>\n

Then press\u00a0Ctrl + C<\/strong>\u00a0and type:<\/p>\n

cd \/home\/tf2\r\n.\/start_tf2.sh\r\n<\/code><\/pre>\n

Final notes<\/strong><\/h3>\n

The server console can be accessed at any point by typing the following into the terminal screen.<\/p>\n

screen -r\r\n<\/code><\/pre>\n

To leave the server console, Hold down the\u00a0Ctrl<\/strong>\u00a0key, and type\u00a0AD<\/strong>.<\/p>\n

At some points, the server may need updating. It will give warnings in the server console when this is necessary. An update can be performed by running:<\/p>\n

cd \/home\/tf2\/steamcmd\/\r\n.\/steamcmd.sh +login anonymous +force_install_dir \/home\/tf2\/server\/ +app_update 232250\r\n<\/code><\/pre>\n

After a few minutes, you can restart the server and clients will be able to connect again.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[105,233,242,247],"manual_kb_tag":[187],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2259"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2259"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2259\/revisions"}],"predecessor-version":[{"id":2260,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2259\/revisions\/2260"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2259"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2259"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}