Forum

> > CS2D > Servers > CS2D Server Setup (Debian)
Forums overviewCS2D overview Servers overviewLog in to reply

English CS2D Server Setup (Debian)

23 replies
Page
To the start Previous 1 2 Next To the start

old CS2D Server Setup (Debian)

SD
User Off Offline

Quote
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.
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.
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.
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.
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.
1
chmod cs2d_dedicated +x
Then we start the server (assuming you're in root directory of your CS2D server).
1
./cs2d_dedicated
Or you can put full path.
1
./home/cs2d-ds/cs2d_dedicated
You can run your server 24/7 with nohup.
1
nohup /home/cs2d-ds/cs2d_dedicated

CS2D dedicated server supports some commandline parameters.
1
nohup /home/cs2d-ds/cs2d_dedicated -name NAMESERV -port 1337 -rcon passwd
edited 3×, last 24.11.12 04:04:07 pm

old Re: CS2D Server Setup (Debian)

Cirium
User Off Offline

Quote
An auto installer for the lazy people.

Run it in the command line:

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

old Re: CS2D Server Setup (Debian)

SD
User Off Offline

Quote
@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.

old Re: CS2D Server Setup (Debian)

mr_s
User Off Offline

Quote
user Cirium has written
An auto installer for the lazy people.

Run it in the command line:

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

it says unzip command not found

old Re: CS2D Server Setup (Debian)

Shawni
User Off Offline

Quote
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.
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.
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.
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.

old Re: CS2D Server Setup (Debian)

Shawni
User Off Offline

Quote
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 ?

old Re: CS2D Server Setup (Debian)

mr_s
User Off Offline

Quote
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

old Re: CS2D Server Setup (Debian)

SD
User Off Offline

Quote
@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.

old Re: CS2D Server Setup (Debian)

Yates
Reviewer Off Offline

Quote
@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:

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.

old Re: CS2D Server Setup (Debian)

SkullFace
User Off Offline

Quote
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.
To the start Previous 1 2 Next To the start
Log in to reply Servers overviewCS2D overviewForums overview