User:Webb/New linux server: Difference between revisions
From TF2 Classified Wiki
More actions
More work |
More WIP |
||
| Line 18: | Line 18: | ||
A command prefixed by <code>$</code> is meant to be run as a '''regular user''' without root permissions. In this case the <code>srcds</code> user. | A command prefixed by <code>$</code> is meant to be run as a '''regular user''' without root permissions. In this case the <code>srcds</code> user. | ||
A command prefixed by <code>Steam></code> is meant to be run inside of a SteamCMD shell. | |||
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. | ||
| Line 49: | Line 49: | ||
<pre> | <pre> | ||
# apt install dialog | # apt install dialog | ||
# apt install steamcmd p7zip aria2 tilde lib32z1 libbz2-1.0:i386 lib32gcc-s1 lib32stdc++6 libcurl3-gnutls:i386 libsdl2-2.0-0 | # apt install steamcmd p7zip aria2 tilde lib32z1 libbz2-1.0:i386 lib32gcc-s1 lib32stdc++6 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 wget | ||
</pre> | </pre> | ||
''<sup>*</sup>'''Note''':See [https://developer.valvesoftware.com/wiki/SteamCMD#Package_From_Repositories|Valve Developer Wiki SteamCMD Repository Packages] if your distro is having issues getting steamcmd. | ''<sup>*</sup>'''Note''':See [https://developer.valvesoftware.com/wiki/SteamCMD#Package_From_Repositories|Valve Developer Wiki SteamCMD Repository Packages] if your distro is having issues getting steamcmd. | ||
'' | '' | ||
If your version of Ubuntu doesn't come with a text editor, you may install one now. For this guide we'll use <code>nano</code>. | |||
<pre># apt install nano</pre> | |||
Switch to the srcds user you created: | |||
<pre> | <pre> | ||
| Line 88: | Line 92: | ||
=== Create symlinks to missing shared objects. === | === Create symlinks to missing shared objects. === | ||
Valve changed some shared object file names in the SDK and the objects we’re given have not adapted to the new names. Since these are simply renames, we can symlink them. | Valve changed some shared object file names in the SDK and the objects we’re given have not adapted to the new names. Since these are simply renames, we can symlink them. | ||
'''Your server will not start without doing this.''' | '''Your server will not start without doing this.''' | ||
| Line 167: | Line 172: | ||
</pre> | </pre> | ||
Fill the file the following contents: | |||
<pre> | <pre> | ||
| Line 205: | Line 210: | ||
ExecStartPre=/usr/games/steamcmd +runscript /home/srcds/bin/update-sdk.steamcmd # Exclude or comment this if you don't want to check for an update on each restart | ExecStartPre=/usr/games/steamcmd +runscript /home/srcds/bin/update-sdk.steamcmd # Exclude or comment this if you don't want to check for an update on each restart | ||
Environment="LD_LIBRARY_PATH=".:bin:$LD_LIBRARY_PATH"" | Environment="LD_LIBRARY_PATH=".:bin:$LD_LIBRARY_PATH"" | ||
ExecStart=/usr/bin/script -e -c "/home/srcds/sdk/srcds_linux +map ctf_2fort -game tf2classic | ExecStart=/usr/bin/script -e -c "/home/srcds/sdk/srcds_linux +map ctf_2fort -game tf2classic +maxplayers 24" /dev/null | ||
TimeoutStartSec=infinity | TimeoutStartSec=infinity | ||
Restart=always | Restart=always | ||
| Line 217: | Line 222: | ||
Then, enable the service to start with the init system: | Then, enable the service to start with the init system: | ||
<pre> | <pre> | ||
# systemctl enable tf2classic.service | # systemctl enable tf2classic.service | ||
| Line 236: | Line 242: | ||
<pre> | <pre> | ||
# systemctl restart | # systemctl restart tf2c # in case you need to restart manually or to grab updates!! | ||
# systemctl stop | # systemctl stop tf2c # in case you need to stop the server manually | ||
# systemctl start | # systemctl start tf2c # in case you need to start the server manually | ||
# systemctl disable | # systemctl disable tf2c # in case you need to stop the server from booting as your system initializes | ||
# systemctl enable | # systemctl enable tf2c # in case you need to start the server to boot as your system initializes | ||
</pre> | </pre> | ||
''</br>See also [[Dedicated_Linux_server_extras|Dedicated Linux Server Extras]].'' | ''</br>See also [[Dedicated_Linux_server_extras|Dedicated Linux Server Extras]].'' | ||
[[Category:Guides]] | [[Category:Guides]] | ||