How to Install AssaultCube Server on CentOS Server
***WARNING: n00b Tutorial Alert***

Note: This is a tutorial for installing AssaultCube Server using CentOS 6

I am going to assume that, if you run linux, you are connected through the terminal via:
And good for you!!!

For Windows users I am going to assume you are laden with the cumbersome paradigm of PuTTy and that you will need to open it and connect to your VPS using the details given by your provider.

Now, before we get to the specific work required to run an AssaultCube server - we are gonna do a few things...
Let's start out by adding deltarpm to shrink the download size of our pending updates

yum install deltarpm

Now let's do an initial update of our server.

yum update -y

First, you need to recognize that CentOS 6 has a lot of cool stuff...But we need some stuff that CentOS 6 probably doesn't have available by default.
Adding the EPEL repository to CentOS 6 should give us what we need...

yum install epel-release

Then do...
yum update -y

Now that we have installed the epel repository, let's pillage it for the requisites we need...
(All in one command...)
yum install readline-devel crypto-utils gcc-c++ zlib-devel SDL-devel SDL_image SDL_image-devel libogg-devel libvorbis-devel openal-soft-devel libcurl-devel clang clang-devel SDL_mixer-devel libcurl-devel nano screen unzip wget -y

Hopefully that completed without any errors and we can move on...

We need to set up a user for AssaultCube, because, however innocent it may seem, you don't want to run anything in root if you don't have to, so let's not...

Start by creating a new user...
(Assuming your new user's name is unarmed...)
adduser unarmed
Now set unarmed's password...
passwd unarmed
And then confirm the new password in the following prompts...

Now you may find you end up with a need for Administrator access for unarmed...
In CentOS we can simply add the user to the wheel group.

usermod -a -G wheel unarmed

You can now log out of the Root account, and log back in as unarmed, using the username and password you just assigned...

Now we can begin the real meat of the purpose of this thread - installing an AssaultCube_v1.2.0.2 Server...
Let's get the server right now!!!

Now that we have the archive, we need to extract the goods....

You should now be left with a fresh installation folder named AC-master
You can see it by listing it ....
You should now have a folder named "AC-master"

For simplicity, let's rename this folder to just "AC"
mv AC-master AC

Now we need to build AssaultCube to play nicely with CentOS 6 - the default binaries prefer a different flavour, so to speak...

For now, we are going to Change Directory and go right into the source...errr src...
Like this...
cd /home/unarmed/AC/source/src

Now that we are in the source, we are going to compile AssaultCube
make clean && make install
If everything has gone right - this command will result in a seemingly endless stream of random output which will make absolutely no sense to you....

If everything worked, the last two lines before the shell prompt should read something like this...
install -d ../../bin_unix/
install -m755 ac_server ../../bin_unix/native_server
[[email protected] src]$

Congratulations!!!! You have compiled your very own installation of AssaultCube for CentOS 6!!!

You can now use the to begin creating a basic server layout...
Additionally, you can continue with the documentation regarding servers and commandline options...
As well, I will try to provide a sample configuration you might wish to use here...

First, let's get back to the main AC-master folder by using Change Directory...
cd /home/unarmed/AC

Now, we need to create a configuration file that we will use to start our server with...
We will add a series of options to the file that will tell our server how to operate...
(In this example we will create a separate script for this, but this can be done directly in the existing script that is included.)

Now edit the file to look something like this - using your own options where relevant...
All of the jargon here can easily be deciphered by reading the relevant docs...
./bin_unix/native_server -PfkbmasRCDePtw -T -kA10 -kB60 -McURD -D3 -Wdemos/server1 -n"\fTAwesome \f4Server \f1Name!" -o"\fTWelcome \f4to the \f1Awesome \f4Server!!!" -c16 -f2200
Now save the file by pressing "ctrl+o" then "enter" - exit using "ctrl+x"

Let's make that file we just created executable...
chmod +x

You are almost ready to fire up your server, but we are missing a few things here...
We need to edit some configuration files before we are ready to start our server...

Let's Change Directory again. This time we want AssaultCube's default configuration folder...
cd config

Let's setup a password! While we are at it - let's make seven passwords!!!
Open the appropriate file...
nano serverpwd.cfg
Now we want to create entries for our passwords...
// list of additional server admin passwords
// WARNING: You can NOT use CubeScript in here!!
// one password per line

// Use the following scheme...
// password [denyadmin]
// optional: if denyadmin is set to '1', the password can only be used to connect to the server in case of ban, not to claim admin

password1 0 //This is a password entry
password2 0 //This is also a password entry
password3 1 //This is a password - but only to overcome a ban
password4 0 //While this is a password for admin
password5 0 //You can make comments like this
password6 0 //So you know whose password is which, like...
awesomepass 0 //Password for unarmed
Again - press "ctrl+o" to save, then "enter", then "ctrl+x" to exit...
You have now set your server passwords...

Now I would highly recommend adding some Server Information....
If nothing else, add some form of contact, so that other server owners or moderators can reach you if there is a problem...
nano serverinfo_en.txt
Here we will add our relevant info...
// extended serverinfo file
// ========================
// WARNING: You can NOT use CubeScript in here!!
// This text file is sent, whenever a client requests extended server information.
// Comments are removed, also leading and trailing blanks and empty lines.
// To send an intentionally left blank line, use a line with a single '.'
// Please use this file to provide contact information, especially for players
// who are innocently affect by an IP range ban.
// You can also use this page to advertize your clan or provide contact
// information for recruiting.
// Don't use more than 80 characters per line. You can use colors and TABs.
// Color usage: \f plus a corresponding number/character.
// The available colors are: 0: green, 1: blue, 2: yellow, 3: red, 4: gray, 5: white,
//                           6: dark brown, 7: dark red, 8: magenta, 9: orange,
//                           A-D: red set, E-H: yellow set, I-L: green set,
//                           M-P: cyan set, Q-T: blue set, U-X: magenta set
//                           Y: light gray, Z: dark gray
// Example:
//     BobsInstagibServer \f3play nicely!
//     Coloring a motd is fun: \f0Green\f5 and another \fLgreen\f5 from the set.
//     contact me at [email protected]
// Info begins on the next line without comments:
\f3Servers \f4hosted by \f3unarmed!
\f3Please \f4feel free to \f3contact \f4me for \f3assistance!
\[email protected]

When you become more experienced with editing the configuration options, you may have a need to add entries to the serverblacklist.cfg and the nicknameblacklist.cfg...For now we will leave them blank...
As you gather custom maps and develop an idea of how you would like your maps to rotate, you can make custom entries in the Map Rotation file, maprot.cfg....
Additionally, you can research the source and read the documentation for all relevant server options...

Now that we have our server's main configuration options set, and an executable Shell Script, we can run our server...

To do this, we will need to use a simple, yet powerful utility, called screen.
Screen allows you to open a virtual terminal screen where you can run a process so that it will not close when you logout of the VPS...
screen -dmS s1 bash /home/unarmed/AC/ >> server1.log
This will run your server in a screen named 's1', while also writing the terminal output from the server to a text file titled 'server1.log.'

If it worked, you should see be able to see the screen named 's1', by listing screens...
screen -ls
The output should show a screen named 's1' with the status of (Detached).

At this point - your server should be up and running...Try connecting to it to go for a test game...
If you find that your server is not working, try to look at the log data....
cat /home/unarmed/AC/server1.log
You can use any error information you find to determine the cause of the problem...

Otherwise, you should now have a working AssaultCube server to go play with your friends on...Enjoy!!!

If you have continuing technical difficulties feel free to PM me and I will do my best to assist you...
Thanks given by: Storch , D3M0NW0LF
If anyone wants, I may do a tutorial similiar to this one on a Ubuntu/Debian system ;)
Thanks given by:
Awesome!!! We could link it here too!!! :D
Thanks given by:
(01 Feb 14, 07:50AM)+f0r3v3r+ Wrote: text

