English CS2D Server Setup (Debian)

23 replies
Goto Page
To the start Previous 1 2 Next To the start
24.11.12 02:49:29 am
Up
SD
User
Offline Off
Please note, that this tutorial is for Linux newcomers and for everyone else who has problems with running CS2D servers. Here I'll explain how to start your own CS2D server on any Debian-based (including Debian, obviously) distribution.

First of all, my advice is to get yourself a 64-bit distribution. It will not limit RAM usage and many server packages can only be installed on 64-bit machines. If an application is 64-bit then it can only use 64-bit shared libraries, there is no backwards compatibility (in case you run Windows, you can run 32-bit applications on 64-bit machines).

CS2D dedicated server is 32-bit application (unfortunately), so if you have 64-bit distribution, you'll need to install 32-bit libraries first. Skip this step if your distribution is 32-bit.
Code:
1
apt-get install ia32-libs

Note - by default this supports only console applications, basic X applications and GTK based applications. There are no 32-bit Qt or KDE libraries provided. But since CS2D dedicated server is a simple console application - we're okay with that.

Now let's get CS2D server. Navigate to a folder of your choice (let it be /home directory). Assuming you're in the root of your server.
Code:
1
2
cd home
mkdir cs2d-ds

This will create a /cs2d-ds directory where we will keep our server.

If you can connect to your server through SFTP protocol, skip this step. Just download CS2D itself and CS2D dedicated server for Linux, unzip both archives, and move everything to /cs2d-ds folder you've just created. I like everything being clean, so I would also delete batch files and Windows executables from the folder, only leaving Linux executable.
If you can only connect through SSH protocol, then we'll get a CS2D server only using terminal.
wget & zip/unzip (if you use terminal) >


Server will not run properly if permissions are not set correctly. Depending on your server configuration you can either set permissions to 777 or 775.
Code:
1
chmod cs2d_dedicated 777

You may also want to set 777 (or 775) to every file and folder on your CS2D server. Navigate to your CS2D folder first, then.
Code:
1
chmod -R 777 *

If you have any Lua scripts, my advice is to set permissions to 777 too, because Lua scripts are reported not to work properly under Linux.

Finally, you can run your CS2D server. Sometimes you have to mark your server as executable - but that's very rare and highly unneeded.
Code:
1
chmod cs2d_dedicated +x

Then we start the server (assuming you're in root directory of your CS2D server).
Code:
1
./cs2d_dedicated

Or you can put full path.
Code:
1
./home/cs2d-ds/cs2d_dedicated

You can run your server 24/7 with nohup.
Code:
1
nohup /home/cs2d-ds/cs2d_dedicated


CS2D dedicated server supports some commandline parameters.
Code:
1
nohup /home/cs2d-ds/cs2d_dedicated -name NAMESERV -port 1337 -rcon passwd
edited 3×, last 24.11.12 04:04:07 pm
24.11.12 03:10:16 am
Up
Tobey
User
Offline Off
If I'm not totally mistaken, you also need libstdc++5?
signature too huge
24.11.12 03:24:45 am
Up
Cirium
User
Offline Off
An auto installer for the lazy people.

Run it in the command line:

Code:
1
wget http://linux.iamcirium.com/cs2d/cs2dinstaller.sh -O - -o /dev/null|bash
24.11.12 06:37:43 am
Up
SD
User
Offline Off
@user Tobey:
No, you don't. Even if you need, it comes installed with Debian (don't know about other distributions though).
@user Cirium:
Thank you! But I think it's the best to learn stuff by doing it step-to-step.
24.11.12 07:28:48 am
Up
ohaz
User
Offline Off
Most of the time chmod cs2d_dedicated +x should be enough.
https://ohaz.engineer - Software Engineering
21.08.13 10:06:24 am
Up
mr_s
User
Offline Off
user Cirium has written:
An auto installer for the lazy people.

Run it in the command line:

Code:
1
wget http://linux.iamcirium.com/cs2d/cs2dinstaller.sh -O - -o /dev/null|bash

