Running a csgo server based on sourcemode on a virtual machine or linux system.

in #utopian-io6 years ago

linux.png

Repository
https://github.com/Vitusc

What Will I Learn?
You will learn how to properly install the cs: go server on your vps (virtual private server).

Requirements

  • Linux OS
  • Putty
  • Sourcemod (open source)
  • Basics knowledge of linux
  • Basics of programming in this system
  • Reading comprehension

Difficulty

  • Basic

Tutorial Contents

Before beginning, I would like to add a short note in case of any contradiction.
sourcemod.png

In the first place we have to log in to your vps machine using PuTTy.
In the next step, we execute the server update with a few commands. The first command we will use is:
sudo apt-get update
with this command there should be no problems, so let's go to the next one, which is:
sudo apt-get upgrade
Some people may have problems here. At some point, we get a question from putty. In response, we must enter "y" and confirm with the enter.
csgo1.png
It may take a few moments.

The time has come to install libraries (a very important step in the installation of the server).

Attention! In this step, you must use the appropriate command. There is another command for each system.

Debian and derivatives (Ubuntu, Mint)
sudo apt-get install lib32gcc1 libc6-i386

RedHat and derivatives (RHEL, Fedora, CentOS)
yum install glibc.i686 libstdc ++. i686

Arch Linux
pacman -S lib32-gcc-libs

I use the Debian system in the example, so I used the command: sudo apt-get install lib32gcc1 libc6-i386

csgo2.png

this step, fortunately, should take just a few seconds.

Now also very important information.
We will create a new user on which we will be able to carry out further instructions. Many of you (beginners) may not know this, but we should not continue to work on the administrator's account (root), because when things do not go our way, in the worst case, we may be able to destroy the vps server in the worst case.

for this purpose we will use the command:
adduser user
then we give the password to the account.
We will be asked to fill in such data as "Full Name", "Room Number", and similar, but we are not interested in it. We can leave them without any entry. At the end, we approve everything with the letter "y".

csgo3.png

Now we will use the command to log on to the user (in my case, the user is "cs").
Command: su cs (You give your username instead of "cs").

Now that we are on a regular user, we create a folder where our game server will be.
To do this, we'll use the mkdir command: mkdir (folder name)
we go to our folder using the cd (folder name) command

csgo4.png

now, with the wget command, we will download the steam console, which will support both steam and our server.
wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz

csgo5.png

this task should be done very quickly, because the content was packed.
Now we extract the contents using the tar command.

tar -xvzf steamcmd_linux.tar.gz

csgo6.png

this activity should also be done quickly.

now a few steps that are not required.
To verify that everything has been done correctly, we should use the "ls" command.
Thanks to this command we will check the contents of our game folder.
You should find files like:
linux32 steam.sh steamcmd.sh and you no longer need steamcmd_linux.tar.gz .
If we want to be decent and keep it clean, we can use the command rm steamcmd_linux.tar.gz to delete the unnecessary file.

csgo7.png

Now we're starting to play.
We connect to the steam console using the command
./steamcmd.sh
When you first start up on a regular basis, but are not suitable for take too long.

at this point, we log in anonymously, using the command login anonymous , then install the game directory with the command force_install_dir ./csgo/

and using the command app_update 740 validate we will start installing the game server.
This process can take a long time, it all depends on the parameters of our vps.

The installation process in percent is shown after the inscription "progress: x.xx"
For example, "progress: 4.40" means that the installation performed at 4.40% at 100%.

csgo8.png

If the installation succeeds, we should receive the following information at the end:
"Success! App '740' fully installed."

When we receive such a message, we know that everything is okay and our server is starting to crawl.

When the installation fails, we must start the step from the beginning again by executing the command app_update.

Now, to exit the installation process, click "ctrl + z" and run the command of our server.
To start the server, we first need to type cd csgo command to go to the folder where this server was installed.

Here the choice of the command depends on you and on what type of server you want to create. I leave you the choice:

Classic Casual:
./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2

Classic Competitive:
./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2

Arms Race:
./srcds_run -game csgo -console -usercon +game_type 1 +game_mode 0 +mapgroup mg_armsrace +map ar_shoots

Demolition:
./srcds_run -game csgo -console -usercon +game_type 1 +game_mode 1 +mapgroup mg_demolition +map de_lake

Deathmatch:
./srcds_run -game csgo -console -usercon +game_type 1 +game_mode 2 +mapgroup mg_allclassic +map de_dust

Starting the server may take a while, but if it starts, we should receive a message and the IP of our server.
csgo9.png

we can assume that the server is already working, but unfortunately it is not.
We still have to download the server "sourcemode".
To this end, we have to go to the website: https://www.sourcemod.net/downloads.php
After clicking the "Linux" icon, the required package will be downloaded to us.
We need to transfer this package to the server, but we must use the appropriate program. I recommend Total Commander or FileZilla (I will use FileZilla for the purpose of the movie).
We connect via SFTP protocol, and provide server data.

csgo10.png

Now in the FileZilla program, once we've connected, go to the "csgo" folder and move the "sourcemode" content, ie the "addons" folder and the "cfg" folder to the "csgo" folder.

csgo11.png

If we have completed all of the above steps, now we return to the PuTTy program, we re-use
Classic Casual:
./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2
or
Classic Competitive:
./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2
or
Arms Race:
./srcds_run -game csgo -console -usercon +game_type 1 +game_mode 0 +mapgroup mg_armsrace +map ar_shoots
or
Demolition:
./srcds_run -game csgo -console -usercon +game_type 1 +game_mode 1 +mapgroup mg_demolition +map de_lake
or
Deathmatch:
./srcds_run -game csgo -console -usercon +game_type 1 +game_mode 2 +mapgroup mg_allclassic +map de_dust

command.
At this point, our server is already working.

Regards, @vitusc!
Beneficiaries

This post has as beneficiaries

@utopian.pay with 5%

using the Steeditor beneficiary tool

beneficaries.png

Sort:  

Thank you for your contribution @vitusc.
After reviewing your tutorial we suggest the following points listed below:

  • Use shorter paragraphs and give breaks between them. It will make it easier to read your tutorial.

  • Code/commands sections are better displayed using the code markup.

  • Try to improve the structure of your tutorial. It is difficult to read your tutorial and it seems disorganized.

  • Finally the tutorial is very interesting.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you so much for considering my contribution.
I will take any comments into account :)

Thank you for your review, @portugalcoin! Keep up the good work!

Congratulations @vitusc! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 500 upvotes. Your next target is to reach 1000 upvotes.

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

Carnival Challenge - Collect badge and win 5 STEEM
Vote for @Steemitboard as a witness and get one more award and increased upvotes!

Hi @vitusc!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @vitusc!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.26
TRX 0.20
JST 0.038
BTC 95956.24
ETH 3566.05
USDT 1.00
SBD 3.78