In this article i will show you how to install counter-strike 1.6 server in Ubuntu, CentOS and Debian. The 32-bit dependencies required for cs 1.6 server are different in Linuxย distribution rest server installation process is same for all Linux distribution.
How To Turn On Root Login in AWS Cloud (EC2, Lightsail): Coming Soon
To run server smoothly, I recommend following requirement for your Linux server:
Requirement For Counter-Strike Server:
- 1Gb Ram
- 1 vCPU
- 5 Gb Disk Space
Video Tutorial For Server Installation:
I will be using Digital Ocean cloud of 1Gb ram. It just cost 5$ per month for 1Gb ram cloud.
Steps For Installation:
1. Installing dependencies for your Linux distribution.
For CentOS Users:
yum install epel-release
yum install glibc.i686 libstdc++ libstdc++.i686 psmisc screen nano -y
For Ubuntu Users:
sudo dpkg --add-architecture i386
sudo apt update -y
sudo apt-get install libstdc++6 libstdc++6:i386 lib32gcc1 psmisc screen nano -y
For Debian Users:
sudo dpkg --add-architecture i386
sudo apt update -y
sudo apt-get install libstdc++6 libstdc++6:i386 lib32gcc1 psmisc screen nano -y
2. Download SteamCMD
cd /root
mkdir SteamCMD
mkdir csserver
cd SteamCMD
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
3. Unzip SteamCMD
tar xvfz steamcmd_linux.tar.gz
4. Install SteamCMD and Counter-Strike Server
./steamcmd.sh
login anonymous
force_install_dir /root/csserver/
app_set_config 90 mod cstrike
app_update 90 validate
app_update 90 validate
app_update 90 -beta beta validate
app_update 90 -beta beta validate
exit
5. Create Server Start Script
Create start.sh file for startup script.
cd /root
nano start.sh
Copy Startup command to start.sh file.
screen -X -S "csserver" quit;
screen -X -S "csserver" stuff "^C";
fuser -k 27015/udp;
cd /root/csserver/;
screen -A -m -d -S csserver ./hlds_run -game cstrike -secure +map de_dust2 +ip 0.0.0.0 +port 27015 +maxplayers 10 +sys_ticrate 1000 -pingboost 3 +exec server.cfg;
echo "==========Server has been booted=========="
save and exit the start.sh. To save and exit press ctrl+x and Y to save.
Give permission to script start.sh so that user can run the script.
chmod +x /root/start.sh
6. Allow server port to Linux Firewall:
It is necessary to turn on server port in Linux iptables firewall. If you do not open the port then you may not be able to connect your server.
iptables -I INPUT -p udp --dport 27015 -j ACCEPT
7. Start the server and enjoy xD
./start.sh
to open the console of the server type ‘screen -r’ and to exit from screen console press ctrl+a & ctrl+d. Do Not press ctrl+c to exit from console it will shutdown your screen.
3 comments
“the server accepts only legit clients”
any idea how to fix that
You have to add Dproto metamod to the server for accepting non steam players ๐
Hello,
i used Amazon aws launched instances and I followed this.
but after login into steam,
aftter
when i apply this command “force_install_dir /root/csserver/”
i get error message “Please use force_install_dir before logon!”
help!.