[Debian 9] How to install a SA:MP server

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

apt install libstdc++6 wget nano

Now we need to run 32bit on a 64bit server. For that install the following:

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

Download SA:MP

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

tar -zxf samp037svr_R2-1.tar.gz

Step 3 – Configuring your server package

For this, I would recommend to use the Filezilla and open the folder where you installed the server.
Then open the file server.cfg.

Result of default server.cfg:

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

In order for the server work please change the rcon_password.

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 *

To start your server and keep it 24/7 online use the following command:

nohup ./samp03svr