How to install a Counter Strike server under E-Smith 5.0 (HowTo Final Release !)

Author: Pierrick Brossin<>

What is Counter-Strike ?
Counter-Strike is a modification (MOD) to the excellent game, Half-Life. It modifies the multiplayer aspects of Half-Life to bring to it a more team-oriented gameplay. Counter-Strike provides the player with an experience that a trained counter-terrorist unit or terrorist unit experiences.
The MOD is team-based featuring one team playing the role of the terrorist and the other team playing the role of the counter-terrorist. Each side has access to different guns and equipment, as well as different abilities. Maps have different goals such as: hostage rescue, assassination, bomb defusion, Terrorist escape, etc.

Some people asked me to do an Howto about this.
As I'm a big fan of Counter Strike I had to do this...

Basically, we are going to install :

  • Counter Strike server 1.3
  • Admin Mod 2.50.07 (and its "Database Enabled" add-on)
  • Punkbuster 0.956
  • phpMyAdmin 2.2.1-rc1
  • Screen to launch PB and CS

And then I'll show you how to go through the configuration part.

Warning: Do this at your OWN RISK !! I wont help you if you crash your system. Don't even try to send me any mails.
I will only answer mails with question about Counter-Strike, Admin Mod or PunkBuster.

Note: The installation is made through SSH

OK, the first step is to download those files in a directory on your e-smith box.
I advice you to download them from your server. It will prevent to move the files after downloading them

Note: Sorry for the HL server, I didnt find any other link...

Lets start the installation:

Info: Please note that i'm describing the way I installed it on my system. So if you think it's strange just do it as you want

[root@e-smith /root]# mkdir /tmp/cs

[root@e-smith /root]# cd /tmp/cs

[root@e-smith cs]# wget

[root@e-smith cs]# wget

[root@e-smith cs]# wget

[root@e-smith cs]# wget

[root@e-smith cs]# wget

[root@e-smith cs]# wget

[root@e-smith cs]# wget

[root@e-smith cs]# rpm -Uvh screen-3.9.8-3.i386.rpm

[root@e-smith cs]# tar -xzf halflifeserveurv3108.tar.gz

[root@e-smith cs]# tar -xzf cs_13_full.tar.gz

[root@e-smith cs]# mkdir pbsv

[root@e-smith cs]# cp pbsv956.tar.gz pbsv

[root@e-smith cs]# cd pbsv

[root@e-smith pbsv]# tar -xzf pbsv956.tar.gz

[root@e-smith pbsv]# rm pbsv956.tar.gz -f

[root@e-smith pbsv]# cd ..

[root@e-smith cs]# tar -xzf halflife-admin-2.50.07.tgz

[root@e-smith cs]# unzip -q

[root@e-smith cs]# tar -xzf phpMyAdmin-2.2.1-rc1-php.tar.gz

[root@e-smith cs]# mkdir sources

[root@e-smith cs]# mv *z* *.r* sources

[root@e-smith cs]# chown root * -R

[root@e-smith cs]# chgrp root * -R

[root@e-smith cs]# mkdir /games

[root@e-smith cs]# mkdir /games/half-life

Note: Some people told me to put it in /half-life but I think it's cleaner like that.

[root@e-smith cs]# mv hlds_l/* /games/half-life/

[root@e-smith cs]# rm hlds_l -Rf

[root@e-smith cs]# mv cstrike /games/half-life/

[root@e-smith cs]# mv pbsv /games/half-life/pb

[root@e-smith cs]# mv Admin /games/half-life/

[root@e-smith cs]# rm -f /games/half-life/Admin/dlls/

[root@e-smith cs]# cp AdminMySQL/ /games/half-life/Admin/dlls/

[root@e-smith cs]# rm AdminMySQL -Rf

[root@e-smith cs]# cd /games/half-life/Admin/

[root@e-smith Admin]# ./install_admin cstrike


