How to set up a Spearhead Linux Server

Categorie Sub Categorie Files Creator

Tutorials

Manuals

Appelpitje

Spearhead Linux Server

Intro

Now why would you use an operating system like linux for a medal of honor server?
Because Linux is a free operating system for servers and is light(less ram and cpu usage than windows)
The only disadvantage to use Linux instead of Windows is that you cant use very usefull tools like Gsprotector and Davens fixes (but you can use his linux patches).

The main reason that i made this tutorial is for people who pay allot to game hosting companies and actualy can use the same servers for a cheaper price!!
Now prices are around 0.60€/slot (public) that would make it €15 for just a 20 slot public server.
A Linux VPS with a single core and 256MB ram can handle 1 moh:sh server. The price for this is only €5-7 which is 50% cheaper!

Getting Started

For the host i use filemedia.
They use servers with SDDs which wont give I/O lag + the price compared to other host providers is allot cheaper.

Example Prices

:

 

Now you will see 4 different plans to rent.
I will explain how many servers you can run according to the RAM.

512MB: Can run up to 1 moh server STABLE but can run up to 2 moh server UNSTABLE.

1024MB: Can run up to 3 moh servers STABLE but can run up to 5 moh servers UNSTABLE.

Software needed

In this tutorial we will use Putty and Filezilla.

1. Using Putty to connect to the server

Open putty.exe, Now fill in your IP adress that you got from your VPS and select SSH after this click on “Open”.

When you get an security message from putty about the SSH key click on “Yes”! This is very imporant or you wont be able to connect to the VPS anymore..
Now putty will ask you to login as, normally you will get root access on the VPS.
So use: root. After that enter your password given by your host. Note that you wont see your password when you type it!

2. Installing packages

1st We will install wget, this is needed to download files with the commandline interface.

yum install -y wget

Next we will install glibc, this is a library that we need to run the moh server.
But first we need to know which architecture that our cpu has on the server.

lscpu

Here you see that my cpu has i686 architecture. The possible architectures are i686 and x86_64.
Now go to rpmfind look good to the Distribution and copy the download link (.rpm).

cd /home

mkdir dld

cd dld

wget ftp://rpmfind.net/linux/centos/6.4/os/i386/Packages/compat-libstdc++-33-3.2.3-69.el6.i686.rpm (0)

Now we will install the rpm file:

ls

rpm -U (To select the filename, select the red text and click the right mouse button to copy-paste it directly.)

Now we will install the unzip:

yum install -y unzip

Now we will install screen
This is used to put a console into a ‘screen’ so we dont have to keep putty open to let the server run, otherwise the server will stop when we close putty!

yum install -y screen

3. Uploading moh to the VPS

To run a moh server on the VPS we need to put moh on it!
Now on your pcselect only main and mainta folder in the moh folder and create zip file from it. (Not a rar file!)

 

Install Filezilla and open it.
Type in:

Hosts: your IP of the VPS

Username: root

Password: Your Password

Port: 22

And press “Connect”.

Now on the right side select the folder “/” and navigate to /home and create a folder there named “server1″.
Open the folder and move your moh.zip from you pc in the field.

When the upload is completed (see bottom of Filezilla) lets go back to putty.

cd /home/server1

unzip moh.zip

Wait untill the unzipping is done.

 

4. Installing the binaries and run a moh server

Download the binaries here (0).
Now open the zip on your pc and drag the folder mainta and spearhead_lnxded in the folder server1

We will try to run the server now (make sure that you are in the folder server1!!):

./spearhead_lnxded +set dedicated 1 +exec server.cfg +set net_port 12204

 

Because we dont have the permissions we have to add permissions to the file with “chmod”.

chmod 777 spearhead_lnxded

Now try this code again:

./spearhead_lnxded +set dedicated 1 +exec server.cfg +set net_port 12204

And you should see the moh server starting up the console like the picture above here.
Congratulations your moh server is now live and running! Smile

But when you close putty the server will end. To avoid this we have to put the console in a screen.

screen -AdmS server1 ./spearhead_lnxded +set dedicated 1 +exec server.cfg +set net_port 12204

Now you wont see the console anymore, to see the console use this code:

screen -r server1

Now go look in the server list and you will see the server in the list! (If you configured it all good..) Smile


Note that this is in my lan servers because i used a local machine to make this tutorial!