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 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 which 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 CentOS 7 VPS/Dedicated Server?
In this article, we’re going to learn how to install a SAMP server on a CentOS 7 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.
yum update sudo yum install nano libstdc++.so.6 wget -y
When updating, press Y button and then Enter to confirm installing updates for your packages using Yum package manager.
Step 2 – Downloading & extracting the latest SAMP server package from SAMP website
Now it’s time to install the latest SAMP server package from official SAMP website. To do that, use the following command.
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 “cd” command.
Now since we’re inside the SAMP package directory, you may want to see which files are there. To do that, use this command.
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.
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 “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 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”.
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.
You will see something like this.
[root@bot 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 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 SAMP server on your VPS, you can contact our support and we’d be glad to assist you out of the issue.
We hope you like our article. If you have any thoughts or suggestion, please comment in the comment box below.