Installation of Admin Mod for CStrike :

Adminmod Installation Script
Version 2.50.07

This script will install Adminmod version 2.50.07 on your
system. It will ask you for the directory that you installed
the Half-Life server in. To accept defaults just press Return.
After the binaries are installed you should read the docu-
mentation and configure Adminmod before you use it for the
first time.

Shall I proceed with the installation? (y/n) [y] Press ENTER

Please enter the directory where your HL server is installed,
or hit Return to accept the default.
[/games/half-life]: Press ENTER

Looks like you have cstrike installed in /games/half-life.
I can now install the Admin Mod files. Proceed? (y/n) [y] Press ENTER

Installing binaries and config files ...

Editing your liblist.gam file ...

The Adminmod files have now been installed. It looks like you
install this version of Adminmod for the first time. You will
have to edit your server.cfg file in the directory /games/half-life/cstrike.
I can now add the necessary lines to your server.cfg file.
Edit the file afterwards to configure it to your needs.

Shall I add the Adminmod lines to your server.cfg file? (y/n) [y] Press ENTER

Conratulations, Adminmod is now installed.
To configure it you should now edit your server.cfg file and create
users.ini, maps.ini, ips.ini, models.ini and wordlist files as needed.
Follow the instructions in the documentation and check for more infor-
mation at the Adminmod website


Note: You know something easier than this ?!

Lets continue the installation:

Info: OK we are now going to modify some stuff in MySQL so Admin Mod can work with it !

But we are going to work with phpMyAdmin for 2 reasons : it's easier to manager and easier to modify stuff !

Create an IBay with e-smith-manager. Name it phpmyadmin and protect it with password.

[root@e-smith Admin]# cd /tmp/cs/

[root@e-smith cs]# rm /home/e-smith/files/ibays/phpmyadmin/html/index.html -f

[root@e-smith cs]# mv phpMyAdmin-2.2.1-rc1/* /home/e-smith/files/ibays/phpmyadmin/html/

[root@e-smith cs]# rm phpMyAdmin-2.2.1-rc1 -Rf

[root@e-smith cs]# cd /home/e-smith/files/ibays/phpmyadmin/html

[root@e-smith html]# cat /root/.my.cnf

# DO NOT MODIFY THIS FILE! It is updated automatically by the
# e-smith server and gateway software. Instead, modify the source
# template in the /etc/e-smith/templates directory. For more
# information, see
# copyright (C) 1999-2001 e-smith, inc.



[root@e-smith html]# mcedit

Note: You are now in MCEDIT. You have to look for "$cfgServers[1]['password'] = 'PASSWORD1'; // MySQL password. PASSWORD1 is not written.
Right click with your mouse where
PASSWORD1 is so your password is gonna be written between the ' '.
Then save the file with F10 and "Yes"

The file is saved with the password !

phpMyAdmin is now accessible from => http://servername/phpmyadmin/

Launch your favorite browser (on a client) and type this url (the one which is above).
If this is your first use of MySQL you can delete the "test" database.
Create a database called "adminmod" and execute the following lines :

CREATE TABLE words ( word VARCHAR(30) );
CREATE TABLE plugins( plugin VARCHAR(30) );
INSERT INTO plugins VALUES ('dlls/plugin_base.amx');
INSERT INTO plugins VALUES ('dlls/plugin_chat.amx');
INSERT INTO plugins VALUES ('dlls/plugin_cheat.amx');
INSERT INTO plugins VALUES ('dlls/plugin_hldsld_mapvote.amx');
INSERT INTO plugins VALUES ('dlls/plugin_message.amx');
INSERT INTO plugins VALUES ('dlls/plugin_retribution.amx');
INSERT INTO plugins VALUES ('dlls/plugin_spawn.amx');
INSERT INTO plugins VALUES ('dlls/plugin_fun.amx');
INSERT INTO plugins VALUES ('dlls/plugin_CS.amx');
INSERT INTO plugins VALUES ('dlls/plugin_logtest.amx');