it says unzip command not found
IMG:http://www.gs4u.net/350x20/cs2d/5.231.50.192:36963.png
21.08.13 10:27:38 am
Up
DC
Admin
Offline Off
Then run this first:
Code:
1
apt-get install unzip
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
21.08.13 10:29:31 am
Up
mr_s
User
Offline Off
now it tells me :
chmod: cannot access `newcs2dserver/cs2d_dedicated': No such file or directory
IMG:http://www.gs4u.net/350x20/cs2d/5.231.50.192:36963.png
21.08.13 11:00:53 am
Up
Shawni
User
Offline Off
This one is retarded somehow,

SD has written:
Server will not run properly if permissions are not set correctly. Depending on your server configuration you can either set permissions to 777 or 775.
Code:
1
chmod cs2d_dedicated 777

You may also want to set 777 (or 775) to every file and folder on your CS2D server. Navigate to your CS2D folder first, then.
Code:
1
chmod -R 777 *

If you have any Lua scripts, my advice is to set permissions to 777 too, because Lua scripts are reported not to work properly under Linux.

Finally, you can run your CS2D server. Sometimes you have to mark your server as executable - but that's very rare and highly unneeded.
Code:
1
chmod cs2d_dedicated +x

The first and the last commands are neesless, you already gave permissions on all files which is stupid for security on the second command.
We die once, do i have to hide to be visible ?
21.08.13 11:05:52 am
Up
mr_s
User
Offline Off
@user Shawni: if i gave you vps info, you can help me?
IMG:http://www.gs4u.net/350x20/cs2d/5.231.50.192:36963.png
21.08.13 11:21:56 am
Up
Shawni
User
Offline Off
user mr_s has written:
@user Shawni: if i gave you vps info, you can help me?

I don't think i've got the time for that, i am more than busy.

Why do you need my help ? isn't this tut enough ?
We die once, do i have to hide to be visible ?
21.08.13 12:13:05 pm
Up
mr_s
User
Offline Off
you sre admin in subnetweb and you can help me
IMG:http://www.gs4u.net/350x20/cs2d/5.231.50.192:36963.png
21.08.13 02:09:45 pm
Up
Shawni
User
Offline Off
Oh come on dude, i told you i cannot help.

Change your root password again.
We die once, do i have to hide to be visible ?
21.08.13 03:00:24 pm
Up
mr_s
User
Offline Off
ok, i will give my vps info here for all(i will change root password after 3hours or 2 or 4

EDIT : worked!
edited 1×, last 21.08.13 05:51:48 pm
IMG:http://www.gs4u.net/350x20/cs2d/5.231.50.192:36963.png
21.08.13 05:13:36 pm
Up
SD
User
Offline Off
@user Shawni:
Would you kindly read it carefully again? I have never said that you must run all three commands altogether. It all depends. Mostly, setting permissions to 777/775 is enough, but sometimes (mostly when you start your server using scripts, for instance), you'll also need to mark it as executable. Also, I don't force chmod -R 777 *, I just say that some people may want to use that. This is a small tutorial so I decided that it will be useful for somebody.

@user mr_s:
It's not a good idea to post that on a public forum.
user mr_s has written:
chmod: cannot access `newcs2dserver/cs2d_dedicated': No such file or directory

That's what it is! There is no such file or directory. Command ls -l will help you to see files & directories in the current folder.
21.08.13 07:56:45 pm
Up
mr_s
User
Offline Off
now the .lua files not found
IMG:http://www.gs4u.net/350x20/cs2d/5.231.50.192:36963.png
10.05.17 10:44:49 am
Up
Gaios
Security Supporter
Offline Off
How to see console?
10.05.17 10:51:07 am
Up
Yates
Reviewer
Offline Off
@user Gaios: You'll need to output it to a file. You can also use
screen
and enter/exit it whenever you want but I recommend sticking to
nohup


nohup
should automatically make its own file called
nohup.out
, so you can
tail
that:

Code:
1
nohup /home/cs2d-ds/cs2d_dedicated & tail -f nohup.out


But this might not work as the process itself outputs to the terminal, you may need to look that up yourself if the above doesn't work.
15.12.17 09:23:26 pm
Up
SkullFace
User
Offline Off
I'm aware that this thread is old, but if someone still can say; how do I terminate cs2d_dedicated in cmd? The way I did it was by resetting the server completely. But I guess there is a more efficient way to do it.
IMG:http://steamsignature.com/status/default/76561198028496057.png
IMG:http://steamsignature.com/AddFriend.png
To the start Previous 1 2 Next To the start