How To Install SAMP Server On A Fresh Debian 9 Machine

Installing SAMP on Debian 9 Machine

In our previous article on installing SAMP, we learned how to install SAMP Server on a fresh CentOS 7 server. Now, not everyone will be using CentOS for their own reason. Some might find Debian reliable because of the plugin compatibility or any other possible reasons.

Grand Theft Auto San Andreas is a game by Rockstar gaming company. Launched back in 2004, GTA San Andreas has gained popularity and fame among the gaming world that even today, more than a decade ago, people still like it and do play it on a daily basis. A year after the game was launched, an online, 3rd party interface, was launched by a sole developer who was later participated by beta testers from all over the world as it gained popularity. Before SA:MP, people used to play MTA SA which stands for Multi Theft Auto San Andreas.

What Is SAMP?

SA-MP (San Andreas Multiplayer) is a multiplayer mod for Grand Theft Auto San Andreas allowing users to play against each other over the internet or LAN. To connect to a SAMP server over the Internet, there should be a server that needs to have an active Internet connection to allow players to connect from multiple computers from all over the world.

How To Install SAMP Server on Debian 9 VPS/Dedicated Server?

In this article, we’re going to learn how to install a SAMP server on a Debian 9 machine. To connect to the machine, one should have SSH client, Putty installed in order, to begin with. If you don’t know how to connect to VPS, refer to this article for proper instructions on connecting to a VPS.

We will be installing SAMP on the machine with multiple steps. So once you’ve connected to the machine, use the following steps to begin installing.

Step 1 – Installing & Updating Required packages for SAMP Server

There are a few packages that are required to be installed on the machine. Use the below mentioned commands to install and update the services. Some packages are included which we would need to configure the server later.

apt install sudo
sudo apt update && apt upgrade

Sudo is used to grant access to our package up-gradation process. Updating and upgrading may take up to 10 minutes to be finished. Once done, follow up to the next step on installing some essential libraries used in samp03svr operation.

apt install libstdc++6 wget nano

Now we’ve installed the library, wget, and nano.

The difference between CentOS 7 & Debian 9 is that Debian wouldn’t let you run a 32bit file in a 64bit server. To make the server run, you need to add support for 32bit too. To do so, use the below-mentioned command.

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

Step 2 – Downloading & Configuring SAMP Package

Now since we’ve installed packages and libraries, it’s time to install the main, SAMP package. To do so, use the following command.

wget http://files.sa-mp.com/samp037svr_R2-1.tar.gz

This will automatically download the package. As you can see, the file ends with a “.tar.gz” extension, it means it is compressed. To decompress, we need to use this command.

tar -zxf samp037svr_R2-1.tar.gz

With the command, the file will be decompressed and a new file named “samp03” will appear. We will need to configure it.

Step 3 – Configuring your server package

To configure the package we’ve downloaded, we need to follow this step. First of all, we need to access the newly created folder after decompressing the package we’ve downloaded. To access, use the “cd” command.

cd samp03

Now since we’re inside the SAMP package directory, you may want to see which files are there. To do that, use this command.

ls

After that, you’ll see the list of files in the directory. By default, the SAMP server will not start unless we change its RCON password from “changeme’ to something else. To do that, we need to edit and configure the server.cfg file. Use the below-mentioned command to access the server.cfg file.

nano server.cfg

You will see the list of configuration that is awaiting to be changed. You will see something like this.

echo Executing Server Config...
lanmode 0
rcon_password changeme
maxplayers 50
port 7777
hostname SA-MP 0.3 Server
gamemode0 grandlarc 1
filterscripts base gl_actions gl_property gl_realtime
announce 0
query 1
weburl www.sa-mp.com
maxnpc 0
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000

Now scroll your edit pointer to “rcon_password” and remove ‘changeme’ and add your desired password. Make sure the password doesn’t contain any spaces in it. Max players can be defined to set the maximum number of players connected to the server(max limited by SAMP is 1000). Gamemode0 is the script you will upload to provide in-game features to your players and filterscript acts like plugins. “announce” means whether to allow the server to be displayed in the “Internet” tab or no, it’s boolean so 1 means yes and 0 means no. The query as it is and for weburl set the website URL of your SAMP server.

You don’t really have to edit it all unless you want to, but just make sure you edit the “rcon_password changeme” to “rcon_password somethingelse” where “somethingelse” is your RCON password which can be used to access your server remotely.

Step 4 – Setting files permission

Sometimes files downloaded from the SAMP website are locked due to its pre-configuration that came along with the files. To unlock the file and make it accessible, use the following command to set proper permissions for all the files in the “samp03” directory.

chmod +x *

Now your SAMP server is configured. It’s time to try on with the server.

Step 5 – Starting the server

To test if the server is working fine, you need to start it. To start, use the following command to execute the start file “samp03svr”.

./samp03svr

Now your server is started. Use your machine’s hostname or IP and paste it in your SAMP client’s favorite. You will see your server running. But what happens when you close the Putty? Well, the server closes too. But why? It is because we’ve just executed and we need to keep it alive even after we close Putty. To do that, we will use the nohup command. Use the following command to do that.

nohup ./samp03svr

You will see something like this.

[[email protected] samp03]# nohup ./samp03svr
nohup: ignoring input and appending output to ‘nohup.out’

It means the server has started and will work even after you close your Putty.


Start Your Own SAMP Server With Shadow Hosting!

Planning to start your own SAMP server? We’ve got you covered! No need to worry about installing the server on VPS when we’ve brought the best solution for you. Pre-installed SAMP server, all you need is to click on “Start Server” and your server will be started from a web browser! Yea! It’s true! Check our SAMP Hosting in the Game Servers page.

Oh, wait? Do you want full root access? You would definitely need a VPS for it. Check out our VPS Hosting solution and start your own SAMP server with us. If you have any problem while installing the SAMP server on your VPS, you can contact our support and we’d be glad to assist you out of the issue.

About Manal Shaikh 21 Articles
Manal Shaikh, the Founder of Shadow Networks International and CEO/Chairman of Shadow Hosting International. A cybersecurity analyst, network analyst and a web administrator.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


CommentLuv badge