You can now close your browser and return to SSH.

[root@e-smith html]# cd /games/half-life/cstrike/

[root@e-smith cstrike]# mcedit server.cfg

Add those lines in this file :

// Admin Mode Cvars
mysql_host "localhost"
mysql_user "root"
mysql_pass "PASSWORD1"
mysql_dbtable_users "adminmod.users"
mysql_dbtable_models "adminmod.models"
mysql_dbtable_ips "adminmod.ips"
mysql_dbtable_words "adminmod.words"
mysql_dbtable_plugins "adminmod.plugins"

PASSWORD1 is the password you entered in the phpmyadmin config file
Admin Mod need this password to be able to access the tables !

By the way, configure the RCON Password which is needed by Punkbuster server !
So add this line in the server.cfg file :

rcon_password "PASSWORD2"

PASSWORD2 is a password you can choose. You can put anything. But I suggest you put a very very hard password so no one can find it.
To administer your server (restartround, kick) you are going to use Admin Mod so do not skimp on the rcon password length since you are not going to use it in counter strike but only in punkbuster !!

Now we are going to create the script which will launch cs server and punkbuster server.
PunkBuster server controls that players do not cheat. You can basically tell him if punkbuster client is optional or required. I suggest that you use the required mode !

Here is how to launch your Counter-Strike with Admin Mod and PunkBuster
(Still the way I do)

[root@e-smith cstrike]# cd /bin

[root@e-smith bin]# mcedit cstrike

You are now in the file "cstrike". This is the file which is gonna launch the counter-strike server.
Write those lines in it :

IP_LOC=`ifconfig ppp0 | fgrep "inet ad" | cut -f2 -d":" | cut -f1 -d" "`
export LD_LIBRARY_PATH=/games/half-life:$LD_LIBRARY_PATH
cd /games/half-life/
screen -A -m -d -S hlds ./hlds_run -game cstrike +ip $IP_LOC +exec server.cfg +maxplayers 8 +map de_aztec
cd /games/half-life/pb/
echo "Required $IP_LOC:27015 -1 PASSWORD2" >> pbsvhl.cfg
screen -A -m -d -S pb ./pb

[root@e-smith bin]# chmod 750 cstrike

Now you can launch "cstrike" and then your server is gonna be launched.
To stop it just type the following :

screen -r hlds

You are now in the first emulated screen where you counter strike server has been launched lately

Just type "exit" and it will close counter strike and screen

Do the same for punkbuster :

screen -r pb

and type "exit"

Both servers are now closed and unusable

Info: You can delete the files you downloaded lately but it's not necessary

Now we are going to enter the configuration part !

The Counter-strike one is gonna be the easiest one since there is a website talking about this ;-)
Here are the information you need for you config file :

Punkbuster do not need any special configuration except if you want do make some special things !
I advice you to read the documentation..

Admin mod now.
This is a new sub-mod out that allows you give people access to your servers, without giving access to rcon. It also lets you define users who can access the server, each with a different password.
That mean you can tell which player can use a command or not.
The simplest way to configure it is that you take the time to read the docs file of Admin Mod found in : /games/half-life/Admin/docs
You can ask me question about his and I will answer them and put them here if they are very important.
I cant really thing about what you need to know since I do not have any trouble configuring a cs server :)

Hope this HowTo help you !

Troubleshooting - Common Errors
"Not implemented yet"
Waiting for some trouble to appen

Thanks to Grand'Pa for having posted the way to install a basic counter strike server.
Thanks to [-SGT]DeV!L for testing the server for our team (the server I tested this howto on)
Thanks to Dan Brown for the style of the HTML page. I don't really have ideas to make the web pages style...
And Thanks to server.counter-strike which is a very great site for Administrators !


Copyright 2001 Pierrick Brossin.  This document may be freely redistributed so long as this notice remains intact.