Проверенный
Пользователь
- Сообщения
- 1,032
- Реакции
- 828
- Помог
- 10 раз(а)
Небольшое руководство о том, как поднять собственный сервер CS 1.6
- Для написании статьи был задействован виртуальный сервер VDS от хостинг-компании майарены на платформе Debian 7_x86
- Если у Вас установлена x64-разрядная система, то перед прочтением статьи заранее установите необходимую "либу" для дальнейшей корректной работы сервера.
Для систем: Ubuntu/Debian 64-Bit выполните команду в терминале: sudo apt-get install lib32gcc1
Для систем: RedHat/CentOS выполните команду в терминале: yum install glibc libstdc++
Для систем: RedHat/CentOS 64-Bit выполните команду в терминале: yum install glibc.i686 libstdc++.i686
Для систем: RedHat/CentOS выполните команду в терминале: yum install glibc libstdc++
Для систем: RedHat/CentOS 64-Bit выполните команду в терминале: yum install glibc.i686 libstdc++.i686
- Первым делом мы создадим нового пользователя (для запуска HLDS). По умолчанию при создание нового пользователя директория имеет следующий путь: /home/hlds. При добавлении нового пользователя нас запросят ввести пароль, повторить пароль, ввести дополнительные данные (необязательно) и подтвердить корректность информации.
root@public:~# adduser hlds
Adding user `hlds' ...
Adding new group `hlds' (1002) ...
Adding new user `hlds' (1002) with group `hlds' ...
Creating home directory `/home/hlds' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for hlds
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
- Вторым делом мы создадим дополнительную директории для выкачивание специальной утилиты SetamCMD, которая в свою очередь позволит загрузить нам свеженький HLDS-сервер.
root@public:~# mkdir /home/hlds/platform
- Перейдем непосредственно к самой загрузке утилиты.
root@public:~# cd /home/hlds/platform
root@public:/home/hlds/platform# wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
--2017-01-19 17:19:51-- https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
Resolving steamcdn-a.akamaihd.net (steamcdn-a.akamaihd.net)... 87.245.202.16, 87.245.202.57
Connecting to steamcdn-a.akamaihd.net (steamcdn-a.akamaihd.net)|87.245.202.16|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3170982 (3.0M) [application/octet-stream]
Saving to: `steamcmd_linux.tar.gz'
100%[======================================>] 3,170,982 2.17M/s in 1.4s
2017-01-19 17:19:54 (2.17 MB/s) - `steamcmd_linux.tar.gz' saved [3170982/3170982]
- Разархивируем утилитку.
root@public:/home/hlds/platform# tar -xvzf steamcmd_linux.tar.gz
- Ну и, пожалуй, запустим её.
root@public:/home/hlds/platform# ./steamcmd.sh
Redirecting stderr to '/root/Steam/logs/stderr.txt'
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
[ 0%] Checking for available update...
[ 0%] Downloading update (0 of 10173 KB)...
[ 0%] Downloading update (2235 of 10173 KB)...
[ 21%] Downloading update (4012 of 10173 KB)...
[ 39%] Downloading update (4465 of 10173 KB)...
[ 43%] Downloading update (4984 of 10173 KB)...
[ 48%] Downloading update (5346 of 10173 KB)...
[ 52%] Downloading update (5665 of 10173 KB)...
[ 55%] Downloading update (6107 of 10173 KB)...
[ 60%] Downloading update (6693 of 10173 KB)...
[ 65%] Downloading update (7528 of 10173 KB)...
[ 74%] Downloading update (8267 of 10173 KB)...
[ 81%] Downloading update (8609 of 10173 KB)...
[ 84%] Downloading update (8992 of 10173 KB)...
[ 88%] Downloading update (9582 of 10173 KB)...
[ 94%] Downloading update (10173 of 10173 KB)...
[100%] Downloading update (10173 of 10173 KB)...
[100%] Download Complete.
[----] Applying update...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching...
Redirecting stderr to '/root/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Downloading update (0 of 7058 KB)...
[ 0%] Downloading update (2070 of 7058 KB)...
[ 29%] Downloading update (3708 of 7058 KB)...
[ 52%] Downloading update (4618 of 7058 KB)...
[ 65%] Downloading update (5136 of 7058 KB)...
[ 72%] Downloading update (5567 of 7058 KB)...
[ 78%] Downloading update (6039 of 7058 KB)...
[ 85%] Downloading update (6489 of 7058 KB)...
[ 91%] Downloading update (6859 of 7058 KB)...
[ 97%] Downloading update (7058 of 7058 KB)...
[100%] Download complete.
[----] Installing update...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching Steamcmd...
Redirecting stderr to '/root/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...Created shared memory when not owner SteamController_Shared_mem
OK.
Steam>
- Авторизуемся в ней от имени анонима.
Steam>login anonymous
Connecting anonymously to Steam Public...Logged in OK
Waiting for license info...
- Укажем путь куда загрузим полноценный HLDS-сервер.
Steam>force_install_dir /home/hlds
- Приступим к загрузке.
Steam>app_update 90 validate
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Update state (0x61) downloading, progress: 0.00 (0 / 63579018)
Update state (0x61) downloading, progress: 22.77 (14476949 / 63579018)
Update state (0x61) downloading, progress: 40.37 (25666967 / 63579018)
Update state (0x61) downloading, progress: 56.86 (36152727 / 63579018)
Update state (0x61) downloading, progress: 70.53 (44844614 / 63579018)
Update state (0x61) downloading, progress: 85.38 (54281798 / 63579018)
Update state (0x61) downloading, progress: 98.35 (62530442 / 63579018)
Error! App '90' state is 0x6 after update job.
Steam>
- Видим ошибку, ничего страшного, такое бывает, повторим команду.
Steam>app_update 90 validate
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Update state (0x5) validating, progress: 0.00 (0 / 0)
Update state (0x11) preallocating, progress: 92.97 (686293130 / 738158916)
Update state (0x61) downloading, progress: 1.30 (9579281 / 738158916)
Update state (0x61) downloading, progress: 3.76 (27723531 / 738158916)
Update state (0x61) downloading, progress: 7.15 (52793185 / 738158916)
Update state (0x61) downloading, progress: 10.12 (74737807 / 738158916)
Update state (0x61) downloading, progress: 13.18 (97297331 / 738158916)
Update state (0x61) downloading, progress: 16.47 (121572650 / 738158916)
Update state (0x61) downloading, progress: 19.51 (144045027 / 738158916)
Update state (0x61) downloading, progress: 22.61 (166934604 / 738158916)
Update state (0x61) downloading, progress: 25.96 (191650977 / 738158916)
Update state (0x61) downloading, progress: 29.67 (219045714 / 738158916)
Update state (0x61) downloading, progress: 33.76 (249180936 / 738158916)
Update state (0x61) downloading, progress: 38.30 (282720713 / 738158916)
Update state (0x61) downloading, progress: 41.08 (303219453 / 738158916)
Update state (0x61) downloading, progress: 44.44 (328005853 / 738158916)
Update state (0x61) downloading, progress: 44.44 (328005853 / 738158916)
Update state (0x61) downloading, progress: 44.65 (329599753 / 738158916)
Update state (0x61) downloading, progress: 46.65 (344323522 / 738158916)
Update state (0x61) downloading, progress: 50.67 (374012566 / 738158916)
Update state (0x61) downloading, progress: 54.99 (405944218 / 738158916)
Update state (0x61) downloading, progress: 60.14 (443954326 / 738158916)
Update state (0x61) downloading, progress: 62.63 (462319046 / 738158916)
Update state (0x61) downloading, progress: 64.09 (473057757 / 738158916)
Update state (0x61) downloading, progress: 65.29 (481956283 / 738158916)
Update state (0x61) downloading, progress: 65.29 (481956283 / 738158916)
Update state (0x61) downloading, progress: 67.32 (496950092 / 738158916)
Update state (0x61) downloading, progress: 68.71 (507159569 / 738158916)
Update state (0x61) downloading, progress: 68.71 (507159569 / 738158916)
Update state (0x61) downloading, progress: 69.73 (514709103 / 738158916)
Update state (0x61) downloading, progress: 72.95 (538497442 / 738158916)
Update state (0x61) downloading, progress: 74.15 (547328303 / 738158916)
Update state (0x61) downloading, progress: 74.15 (547328303 / 738158916)
Update state (0x61) downloading, progress: 75.03 (553855982 / 738158916)
Update state (0x61) downloading, progress: 78.00 (575748716 / 738158916)
Update state (0x61) downloading, progress: 81.59 (602238620 / 738158916)
Update state (0x61) downloading, progress: 86.06 (635231427 / 738158916)
Update state (0x61) downloading, progress: 88.98 (656814322 / 738158916)
Update state (0x61) downloading, progress: 89.56 (661093560 / 738158916)
Update state (0x61) downloading, progress: 92.00 (679139990 / 738158916)
Update state (0x61) downloading, progress: 92.15 (680188566 / 738158916)
Update state (0x61) downloading, progress: 92.32 (681471853 / 738158916)
Update state (0x61) downloading, progress: 94.07 (694409850 / 738158916)
Update state (0x61) downloading, progress: 95.56 (705403074 / 738158916)
Update state (0x61) downloading, progress: 97.43 (719219649 / 738158916)
Update state (0x61) downloading, progress: 98.36 (726017316 / 738158916)
Update state (0x61) downloading, progress: 98.70 (728587665 / 738158916)
Update state (0x61) downloading, progress: 98.86 (729770905 / 738158916)
Success! App '90' fully installed.
Steam>
- Сервер успешно загрузился, но на всякий случай повторим команду, что бы убедится наверняка, что все файлы загрузились.
Steam>app_update 90 validate
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Update state (0x5) validating, progress: 41.58 (121764961 / 292827978)
Update state (0x5) validating, progress: 99.47 (291270405 / 292827978)
Update state (0x5) validating, progress: 62.71 (462883261 / 738158916)
Update state (0x5) validating, progress: 87.37 (644913618 / 738158916)
Success! App '90' fully installed.
Steam>
- Как видно, валидация прошла успешно, все файлы на месте.
- Выходим из программы
Steam>quit
- Создадим заранее парочку директорий и скопируем одну из необходимых "сошек", чтобы в дальнейшем не было ошибок при запуске сервера.
root@public:/home/hlds/platform# mkdir /home/hlds/.steam
root@public:/home/hlds/platform# mkdir /home/hlds/.steam/sdk32
root@public:/home/hlds/platform# cp /home/hlds/steamclient.so /home/hlds/.steam/sdk32
root@public:/home/hlds/platform# cd /home/hlds
- Рекурсивно изменим имя пользователя и права доступа файлов/директорий для нового пользователя HLDS, так-как мы изначально работали из под root, соответственно файлы "принадлежали" ему.
root@public:/home/hlds# chown -R hlds:hlds /home/hlds/
root@public:/home/hlds# chmod -R 700 /home/hlds/
- Попробуем запустить сервер от имени созданного пользователя HLDS.
root@public:/home/hlds# sudo -u hlds ./hlds_run -game cstrike -pingboost 3 +maxplayers 25 +map de_dust2 +ip 37.230.210.128 -port 27017
Auto-restarting the server on crash
Console initialized.
Using breakpad crash handler
Setting breakpad minidump AppID = 10
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 13:12:29 Aug 29 2013 (6153)
STEAM Auth Server
Server IP address 37.230.210.128:27017
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
couldn't exec listip.cfg
couldn't exec banned.cfg
Connection to Steam servers successful.
VAC secure mode is activated.
- Сервер успешно запустился.
Последнее редактирование модератором: