Linux can be a bit more complicated to use than Windows, and generally Source server performance is better on Windows, so we recommend against using Linux unless you are already familiar with the OS and prefer it for other reasons than running game servers. That said, here's how to get going, from scratch, using our Gentoo Linux (+ Source game install) package.
1. Log in to your VDS through SSH. You can do this by loading up Putty, then connecting to your server using the information given on the "Server control" page in your control panel.
2. Change to the correct directory for CS:S.
Code: Select all
cd /usr/steam/sourcebase/css
Code: Select all
yum install screen
Code: Select all
screen -AmdS screenname chrt -r 20 ./srcds_run -game cstrike -ip xxx.xxx.xxx.xxx -maxplayers xx
5. Your server will now be running in the background (inside what's called a "pseudo terminal"), and will continue running, even after you close your SSH window. To view it in the foreground, type this:
Code: Select all
screen -r screenname
To hide the screen session again, hold down the control key and hit "a"; then, let go of both keys and hit "d". You should see the message "[detached]" and be returned to the normal command prompt.
6. To make the server start up when the machine is started, edit /etc/conf.d/local.start (Gentoo) or /etc/rc.local (CentOS) and add the same lines you used above. You can easily edit it with this command:
Code: Select all
nano /etc/local.d/local.start
Code: Select all
nano /etc/rc.local
Code: Select all
cd /usr/steam/sourcebase/orangebox
screen -AmdS screenname chrt -r 20 ./srcds_run -game cstrike -ip xxx.xxx.xxx.xxx -maxplayers xx
The easiest way to run multiple servers is to copy the "sourcebase" folder to a second one:
Code: Select all
cd /usr/steam
cp -rp sourcebase sourcebase2
A few other useful "screen" commands to get you going:
Code: Select all
screen -ls
Code: Select all
screen -DR screenname
Code: Select all
screen -wipe
Control-a, Escape will let you cursor through the screen buffer while you are attached to a screen. Hitting Escape again will get you back out.