Installing HLDS (Counterstrike 1.6) with Metamod and AMX Mod X on CentOS 7 with systemctl script

This guide will install a Counterstrike 1.6 (yes, 1.6) server on CentOS 7 using SteamCMD. We will include the Metamod and AMX Mod X add-ons to simplify in-game administration.

A systemctl script will be installed to to manage the server state (start/stop/restart) and configured to launch the HLDS server at boot, and automatically restart on failure.

Let’s get started…

Install the 32-bit dependencies required by HLDS:

Open up the required firewall ports:

Create a new user account and switch to it:

Install SteamCMD:

Once SteamCMD has finished loading you will be given a steam prompt. Use this terminal to install Counterstrike:

Note: you will likely need to run app_update 90 validate several times until it tells you the installation was completed successfully.

Configure the server:

Modify server.cfg to your own preference. The above config is for a simple public server.

Install Metamod (required by AMX Mod X):

Install AMX Mod X:

That’s the server configured. Log out back to your normal user account:

Next we’ll create a systemctl script to manage the server state and configure it to launch HLDS at system boot.

Create the hlds.service script:

Reload systemctl to detect the new unit file:

Configure HLDS to launch at system boot:

All done! Let’s fire up the server now…

You will now need to tweak AMX Mod X to your liking. You’ll probably want to start by adding your Steam ID as an admin in /home/hlds/server/cstrike/addons/amxmodx/configs/users.ini.

See the AMX Mod X documentation for more details.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *