Dedicated Linux server: Difference between revisions
From TF2 Classified Wiki
More actions
Add troubleshooting about CPU usage with service file workaround |
No edit summary |
||
| (9 intermediate revisions by the same user not shown) | |||
| Line 240: | Line 240: | ||
You can enable this by adding <code>sv_use_steam_networking 1</code> to <code>classified/tf2classified/cfg/default.cfg</code>. | You can enable this by adding <code>sv_use_steam_networking 1</code> to <code>classified/tf2classified/cfg/default.cfg</code>. | ||
If you want your server to appear on the server browser with SDR enabled you will need to supply a GLST token. You can acquire a key by going to [https://steamcommunity.com/dev/managegameservers this page]. Once you've got it, put <code>sv_setsteamaccount $KEY</code> in your configuration, replacing $KEY with the token from the page. | If you want your server to appear on the server browser with SDR enabled you will need to supply a GLST token. You can acquire a key by going to [https://steamcommunity.com/dev/managegameservers this page]. Once you've got it, put <code>sv_setsteamaccount $KEY</code> in your configuration, replacing $KEY with the token from the page. | ||
=== Installing SourceMod === | |||
SourceMod is a server modding platform that provides admin tools, permissions, and plugin support. Installing it is strongly recommended if you plan to run a publicly-facing server. | |||
You'll need to install the '''a development version''' of SourceMod, as well as MetaMod which SourceMod depends on to work. '''It will not work with stable releases currently'''. As of writing this article, the latest known working development build is 7301 and 1389 respectively. | |||
<pre> | |||
$ cd ~ | |||
$ wget https://mms.alliedmods.net/mmsdrop/2.0/mmsource-2.0.0-git1389-linux.tar.gz -O /tmp/mm.tar.gz | |||
$ wget https://sm.alliedmods.net/smdrop/1.13/sourcemod-1.13.0-git7301-linux.tar.gz -O /tmp/sm.tar.gz | |||
$ tar -xf /tmp/mm.tar.gz | |||
$ tar -xf /tmp/sm.tar.gz | |||
$ mv addons ~/classified/tf2classified | |||
$ mv cfg/sourcemod ~/classified/tf2classified/cfg | |||
$ rm -r cfg | |||
$ rm /tmp/mm.tar.gz | |||
$ rm /tmp/sm.tar.gz | |||
</pre> | |||
Once the server starts it should work. A good way to test if everything is running properly is to use the <code>!motd</code> command in chat. If the MOTD pops up after the command that means SourceMod is working. For further information on setting up SourceMod, read [https://wiki.alliedmods.net/Category:SourceMod_Documentation the documentation]. | |||
Existing SourceMod plugins are not guaranteed to work and may require special steps or patching to get working. | |||
==== Installing the patched TF2 Tools extension ==== | |||
Many plugins depend on the built-in TF2 Tools extension that comes with Sourcemod. This isn't compatible with TF2C. Instead, we can use a patched version of the extension which enables the use of many plugins. | |||
There's currently no public download link for this extension. After joining the Team Fortress 2 Classified Discord server you can find the files you need in [https://discordapp.com/channels/196337717267791874/1011914229307166780/1467172013637636327 this message]. Specifically, you need <code>game.tf2.ext.2.tf2.so</code> and <code>sm-tf2.games.txt</code>. | |||
First, we'll need to disable automatic game data updating to prevent our gamedata file from being removed. | |||
<pre> | |||
$ nano ~/classified/tf2classified/addons/sourcemod/configs/core.cfg | |||
</pre> | |||
Replace <code>"no"</code> in this part of the file with <code>"yes"</code> | |||
<pre> | |||
/** | |||
* Enables or Disables SourceMod's automatic gamedata updating. | |||
* | |||
* The default value is "no". A value of "yes" will block the Auto Updater. | |||
*/ | |||
"DisableAutoUpdate" "no" // Change to "yes" | |||
</pre> | |||
Next we'll add both the gamedata file and the plugin to our installation. | |||
<pre> | |||
$ mv $WHEREVER_YOU_PUT_IT/sm-tf2.games.txt ~/classified/tf2classified/addons/gamedata/sm-tf2.games.txt | |||
$ mv $WHEREVER_YOU_PUT_IT/game.tf2.ext.2.tf2.so ~/classified/tf2classified/addons/extensions/x64 | |||
</pre> | |||
Finally, create an empty file so that the extension is automatically loaded. | |||
<pre> | |||
$ touch ~/classified/tf2classified/addons/sourcemod/extensions/game.tf2.autoload | |||
</pre> | |||
== Troubleshooting == | == Troubleshooting == | ||