Step one: Moving into the neighborhood.
Login ( as root ) using an SSH client, such as PuTTY.
1
2
login as: root
root@LinBox1's password: ( enter password )
Step two: Meeting cs2d, the server hosting account.
Using the command 'useradd', add a new user like this:
1
$ useradd -m -s /bin/bash cs2d
and set the account's password:
1
2
3
4
$ passwd cs2d
Enter new UNIX password: ( enter cs2d's password )
Retype new UNIX password: ( enter the same password )
passwd: password updated successfully
Step 3: Getting into cs2d's house and screwing his wife.
Log in to the cs2d account using 'su' and go straight to his home directory ( you shouldn't have to enter his password since you're root, unless your distro is seriously fucked up... ) :
Step 4: Making bedrooms for each of cs2d's new kids ( WHADDA YA MEAN THEY AREN'T HIS!? )
Make a directory for each server you want to host, I made one called 'server1' for this part:
Then download ( using 'wget' command ) the tarball at
http://dannydeth.0adz.com/cs2d_dedi.tar.gz and untar it ( using 'tar' command ):
1
2
3
4
5
6
7
8
9
10
11
12
13
$ wget dannydeth.0adz.com/cs2d_dedi.tar.gz
--09:26:13-- http://dannydeth.0adz.com/cs2d_dedi.tar.gz
=> `cs2d_dedi.tar.gz'
Resolving dannydeth.0adz.com... 209.190.24.12
Connecting to dannydeth.0adz.com|209.190.24.12|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 586,282 (573K) [application/x-gzip]
100%[====================================>] 586,282 38.71K/s ETA 00:00
09:26:38 (24.51 KB/s) - `cs2d_dedi.tar.gz' saved [586282/586282]
$ clear
$ tar -xvzf cs2d_dedi.tar.gz -C /home/cs2d/server1
Step 5: The children are born!
Go to the server's directory ( mine is called 'server1', as you should know ) and execute the server through 'screen' so that your cs2d server won't shut down when you leave your SSH session.
1
$ screen home/cs2d/server1/cs2d_dedicated
Now hold Ctrl+A and press C, it will open a new window for you so that you can open more servers. ( Thanks to the GNU guys for screen!
) Hold Ctrl+A and then hit N and it will go to the next window, hold Ctrl+A and hit P and it will go to the previous window. Ain't that just a miracle of computer engineering?
Step 6: Stopping the affair with cs2d's wife and leaving the kids to grow up without their real father...
Now, you cannot leave the SSH client open forever, so hit Ctrl+A and D. Close your SSH client, open CS2D and look for your server(s). It/They should be there, if not, try joining via IP.
Step 7:
Coming back to play with the kids' internal organs and then bring them back to life
Now, you have obviously done Step 6, so I assume you have just reconnected. ( If you haven't, do so now! it's... good practice. (?) ) Now, we want to configure our server! To do this, we need to edit the numerous configuration files that cs2d_dedicated needs. The ones you usually want to edit are:
1
2
3
server.cfg
mapcycle.cfg
filters.cfg
Since those three contain majority of the settings you may need/want to change.
Alright, now you have just changed your server config files, and you want to get this server running again. You just need the screen command:
It will give you a little list like this:
1
2
3
There is a screen on:
9158.pts-0.LinBox1 (Detached)
1 Socket in /var/run/screen/S-cs2d.
That is your last session! Let's go there and restart the server.
1
$ screen -r 9158.pts-0.LinBox1
Now you should be in your old screen session. Remember your session will have a different name.
Okay, to stop the CS2D server, simply hit Ctrl+C and cs2d_dedicated should end and you will be taken back to the shell. Now, start the server again by making sure you are in the server1 directory and typing:
And voila! Welcome to CS2D hosting.
This entire process can take between 3 minutes and half an hour, depending on how thick you are and how many servers you want to start/configure.
Hope this was helpful.