Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Dedicated legacy Linux server extras: Difference between revisions

From TF2 Classified Wiki
Sumea (talk | contribs)
No edit summary
Webb (talk | contribs)
Ditto
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Ambox|contents=This article is based on a guide written by Raizo, the original of which can be found [https://blog.raizo.dev/posts/tf2-classic-linux-server-tutorial/ here].}}
{{Ambox|contents=This guide is written for the old ''Team Fortress 2 Classic'' non-Steam builds. This guide will not work for the modern ''Team Fortress 2 Classified'' Steam builds as it requires special steps.}}


== TF2 Classic SourceMod+Metamod Setup ==
== SourceMod+Metamod setup ==
<small>''Note: This guide was adapted and revised from a guide written by Raizo, the original of which can be found here: https://iraizo.github.io/tf2-classic-sourcemod-setup/''</small>


SourceMod+Metamod is powerful administrator tool for dedicated server owners and operators. SourceMod lets you add administrators easily based on SteamID, control and authenticate to the server securely and even add additional functionality to everyone on server like extended map voting functionality.
SourceMod+Metamod is powerful administrator tool for dedicated server owners and operators. SourceMod lets you add administrators easily based on SteamID, control and authenticate to the server securely and even add additional functionality to everyone on server like extended map voting functionality.
Line 12: Line 13:
This guide assumes you already have a dedicated Linux server installed that can run without issues. If not you should follow [[Dedicated Linux server|this guide]] to setup your server first.
This guide assumes you already have a dedicated Linux server installed that can run without issues. If not you should follow [[Dedicated Linux server|this guide]] to setup your server first.


This guide will use the same example install path as the main setup guide, so feel free to follow this guide directly if you use the same directory too <code>/opt/tf2classic/server/</code>, sometimes just <code>../server/</code>. Otherwise remember to use your own path instead.
This guide will use a <code>/opt/</code>-based installation, so feel free to follow this guide directly if you use the same directory too. We'll refer to it as <code>/opt/tf2classic/server/</code>, sometimes just <code>../server/</code>. Otherwise remember to use your own path instead.


=== Getting SourceMod and MetaMod ===
=== Getting SourceMod and MetaMod ===
Visit the Stable builds section of [https://www.sourcemod.net/downloads.php?branch=stable sourcemod.net] and grab the latest Linux build and upload it to your server using SFTP. If you do not have SFTP on your server, download it to your server using wget or similar tool.
Visit the Stable builds section of [https://www.sourcemod.net/downloads.php?branch=stable sourcemod.net] and grab the latest Linux build and upload it to your server using SFTP. If you do not have SFTP on your server, download it to your server using wget or similar tool.


Using Terminal or SSH instead of SFTP, first navigate to your server tf2classic folder, following example location from [[Dedicated Linux server|Dedicated Server Setup Guide]], you would navigate to <code>/opt/tf2classic/server/tf2classic/</code> first.
Using Terminal or SSH instead of SFTP, first navigate to your server tf2classic folder. We'll navigate to <code>/opt/tf2classic/server/tf2classic/</code> first.
<br>Then you can run wget to download SourceMod archive to your current directory:
<br>Then you can run wget to download SourceMod archive to your current directory:


<code><nowiki>$ wget https://sm.alliedmods.net/smdrop/1.11/sourcemod-1.11.0-git6917-linux.tar.gz</nowiki></code><br>
<code><nowiki>$ wget https://sm.alliedmods.net/smdrop/1.11/sourcemod-1.11.0-git6917-linux.tar.gz</nowiki></code>
''<small>This link may be outdated. You can check sourcemod downloads page for the newest version and copy the URL of newest build from there.</small>''


You’ll also need stable [https://www.sourcemm.net/downloads.php?branch=stable Metamod:Source]. Download it with one of the ways you did.
You’ll also need stable [https://www.sourcemm.net/downloads.php?branch=stable Metamod:Source]. Download it with one of the ways you did.


<code><nowiki>$ wget https://mms.alliedmods.net/mmsdrop/1.11/mmsource-1.11.0-git1148-linux.tar.gz</nowiki></code><br>
<code><nowiki>$ wget https://mms.alliedmods.net/mmsdrop/1.11/mmsource-1.11.0-git1148-linux.tar.gz</nowiki></code>
''<small>This link may be outdated as well. You can check metamod:source downloads page for the newest version's URL.</small>''


you can now extract both inside your <code>tf2classic</code> folder:
''These links in wget examples may be outdated. You can check both SourceMod & metamod:source downloads page for the newest version and replace any outdated URL's from there.''
 
You can now extract both inside your <code>tf2classic</code> folder:


<code><nowiki>$</nowiki> tar -xf sourcemod-1.11.0-git6917-linux.tar.gz</code><br>
<code><nowiki>$</nowiki> tar -xf sourcemod-1.11.0-git6917-linux.tar.gz</code><br>
Line 78: Line 79:
If you are working with Ubuntu Server, you might have <code>git</code> installed. Try first the following command:
If you are working with Ubuntu Server, you might have <code>git</code> installed. Try first the following command:


<code><nowiki>$</nowiki> git clone <nowiki>https://github.com/Scags/TF2Classic-Tools.git</nowiki></code>
<code><nowiki>$</nowiki> git clone <nowiki>https://github.com/tf2classic/SM-TF2Classic-Tools.git</nowiki></code>


If you do not have <code>git</code>, download the repo with wget directly:
If you do not have <code>git</code>, download the repo with wget directly:


<code><nowiki>$</nowiki> <nowiki>wget https://github.com/Scags/TF2Classic-Tools/archive/master.zip</nowiki></code>
<code><nowiki>$</nowiki> <nowiki>wget https://github.com/tf2classic/SM-TF2Classic-Tools/archive/master.zip</nowiki></code>


Then unzip it:
Then unzip it:
Line 88: Line 89:
<code><nowiki>$</nowiki> unzip master.zip</code>
<code><nowiki>$</nowiki> unzip master.zip</code>


<code>cd</code> into the directory, being either <code>TF2Classic-Tools</code> or <code>TF2Classic-Tools-master</code> depending on how you downloaded it.
<code>cd</code> into the directory, being either <code>SM-TF2Classic-Tools</code> or <code>SM-TF2Classic-Tools-master</code> depending on how you downloaded it.
<br>Run the following command to copy <code>sourcemod</code> directory to your server's <code>addons</code> folder:
<br>Run the following command to copy <code>sourcemod</code> directory to your server's <code>addons</code> folder:


<code><nowiki>$</nowiki> cp -r sourcemod/ ../addons/</code>
<code><nowiki>$</nowiki> cp -r sourcemod/ ../addons/</code>
Then, we need to stop sourcemod from auto-updating its gamedata. Locate the sourcemod <code>core.cfg</code> config file (located in <code>addons/configs</code>) and change:
<code>"DisableAutoUpdate" "no"</code>
to
<code>"DisableAutoUpdate" "yes"</code>


Now we have the necessary gamedata for plugins and core SM and MM functions to work with TF2C.
Now we have the necessary gamedata for plugins and core SM and MM functions to work with TF2C.
Line 110: Line 119:
Further tweaking of SourceMod to suit your needs is out of scope for this guide. You can get familiar with SourceMod's other functions and configuration in their wiki: [https://wiki.alliedmods.net/Category:SourceMod_Documentation wiki.alliedmods.net/Category:SourceMod_Documentation]
Further tweaking of SourceMod to suit your needs is out of scope for this guide. You can get familiar with SourceMod's other functions and configuration in their wiki: [https://wiki.alliedmods.net/Category:SourceMod_Documentation wiki.alliedmods.net/Category:SourceMod_Documentation]


Additionally, if you have setup RCON on your server before setting up SourceMod, you should disable it by wiping <code>RCON_PASSWORD</code> empty in <code>server.cfg</code>. After it is working, using SourceMod and <code>sm_rcon</code> for RCON commands is more secure for publicly hosted servers.
Additionally, if you have setup RCON on your server before setting up SourceMod, you should disable it by wiping <code>rcon_password ""</code> empty in <code>server.cfg</code>. After it is working, using SourceMod and <code>sm_rcon</code> for RCON commands is more secure for publicly hosted servers.
 
[[Category:Guides]]