Dedicated legacy Linux server extras: Difference between revisions
From TF2 Classified Wiki
More actions
No edit summary |
No edit summary |
||
| Line 15: | Line 15: | ||
=== 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 | 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. | |||
<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> | |||
''<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>'' | |||
<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 URL of | |||
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> | <code><nowiki>$ wget https://mms.alliedmods.net/mmsdrop/1.11/mmsource-1.11.0-git1148-linux.tar.gz</nowiki></code><br> | ||
''<small>This link may be outdated as well. You can check metamod:source downloads page for the newest version.</small>'' | |||
<code> | 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 mmsource-1.11.0-git1148-linux.tar.gz</code> | <code><nowiki>$</nowiki> tar -xf mmsource-1.11.0-git1148-linux.tar.gz</code> | ||
You can delete the archive files after the extracted files are in correct place. | You can delete the archive files after the extracted files are in correct place. | ||
<code><nowiki>$</nowiki> rem sourcemod-1.11.0-git6917-linux.tar.gz</code> | <code><nowiki>$</nowiki> rem sourcemod-1.11.0-git6917-linux.tar.gz</code><br> | ||
<code><nowiki>$</nowiki> rem mmsource-1.11.0-git1148-linux.tar.gz</code> | <code><nowiki>$</nowiki> rem mmsource-1.11.0-git1148-linux.tar.gz</code> | ||
=== Replacing <code>metamod.vdf</code> === | === Replacing <code>metamod.vdf</code> === | ||
<code>metamod.vdf</code> is necessary for your server to recognize the game. Since this is a mod, we need to use a web tool to generate a metamod.vdf file | Correct <code>metamod.vdf</code> is necessary for your server to recognize the game. Since this is a third party mod, we need to use a web tool to generate a custom metamod.vdf file that points to <code>tf2classic</code>, or create one manually ourselves. | ||
You should navigate to your <code> | You should navigate to your <code>../server/tf2classic/addons/</code>, following Dedicated Server setup guide's example, we should navigate to: <code>/opt/tf2classic/server/tf2classic/addons/</code> | ||
You can now delete <code>metamod.vdf</code> and <code>metamod_x64.vdf</code> in this directory. No need to back up these or anything. | You can now delete <code>metamod.vdf</code> and <code>metamod_x64.vdf</code> in this directory. No need to back up these or anything. | ||
<code><nowiki>$</nowiki> rem metamod.vdf</code><br> | |||
<code><nowiki>$</nowiki> rem metamod_x64.vdf</code> | |||
Head over to [https://www.sourcemm.net/vdf sourcemm.net/vdf]. | Head over to [https://www.sourcemm.net/vdf sourcemm.net/vdf]. | ||
You’re going to leave the “Game:” blank, or as “—”. In the “Game Folder” box, enter <code>tf2classic</code>. | You’re going to leave the “Game:” blank, or as “—”. In the “Game Folder” box, enter <code>tf2classic</code>. After downloading generated file with these variables, use SFTP to transfer it to your server's <code>../server/tf2classic/addons/</code> directory. | ||
If you | If you currently do not have SFTP available on your game server, you can alternatively do everything from Command Line/SSH. | ||
Make sure that you | Make sure that you are working in <code>../server/tf2classic/addons</code> directory. | ||
First create a <code>metamod.vdf</code> file in this directory with following command: | First create a <code>metamod.vdf</code> file in this directory with following command: | ||
| Line 61: | Line 59: | ||
<code><nowiki>$</nowiki> touch metamod.vdf</code> | <code><nowiki>$</nowiki> touch metamod.vdf</code> | ||
Followed by opening the file in your favorite command line editor, <code>nano</code> in this example: | Followed by opening the file in your favorite command line text editor, <code>nano</code> in this example: | ||
<code><nowiki>$</nowiki> nano metamod.vdf</code> | <code><nowiki>$</nowiki> nano metamod.vdf</code> | ||
And type in the following: | And type in the following to this blank file: | ||
<nowiki>"Plugin" | <nowiki>"Plugin" | ||
| Line 110: | Line 108: | ||
Save, exit and start/restart your server and everything should be running fine. You can make sure of this by typing <code>meta version</code> in your server console (or RCON). You should see a line like <code>"Loaded As: Valve Server Plugin."</code>. Additionally, if you assigned yourself as an administrator for the server, typing <code>!admin</code> or <code>/admin</code> in chat should bring up administrative menu on player hud. <code>sm_admin</code> should additionally work when typed in to your client console window, and you can use <code>sm_rcon</code> to use SourceMod to relay any console command to the server, if you set yourself up with <code>z</code> flag. | Save, exit and start/restart your server and everything should be running fine. You can make sure of this by typing <code>meta version</code> in your server console (or RCON). You should see a line like <code>"Loaded As: Valve Server Plugin."</code>. Additionally, if you assigned yourself as an administrator for the server, typing <code>!admin</code> or <code>/admin</code> in chat should bring up administrative menu on player hud. <code>sm_admin</code> should additionally work when typed in to your client console window, and you can use <code>sm_rcon</code> to use SourceMod to relay any console command to the server, if you set yourself up with <code>z</code> flag. | ||
Further tweaking of SourceMod to suit your needs is | 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] | ||