It is not recommended anymore to use HLDSUpdateTool to set up and update your Counter Strike server, it will give you a deprecated version of the server since Valve has moved his games to SteamPipe.

I will explain in this short tutorial how to set up your Counter Strike server using the new Valve bootstrap: SteamCMD.

Step 1: Your server

I am making the assumption that you have a dedicated server (virtual or not), with shell and root access. If you don't have root access, I assume that you have at least shell access, possibility to open ports, and 32bit libraries installed.

Step 2: Prepare install

Follow this if you have root access, otherwise continue to step 3.

  • Install 32bit libraries:

    • For Debian/Ubuntu:
      dpkg --add-architecture i386 && apt-get install ia32-libs

    • For Fedora/RHEL/CentOS:
      yum install glibc.i686 libstdc++.i686

    • For Arch:
      Enable Multilib and then type:
      pacman -S lib32-gcc-libs

  • Make a new user and "su" it:
    adduser --disabled-login steam
    su steam
    cd /home/steam

  • You should NEVER run a server with root user, every time you want tot start your server, do a "su steam" or log in with this user before. If you want to log in with the steam user, remove the --disabled-login from command line when creating it.

Step 4: Download and install SteamCMD

  • Create a new directory and use it as your current directory:
    mkdir steamcmd && cd steamcmd
  • Get the SteamCMD binary:
    wget http://media.steampowered.com/client/steamcmd_linux.tar.gz

  • Extract the tarball:
    tar -xzf steamcmd_linux.tar.gz
  • Run the steamcmd binary, it will update:
    ./steamcmd.sh

Step 5: Download the Counter Strike server

The command line will force the installation directory in a separate directory. It prevents messing with SteamCMD directories when you configure and start the game server.

For Counter Strike Source:
./steamcmd.sh +login anonymous +force_install_dir ../css_server/ +app_update 232330 validate +quit

For Counter Strike Condition Zero:
./steamcmd.sh +login anonymous +force_install_dir ../cscz_server/ +app_update 90 +app_set_config 90 mod czero validate +quit

For Counter Strike Global Offensive:
./steamcmd.sh +login anonymous +force_install_dir ../csgo_server/ +app_update 740 validate +quit

Of course, you can change the name of the installation directory. Just don't forget the ../ before the folder name to install it in the upper directory, otherwise you will mess your SteamCMD installation with game files.

Use the same command to update your server when needed.

Step 6: Configure your server

I can't learn you anything here: just place your server.cfg, mods, and maps accordingly in the installation folder.

Step 7: Start your server

  • Get back to the steam user home directory
    cd /home/steam

  • Start the server:

    • For Counter Strike Source:
      ./css_server/srcds_run -steam_dir steamcmd/ -steamcmd_script steamcmd/steamcmd.sh -console -game cstrike +map de_dust2 -maxplayers 20

    • For Counter Strike Condition Zero:
      ./cscz_server/srcds_run -steam_dir steamcmd/ -steamcmd_script steamcmd/steamcmd.sh -console -game czero +map de_aztec -maxplayers 20

    • For Counter Strike Global Offensive:
      ./css_server/srcds_run -steam_dir steamcmd/ -steamcmd_script steamcmd/steamcmd.sh -console -game csgo -usercon +game_type 0 +game_mode 0 +mapgroup mg_bomb +map de_dust

      See Valve documentation for other game modes.

Please adapt the command line if you changed the name of installation directory.

Step 8: Enjoy !

Again, nothing much to say, just enter your server IP address in the game.

Just one more thing: if you didn't had root access during the installation, you may have to forward ("open") ports to let your server be accessible by anyone.