cs2 Server mit LinuxGSM

    • Offizieller Beitrag

    Ubuntu 64-bit

    Ubuntu =< 20.04

    Ubuntu Icon

    Code

    Code
    sudo dpkg --add-architecture i386; sudo apt update; sudo apt install curl wget file tar bzip2 gzip unzip bsdmainutils python3 util-linux ca-certificates binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 libsdl2-2.0-0:i386 steamcmd

    Ubuntu => 20.10

    Ubuntu Icon

    Code

    Code
    sudo dpkg --add-architecture i386; sudo apt update; sudo apt install curl wget file tar bzip2 gzip unzip bsdmainutils python3 util-linux ca-certificates binutils bc jq tmux netcat lib32gcc-s1 lib32stdc++6 libsdl2-2.0-0:i386 steamcmd

    Als root user

    ./cs2server install

    und dann den User anlegen

    Fom Terminal aus.

    1. Einen user login erstellen mit.

    Code

    Code
    adduser cs2server
    Zitat

    Zitat

    Ein sicheres Passwort geben:

    Code

    Code
    su - cs2server

    2. Download linuxgsm.sh.

    Code

    Code
    wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh cs2server

    3. Erstelle einen Steam Login.

    Code

    Code
    Sie müssen einen Steam-Benutzernamen und ein Passwort eingeben, um den dedizierten Server herunterzuladen.
    Zitat

    Zitat

    Wir emfehlen hier create a new Steam username Für den Server.

    common.cfg Editieren entweder mit dem Terminal oder von Hand mit root rechten

    Code

    Code
    nano lgsm/config-lgsm/cs2server/common.cfg

    Code

    Code
    steamuser="username"
    steampass='password'

    4. Führen Sie das Installationsprogramm gemäß den Anweisungen auf dem Bildschirm aus.

    Code

    Code
    ./cs2server install

    ab hier die Befehls Übersicht

    All Commands

    A complete list of commands can be found by typing.

    Code

    Code
    ./cs2server

    Below are the most common commands available.

    Running

    start

    Code

    Code
    ./cs2server start

    stop

    Code

    Code
    ./cs2server stop

    restart

    Code

    Code
    ./cs2server restart

    console

    Console allows you to view the live console of a server as it is running and allow you to enter commands; if supported.

    Code

    Code
    ./cs2server console
    Zitat

    Zitat

    To exit the console press CTRL+b d. Pressing CTRL+c will terminate the server.

    Updating

    update

    Update checks for any server updates and applies them. The server will update and restart only if required.

    Code

    Code
    ./cs2server update

    Bypass the check and go straight to SteamCMD update.

    Code

    Code
    ./cs2server force-update

    validate

    You can use the SteamCMD validate option when updating the server.

    Code

    Code
    ./cs2server validate

    Debugging

    Details

    You can get all important and useful details about the server such as passwords, ports, config files etc.

    Code

    Code
    ./cs2server details

    Debug

    Use debug mode to help you if you are having issues with the server. Debug allows you to see the output of the server directly to your terminal allowing you to diagnose any problems the server might be having.

    Code

    Code
    ./cs2server debug

    Logs

    Server logs are available to monitor and diagnose your server. Script, console and game server (if available) logs are created for the server.

    Code

    Code
    /home/cs2server/logs

    Backup

    Backup will allow you to create a complete tar bzip2 archive of the whole server.

    Code

    Code
    ./cs2server backup

    Monitor

    LinuxGSM can monitor the game server by checking that the proccess is running and querying it. Should the server go offline LinuxGSM can restart the server and send you an alert. You can use cronjobs to setup monitoring.

    Code

    Code
    ./cs2server monitor

    Configure LinuxGSM

    For details on how to alter LinuxGSM settings visit LinuxGSM Config Files page.

    Documentation

    For detailed documentation visit the LinuxGSM docs.

    Cronjobs

    To automate LinuxGSM you can set scheduled tasks using cronjobs, to run any command at any given time. You can edit the crontab using the following.

    Code

    Code
    crontab -e

    Below are the recommended cron tasks.

    Code

    Code
    */5 * * * * /home/cs2server/cs2server monitor > /dev/null 2>&1
    */30 * * * * /home/cs2server/cs2server update > /dev/null 2>&1
    0 0 * * 0 /home/cs2server/cs2server update-lgsm > /dev/null 2>&1

    Ende

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!