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

User:Webb/New linux server: Difference between revisions

From TF2 Classified Wiki
Webb (talk | contribs)
No edit summary
Webb (talk | contribs)
No edit summary
Line 22: Line 22:
Some commands are listed in-line with the rest of a paragraph and lack this symbol, in which case you should run the command as whichever account you're currently logged in with.
Some commands are listed in-line with the rest of a paragraph and lack this symbol, in which case you should run the command as whichever account you're currently logged in with.


=== Creating a user for SteamCMD and Source SDK Base 2013 Dedicated Server ===
=== Creating a user for the server ===


Pick a directory to install your server into. Many put it under a directory in <code>/opt</code>, but for this guide we'll be using <code>/home/srcds</code>.
Pick a directory to install your server into. Many put it under a directory in <code>/opt</code>, but for this guide we'll be using <code>/home/srcds</code>.
Line 34: Line 34:
<code>-m</code> creates a home directory for the new user, <code>-r</code> specifies that it's a system account that will not have a password, and <code>-s /bin/false</code> prevents the account from having a default shell.  
<code>-m</code> creates a home directory for the new user, <code>-r</code> specifies that it's a system account that will not have a password, and <code>-s /bin/false</code> prevents the account from having a default shell.  


=== Installing Source SDK Base 2013 Dedicated Server (srcds), SteamCMD, and dependencies ===
=== Installing Source SDK Base 2013 Dedicated Server (<code>srcds</code>), SteamCMD, and dependencies ===


The SteamCMD package is in the multiverse repos. TF2Classic and SteamCMD require i386 (32-bit) libraries to function. You also need 7-Zip to extract TF2Classic.
The SteamCMD package is in the multiverse repos. TF2Classic and SteamCMD require i386 (32-bit) libraries to function. You also need 7-Zip to extract TF2Classic.
Line 67: Line 67:
</pre>
</pre>


You should be dropped into a SteamCMD shell. We can install the SDK now. Note that force_install_dir must be ran before login anonymous.
You should be dropped into a SteamCMD shell. We can install the SDK now. Note that <code>force_install_dir</code> must be ran before <code>login anonymous</code>.


<pre>
<pre>
Line 76: Line 76:
</pre>
</pre>


If everything went well, srcds itself should be installed and you should be back at your user shell.
If everything went well, <code>srcds</code> should be installed and you should be back at your user shell.


== Downloading TF2 Classic ==
== Installing TF2C ==


We'll be downloading the archived verison of TF2C. You can also use the TF2CDownloader if you wish.
We'll be downloading the archived verison of TF2C. You also have the option of using TF2CDownloader.


<pre>
<pre>
Line 127: Line 127:
</pre>
</pre>


=== Testing the server ===
== Testing the server ==


Before proceeding, we can test the server to make sure the install runs.
Before proceeding, we can test the server to make sure the install runs and that.


<pre>
<pre>
Line 138: Line 138:
If all goes well, it should start.
If all goes well, it should start.


=== Server Configuration ===
== Server Configuration ==


Generate your server config(s) on [https://cfg.tf/ cfg.tf].
Generate your server config(s) on [https://cfg.tf/ cfg.tf].
Line 221: Line 221:
</pre>
</pre>


Then, enable the service to start with the init system:
Then, enable the service to start with Systemd.


<pre>
<pre>
# systemctl enable tf2classic.service
# systemctl enable tf2c.service
</pre>
</pre>


Line 232: Line 232:


<pre>
<pre>
0 4 * * * systemctl restart tf2classic.service
0 4 * * * systemctl restart tf2c.service
</pre>
</pre>