This tutorial is about setting up Counter Strike 1.6 Server on CentOS which is a flavor of Linux Operating System.
Most people stay away from Linux because it is much more complicated as compared to Windows.
I myself prefer Linux Operating System because of its security and stability and that’s the reason I am writing this tutorial today.
Requirements
Most people stay away from Linux because it is much more complicated as compared to Windows.
I myself prefer Linux Operating System because of its security and stability and that’s the reason I am writing this tutorial today.
Requirements
- CentOS
You can setup Counter-Strike 1.6 Server on your home computer or on a VPS (Virtual Private Server).
If Linux is not your primary OS, you can install Linux on a VM (Virtual Machine).
Simply download and install VirtualBox and CentOS ISO files and your VM will be ready.
However in this tutorial I assume you already have CentOS Server ready with root privileges.
You can skip the next steps of requirements if you want to setup on VPS.
Requirements
Installation Steps
Simply download and install VirtualBox and CentOS ISO files and your VM will be ready.
However in this tutorial I assume you already have CentOS Server ready with root privileges.
You can skip the next steps of requirements if you want to setup on VPS.
Requirements
- Internet Connection
For Online Server, an Internet Connection is required.
This tutorial is for home computers running on DSL Connection or WiMAX connection.
For 16 slots server, a 1Mb internet connection is sufficient.
For best performance, a 4Mb internet connection is preferred which can support upto 32 players. - Static IP
The Public IP address of DSL connections is Dynamic.
Which means on every restart of router the Public IP is changed.
To make the IP static you have to request your DSL provider to provide you a Static IP address.
PTCL users can get Static IP easily for a monthly charge of 200 300 rupees.
Call 1218 from your PTCL number to get a Static IP on your DSL connection. - UPS
To make your server 24/7 your computer must stay on all the times.
For that you will need a UPS that will provide backup in case of power outages.
Installation Steps
- Download PuTTY
If you are using Windows, you will need an SSH Client like PuTTY that lets you connect with your VPS.
Download PuTTY
- Login to VPS
Enter your VPS IP address in Host Name field and press enter.
A black console window will open asking for the username.
Enter your username (which should be root) and press enter.
Now it will ask for your password like below:
A black console window will open asking for the username.
Enter your username (which should be root) and press enter.
Now it will ask for your password like below:
Enter your password and press enter.
Note that your password will not be shown as you type it so don’t get confused.
Once you have logged in, you will see something like below:
Note that your password will not be shown as you type it so don’t get confused.
Once you have logged in, you will see something like below:
- Server Installation
useradd -d /home/hlds -s /bin/false hlds
cd /home/hlds
wget http://cdn01.counterstrike.com.pk/web/files/hlds4linux_cspak.zip
unzip hlds4linux_cspak.zip
cd hlds4linux_cspak
chown -R hlds:hlds /home/hlds
chmod +x ./hlds_run
chmod +x ./hlds_i486
chmod +x ./hlds_i686
screen -A -m -d -S hlds su -c "./hlds_run -game cstrike +ip 0.0.0.0 +port 27015 +maxplayers 32 +map de_dust2_long_short +sys_ticrate 1000" hlds -s /bin/sh
After you have executed all the commands without getting any errors, the Counter Strike 1.6 Server should be started successfully in background.
- Start Counter Strike 1.6 Server on Startup
Counter Strike 1.6 Server does not automatically starts when your VPS is restarted.
To start the server automatically on startup, execute the following commands:
echo screen -A -m -d -S hlds su -c "./hlds_run -game cstrike +ip 0.0.0.0 +port 27015 +maxplayers 32 +map de_dust2_long_short +sys_ticrate 1000" hlds -s /bin/sh >> /etc/rc.local
Now the Counter Strike 1.6 server will automatically startup after crash or reboot.Testing
- Port Forwading
In simple words, all the people connecting to your Router on port 27015 will be forwarded to the port 27015 of your Computer
- Testing
Send your Public IP to your friend and ask him to join your server.
To find your Public IP, visit this link : www.whatismyip.com , decent-chamuliservers.weebly.com/my-ip
Now you have created an Online Server which means people from all around the world can join your server.
Having problems? Just comment below and we will find you a solution!
Feel Free To Say