- Запуск и настройка сервера Counter-Strike 1.6 на Linux
- Alexell.Ru
- Установка сервера Counter-Strike: Source с нуля на Linux (Ubuntu)
- Подготовка к установке сервера
- Установка сервера
- Первичная настройка сервера
- Counter-Strike: Global Offensive Dedicated Servers
- Contents
- Downloading the CS:GO Dedicated Server
- Registering Game Server Login Token
- Starting the Server
- csgosl — a CSGO GUI frontend for Windows/Linux
- Linux Scripts
- Docker
- CSGO Server Launcher
- CS:GO Multiserver
- LinuxGSM CSGO Server
- Features
- Supported Servers
- Links
- Windows Software/Scripts
- SteamCMD GUI
- pyr0s-csgo-server-launcher
- Advanced Configuration
- autoexec.cfg
- server.cfg
- gamemodes.txt
- gamemodes_server.txt
- Round Convars
- Gun Game and Demolition Progression
- gamemode_casual_server.cfg
- GOTV Broadcasting
- Network Channel Encryption
- FAQ and known issues
Запуск и настройка сервера Counter-Strike 1.6 на Linux
Опишу процедуру установки и настройки игрового сервера Counter-Strike 1.6.
На тесте буду использовать Linux Ubuntu Server 18.04
Создадим директорию, перейдем в нее и скачаем архив с установочными файлами с официального сайта:
Распакуем скачанный архив, удалим его и сделаем исполняемым скрипт установки:
Установим необходимые библиотеки чтобы было можно запускать 32-битные приложения:
Запустим скрипт установки:
Анонимно авторизуемся на официальном сервере:
Возможно придется авторизоваться используя логин и пароль от аккаунта Steam:
После ввода команды необходимо ввести пароль, подождать, а также возможно потребуется ввести Steam Guard код который придет на email.
Укажем директорию для загружаемых файлов:
Выполним команду для начала закачки файлов (два раза, так как первый раз процесс прерывается):
По окончании увидим сообщение:
Выходим из командной строки установочного скрипта:
Создадим необходимые директории и файлы:
Перейдем в директорию со скачанными файлами и попробуем для теста запустить сервер Counter-Strike 1.6:
Если все ок, прервем работу сервера набрав quit или нажав клавиши CTRL+C.
Установим Screen для того чтобы можно было запускать сервер в фоновом режиме и выйти из Linux:
Запустим новую сессию Screen и запустим сервер (где 192.168.1.50 — ваш выделенный IP который виден из интернета):
Нажмем клавиши Ctrl+a и сразу z чтобы отсоединиться от сессию и оставить ее запущенной как фоновый процесс.
В дальнейшем чтобы вернуться посмотрим список запущенных сессий и подключимся к нужной:
Более подробно как пользоваться Screen я описывал в этой статье — Установка и использование Screen
Смотрите мои другие статьи в категории — Counter-Strike
Источник
Alexell.Ru
Официальный сайт Alexell
Установка сервера Counter-Strike: Source с нуля на Linux (Ubuntu)
Добрый день, дорогие читатели и гости, которым интересна эта тематика.
Как известно, для работы игрового сервера меньше ресурсов (а значит и меньше затрат) нужно именно на ОС семейства Linux. Установка сервера Counter-Strike: Source на Linux с нуля в целом не сложная, но если вы не разбираетесь в Линуксе, тогда лучше все делать по пошаговой инструкции. В интернете можно найти информацию по установке сервера с нуля на Linux, но достаточно грамотных статей я встречал всего парочку. Недавно мы с друзьями запустили свой сервер для CS: Source, поэтому я решил свежим взглядом описать и показать весь процесс, а также обратить внимание на возможные проблемы и пути их решения.
Сразу оговорюсь, что речь идет об установке официального Steam сервера, потому что я не одобряю пиратство (по крайней мере с играми) и вам не советую. На момент написания статьи, цена на Counter-Strike: Source в Steam — всего 435р.
Для запуска сервера Counter-Strike: Source на Linux нам подойдет компьютер или VDS (виртуализация KVM) на любой ОС семейства Linux, имеющий минимум 1 ядро, 1 Гб ОЗУ и свободные 3 Гб места на диске под сам сервер. Если вы собираетесь запускать сервер дома, то вам понадобится внешний IP адрес или придется настраивать no-ip. Недорогие VDS с DDoS защитой вы можете посмотреть здесь. В этой статье мы будем удаленно устанавливать сервер на Ubuntu 14.04.5 LTS.
Если у вас под рукой компьютер на ОС Linux, то вам понадобится консоль и менеджер файлов, а если подключаться будем удаленно, то нам понадобятся shell-клиент PuTTY и FTP-клиент FileZilla (или любой другой, удобный вам).
Подготовка к установке сервера
1. Если у вас 64-битная система, то в первую очередь нужно установить библиотеки для запуска 32-битных приложений, потому что сервер игры как раз 32-битный. Сделать это можно одной командой:
2. Запускать сервер в целях безопасности рекомендуется от имени отдельного пользователя, поэтому давайте создадим нового пользователя. В моем примере это будет test.
После выполнения этой команды, вам нужно будет указать пароль для создаваемого пользователя, а также дополнительные данные. Вы можете пропустить ввод доп. данных, просто нажимая Enter. В конце, вам нужно будет подтвердить ввод данных, отправив Y.
Установка сервера
1. Заходим под именем созданного пользователя:
Вводим его пароль, а после отправляем команду cd, чтобы перейти в домашний каталог пользователя. Вы можете отправить команду ls и в ответ ничего не придет, потому что в домашнем каталоге нового пользователя пусто, там есть только системные файлы.
2. Теперь нам нужно создать папку для установки SteamCMD и перейти в нее. Для этого по очереди набираем команды:
Если все прошло успешно, вы увидите
3. Скачиваем архив SteamCMD:
Скачаться он должен быстро, потому что его размер небольшой. Затем сразу распаковываем его:
После распаковки, у вас появятся файлы и папки:
linux32/
linux32/libstdc++.so.6
linux32/steamcmd
steamcmd.sh
steam.sh
Значит все хорошо и можно удалить скачанный архив:
4. Запускаем командную оболочку Steam:
Дожидаемся загрузки обновлений, после чего должна появиться консоль SteamCMD, вы поймете это по заголовку Steam>
5. Получаем гостевой доступ к сервису скачивания серверов:
Должно появиться 2 строчки, в конце обеих должно быть OK.
Теперь указываем, в какую папку будем скачивать сервер (папка будет создана автоматически). Сервер для CS: Source можно установить в папку css, но вы можете назвать ее по своему.
Директория css будет создана в домашнем каталоге, рядом с папкой steamcmd.
6. Запускаем загрузку сервера игры, указывая специальный стимовский app_id. Для CS: Source это 232330.
Начнется загрузка, которая будет выдавать Update state в процентах. Размер загружаемых данных примерно 2.30 Гб, поэтому придется подождать несколько минут до окончания загрузки.
Примечание : Если вдруг загрузка прервется и у вас будет написано «Error! App ‘232330’ state is 0x402 after update job.» или похожая ошибка, то просто снова отправьте команду app_update 232330 validate и процесс продолжится с того места, где прервался.
После успешной загрузки, вы увидите следующее:
7. Выходим из SteamCMD нажатием сочетания клавиш Ctrl+C или отправив команду quit.
Затем переходим в папку загруженного сервера.
Поскольку сервер фактически установлен, мы можем попробовать сделать тестовый запуск.
У вас перед глазами пробежит много строк и в конце должно быть VAC secure mode is activated. Однако, как мы видим на скриншоте, в процессе загрузки сервера возникли некоторые ошибки. Иногда он запускается при их наличии, а иногда может выдать FATAL ERROR.
Если при запуске вы видите ошибку . /.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory, то не пугайтесь, она легко поправима:
Эта команда создаст символьную ссылку с директории sdk32 на директорию linux32 и при следующем запуске, таких ошибок вы уже не увидите:
Первичная настройка сервера
Теперь давайте перейдем к визуальной работе с файлами, поскольку это удобнее, чем в консоли. Для этого подключаемся по FTP к нашему серверу (в случае удаленной работы).
1. Заходим в папку /css/cstrike/cfg/
В этой папке должен находиться главный файл конфигурации сервера — server.cfg. Вы можете создать этот файл, найти его описание и параметры в интернете, затем загрузить готовый файл в указанную папку по FTP. Но я рекомендую воспользоваться лучшим подробным конфигом, который я нашел и подкорректировал — в нем все настройки описаны на русском языке и вам не составит труда изменить все под ваши нужды. Скачайте его (ПКМ->Сохранить как), затем откройте в любом текстовом редакторе, измените название сервера и другие необходимые настройки под себя, затем загрузите в папку css/cstrike/cfg на вашем сервере.
СКАЧАТЬ (19,4 KiB, 1 350 скачиваний)
2. В этой же папке вы увидите и другие файлы конфигурации. Обратите внимание на файлы motd_default.txt , motd_text_default.txt и mapcycle_default.txt. Эти файлы вы можете скачать, изменить под себя и загрузить на сервер, убрав суффикс default.
- motd.txt — файл используется для отображения информации в окне приветствия при подключении к серверу. Можно использовать HTML, картинки и даже музыку.
- motd_text.txt — простой текстовый вариант приветствия, если не используется motd.txt
- mapcycle.txt — файл со списком карт, смена карт происходит по списку из него. В него вы будете добавлять и новые карты, если будете загружать их на сервер.
3. При запуске сервера мы в логах видели надпись «anonymous game server account«. Для полноценной работы сервера и проверки игроков по STEAM_ID, нам нужно привязать сервер к Steam. Для этого переходим на эту страницу Steam, авторизуемся в своем аккаунте, внизу страницы вводим номер приложения : 240 и нажимаем кнопку Создать. Полученный идентификатор копируем и сохраняем где-нибудь, он нам скоро понадобится.
4. Чтобы сервер было проще запускать, мы можем создать специальный файл для запуска, в котором будет прописана команда запуска сервера с необходимыми параметрами. Позже, вы сможете добавить этот файл в автозагрузку (Cron) и сервер игры будет запускаться автоматически при перезапуске самого сервера Linux.
Источник
Counter-Strike: Global Offensive Dedicated Servers
This page outlines the basics of setting up and running Counter-Strike: Global Offensive Dedicated Server.
Contents
Downloading the CS:GO Dedicated Server
This describes the process of updating the CS:GO dedicated server application. These steps are required every time the game is updated. To automate this process for future updates, see SteamCMD#Automating SteamCMD.
2. Start SteamCMD. At the Steam> prompt, set your CS:GO Dedicated Server install directory.
3. Login in anonymously
4. Install or Update CS:GO. If this is your first time installing or if you are trying to verify the integrity of the server files:
If this is simply an update to an existing CS:GO dedicated server:
4. Once finished, type quit at the Steam> prompt to properly log off of the Steam servers.
Registering Game Server Login Token
CS:GO game servers and GOTV relays not logged in to a persistent game server account with a Game Server Login Token (GSLT) will only allow clients to connect from the same LAN RFC1918 addresses (10.0.0.0-10.255.255.255,172.16.0.0-172.31.255.255,192.168.0.0-192.168.255.255). If your server has a public routable IP address and clients need to connect from outside the server LAN then you need to get registered for GSLT.
To create your GSLTs, visit the GSLT creation utility and follow the instructions here: http://steamcommunity.com/dev/managegameservers
Each GSLT is restricted for use on one dedicated server instance only, and should be passed on command line with +sv_setsteamaccount THISGSLTHERE. You can also use command line setting -net_port_try 1 to avoid instances from reusing the same GSLT by accident.
Every game server operating with your GSLT must comply with game server operation guidelines outlined here: http://blog.counter-strike.net/index.php/server_guidelines/
Starting the Server
csgosl — a CSGO GUI frontend for Windows/Linux
csgosl is a graphical user interface for the Counter Strike Global Offensive Dedicated Server (CSGO server from now on). csgosl supports one-click install, update, start and stop server on windows and linux platforms (supported platforms). If you just want your own CSGO server up and running in no time this is the place for you. csgosl supports most mainstream server options. Advanced mode allows the experienced user access to most cvars and custom cvars allows cvars to be added to the GUI.
- Completely automatic install (steamcmd + srcds + metamod/sourcemod/plugins)
- Server update, automatic or manual
- Start/monitor/stop server
- Run multiple servers on same host
- Host lan only or public servers
- Host workshop maps and map groups
- Manage all your maps and create your own map groups using the map group editor
- Easily view and select all installed maps using map previews
- Greatly simplified server settings with reasonable defaults
- Advanced settings mode for the control freak (supports all cvars with in app help texts)
- RCON control via dedicated console or shortcut buttons
- Override settings in one place for all game modes/types
- Online help easily accessible from the application
- Custom cvar support
- GOTV support
- Comes preinstalled with sourcemod and metamod and some plugins.
Linux Scripts
Docker
If your server is running Docker, you can simply use:
The container will automatically update the game on startup, so if there is a game update just restart the container.
The config is located here: /home/steam/csgo-dedicated/csgo/cfg
If you want to launch another instance you can increment the environment variables, using -e (—env):
You can find the associated Docker Hub page here: https://hub.docker.com/r/cm2network/csgo/
CSGO Server Launcher
CSGO Server Launcher is a simple bash script to create and launch your Counter-Strike : Global Offensive Dedicated Server.
A Docker image 🐳 is also available.
Tested on Debian based distros (Ubuntu, Mint, . )
- start — Start the server with the PARAM_START var in a screen.
- stop — Stop the server and close the screen loaded.
- status — Display the status of the server (screen down or up)
- restart — Restart the server (stop && start)
- console — Display the server console where you can enter commands.
- update — Update the server based on the PARAM_UPDATE then save the log file in LOG_DIR and send an e-mail to LOG_EMAIL if the var is filled.
- create — Create a server (script must be configured first).
CS:GO Multiserver
A launch and update script similar to CSGO Server Launcher with support for multiple servers running on one machine. It was designed to make running LAN tournaments as painless and efficient as possible.
Its Highlights include:
- Guided setup and game update (csgo-server setup, csgo-server update)
- Game files are shared between instances, saving disk space and bandwidth
- Detailed configuration options for each instance
- Additional control upon launch via environment variables (MAPS=»de_inferno de_cache de_train» csgo-server @myinstance start)
- Console access and support for logfiles
LinuxGSM CSGO Server
LinuxGSM is command-line tool for quick, simple deployment and management of Linux dedicated game servers.
Features
- Backup
- Console
- Details
- Installer (SteamCMD)
- Monitor
- Alerts (Email, Pushbullet)
- Update (SteamCMD)
- Start/Stop/Restart server
Supported Servers
There are 100+ different game servers supported and rising. For a full list visit the website.
Links
Windows Software/Scripts
SteamCMD GUI
This tool allows the user to use SteamCMD on Windows without command lines and/or batch files.
pyr0s-csgo-server-launcher
A simple script to launch 3 different servers in any of the 4 game modes available. My First ever attempt at any sort of scripting.
Advanced Configuration
Configuring your new Counter-Strike: Global Offensive server differs from what server administrators have seen with previous dedicated servers. There are some primary differences, which we’ll cover here.
autoexec.cfg
The file has to be created in \csgo\cfg.
This file is executed before the first map starts. The valve.rc executes the autoexec.cfg and in the next line the cmd stuffcmds, which will execute the parameters with + from the commandline.
In your autoexec.cfg you can set cvars that have to be set only one time:
server.cfg
The server.cfg file can be found under \csgo\cfg. (make it if it doesn’t exist)
This file is executed every map change, and before the gamemode files listed below. Here is an example of a very simple server.cfg file:
gamemodes.txt
This file can be found under the \csgo\ folder.
Essentially, this file defines Valve’s standard «rules» for each game mode. For example, a classic casual game gives defuse kits to CTs automatically, while in a classic competitive game they are purchasable like in previous versions of CS. You should not edit this file because Valve may decide to change the rules for a particular game mode at any time. If you customize this file, your changes will be wiped out any time Valve chooses to push an update to this file.
Even though you shouldn’t edit this file, it’s still useful to use this file to determine how exactly to make a particular convar change. Find the section you want to edit, and you’ll see the group of appropriate convars you can set. Again, you will need to make your actual changes in gamemodes_server.txt.
Each section of the file is separated by the game type. The game types are Casual, Competitive, Arms Race (gungameprogressive), Demolition (gungametrbomb), and Deathmatch.
gamemodes_server.txt
This file must be created or otherwise generated from gamemodes_server.txt.example under the \csgo\ folder. This file allows the server administrator to customize each game mode for their own server. It overrides and defaults set by Valve in gamemodes.txt. With this file, for example, you can change the maxrounds for a game type from the default, or enable friendly fire but reduce the amount of damage friendlies deal.
IT IS IMPORTANT TO MAINTAIN THE SAME HIERARCHY AND SYNTAX AS GAMEMODES.TXT. Included with your server installation is a gamemodes_server.txt.example file to help you learn the syntax. There is no file specifically named gamemodes_server.txt in the standard server install. You must rename, copy, or make a new file called gamemodes_server.txt to be able to customize your game modes.
You can change the amount of bots, the way the bots populate the server and how chatty they are by updating the convars below:
Round Convars
The following convars can be changed to update how the rounds are played out. You can change from round limits to time limits, to how long you force players to freeze in place to buy to forcing the camera to only specatating your team members while dead. Each convar is set specifically for each game type, so you’ll have to go through each of the different game modes to get them all updated! These may be overridden by settings in cfg/gamemode_XXX.cfg and cfg/gamemode_XXX_server.cfg, the details of which are specified below.
Gun Game and Demolition Progression
You’ll find convars available to update how the server progresses individuals through the weapons in both Gun Game modes. You can set the weapon order and the kill requirements in order to move on to the next weapon. These convars are separated by team, so be careful to make changes for both sides or you could potentially unbalance the matches on your server.
As an example, here is a list of the convars of weapon progression on Arms Race for a single team:
Here is an example of the weapon progression on Demolition for a single team:
Note that Arms Race uses random weapons by default. To force the custom list to be used, set mp_ggprogressive_use_random_weapons to 0 .
gamemode_casual_server.cfg
Files gamemode_casual_server.cfg and gamemode_casual.cfg reside in the cfg directory. The latter (gamemode_casual.cfg) is configured by Valve, and contains the convars that are set at the beginning of each Classic Casual match (they are set each time the server loads a map). A similar file exists for each game mode (replace casual with the appropriate mode ie. competitive, or armsrace). The format of this file is simple, it is » convar setting //optional comment «. For example, from gamemode_casual.cfg:
Admins should not modify the gamemode_XXX.cfg files. Valve’s file naming convention suggests that these files may be modified in the future, and your settings may be overwritten. Instead, modify the file ending in _server.cfg you create.
Each gamemode_XXX.cfg file may have a corresponding gamemode_XXX_server.cfg file within the cfg directory. Valve’s file naming convention suggests that _server.cfg files will not be overwritten by future updates. Any settings specified in the _server.cfg file will override those in the original config file because the _server.cfg file is executed after it. This ordering is visible within gamemodes.txt .
Settings in gamemode_XXX.cfg and gamemode_XXX_server.cfg seem to override those within gamemodes_server.txt, and server.cfg. Furthermore, it’s easier to modify the settings in gamemode_XXX_server.cfg due to the formatting.
When modifying settings, the amount of spaces or tabs between convar and setting seems to be irrelevant, but there must be some. Comments are single-line C++ style, and must come only after a //.
Once you’ve launched your dedicated server, you can type in the following command to output all available convars that can be altered:
The game no longer uses maplist.txt files and the maps you play are now controlled by map groups. A server must be started with a mapgroup or workshop_collection or maps will not cycle correctly. See the included gamemodes_server.txt.example file for an example mapgroup.
GOTV Broadcasting
Counter-Strike: Global Offensive servers support UDP message-based GOTV broadcasting directly to connected clients, or via a tree of dedicated servers configured as GOTV relays. A more modern broadcasting solution allowing to transmit and playback streamed game data over HTTP, primarily via CDN, is new to CS:GO. For more details, please visit CS:GO Broadcast page.
Network Channel Encryption
Counter-Strike: Global Offensive network channels support client-server packet encryption. 3rd party client software can set encryption keys in CS:GO client process for connecting to specific 3rd party servers. For more details, please visit CS:GO Network Channel Encryption page.
FAQ and known issues
For known issues and workarounds, please visit CSGO DS known issues.
Источник