Disable `root` login via ssh.
Thanks given by:
Step 1 of using a VPS: Google "how to secure linux vps" or "how to harden ssh" or "how to use iptables", etc etc etc etc..

Step 2: Run with the options wanted and the cfg required.
Thanks given by:
Well...I am glad all of the 'pros' out there have been so willing to provide such clear and concise instructions for all of the novice players out there....

(01 Feb 14, 11:35AM)RandumKiwi Wrote: Step 1 of using a VPS: Google "how to secure linux vps" or "how to harden ssh" or "how to use iptables", etc etc etc etc..
^ This is a good start if you are serious about learning more about the security aspects of a CentOS VPS. However, there are a number of example works and tutorials that cover more recent information and specific uses for iptables...
Additionally, if you don't plan on using your VPS for any kind of webhosting, you should disable any unnecessary services like httpd and php...Of course, if you plan on hosting a clan page or some other service, you may want to leave these enabled - but figure out how to use them securely ASAP!!!

(01 Feb 14, 11:35AM)RandumKiwi Wrote: Step 2: Run with the options wanted and the cfg required.

This is a valid way to accomplish the same task, as well...
I will try and incorporate this in, and demonstrate how multiple servers can be run this way...

Note: I am as noob as any and just wanted to try and fill a void I found myself in at one point in this game...
There is documentation out there, but few people are willing to help our less technically-savvy cuber brethren when asked...
I get asked a lot, and am more than willing to help, even though I am not the 'subject-matter-expert'. It seems like those that are aren't often accessible or interested...
On that note, a great thanks to the many people out there in the community that have been willing to help...
Thanks given by: Storch
I absolutely love this. We should get you on the wiki and doing other tutorials as well as putting this one up!
Thanks given by:
I am happy to help where time allows....I am no expert...
But anything I put forth like this is free game for reuse...
I am generally a copyleft kind of guy...
Thanks given by: