Installing ReHLDS, ReGameDLL_CS and Metamod-R on Counter-Strike 1.6

32/64 bit Debian/Ubuntu Linux procedure

As Half-Life and the Counter-Strike 1.6 engine and DLL's are old as hell, some blokes took the effort rewriting those to new standards 
full with fixes and better performance.

It is called ReHLDS.

These are optional, you do not have to do this for running a Counter-Strike 1.6 server but it is recommended to do so. 
When using 20+ year old software you should be aware of the security risks that might lead to it.

Again, this is optional. If you are really concerned with security (which you probably should in the year 2026) then follow these steps.

Download the needed files from the original websites or use the direct links I have provided below:

ReHLDS
ReGameDLL_CS
Metamod-R

If the Counter-Strike process is running then first kill it. When the Counter-Strike process isn't running then proceed to step 5.

1.  SSH to the server
2.  screen -r
3.  quit
4.  CTRL + c

5. cd ~/
6. mkdir rehlds
7. cd rehlds

8. wget https://zeus.geforce.nl/~mb/files/games/rehlds-bin-3.15.0.896.zip
9. wget https://zeus.geforce.nl/~mb/files/games/metamod-bin-1.3.0.149.zip
10. wget https://zeus.geforce.nl/~mb/files/games/regamedll-bin-5.30.0.814.zip
11. for z in *.zip; do unzip "$z"; done

12. cd ~/cs16
13. mv engine_i486.so engine_i486.bak
14. cp ~/rehlds/bin/linux32/engine_i486.so .
15. chmod 775 engine_i486.so

16. cd cstrike/addons/metamod/dlls
17. mv metamod_i386.so metamod_i386.bak (or could also be 'metamod.so' depending on the version you use)
18. cp ~/rehlds/addons/metamod/metamod_i386.so .
19. chmod 775 metamod_i386.so

20. cd ~/cs16/cstrike/dlls
21. mv cs.so cs.bak
22. cp ~/rehlds/bin/linux32/cstrike/dlls/cs.so .
23. chmod 775 cs.so

As you can see in the above lines, we're gonna rename the original binaries and libraries so in case of things go south we can allways 
switch back to the original files.

24. cd ..
25. cp ~/rehlds/bin/linux32/cstrike/game_init.cfg .
26. chmod 775 game_init.cfg
27. vi liblist.gam

Check liblist.gam if the correct metamod library is defined in this line gamedll_linux "addons/metamod/dlls/metamod_i386.so"

That's it. The server is now equipped with ReHLDS, ReGameDLL_CS and Metamod-R. Time to start it all up and see if if runs.

28. cd ~/cs16/
29. ./hlds_run -game cstrike +ip 192.168.1.191 +port 27015 -pingboost 3 +sys_ticrate 1000 +fps_max 1000 +fps_modem 1000 +map de_dust +maxplayers 24

	- You can leave out '+ip 192.168.1.191 +port 27015' when using default or change them to your needs

30. After a few seconds and some stuff in your console you should see the following:

	Connection to Steam servers successful.
	VAC secure mode is activated.

31. The server is running, you can check this bij typing 'status', you should see the following:

        hostname:  My Counter-Strike 1.6 Server
        version :  48/1.1.2.7/Stdio 4419 secure  (10)
        tcp/ip  :  192.168.1.191:27015
        map     :  de_dust at: 0 x, 0 y, 0 z
        players :  0 active (24 max)

        #      name userid uniqueid frag time ping loss adr
        0 users

32. CTRL a + d (detached)
33. What are you waiting for? Game on!