Dedicated server half life 2 linux

Установка серверов через SteamCMD (Linux)

Содержание

Описание

В сравнении со старым HLDSUpdateTool типом установки серверов SteamCMD мне показался более удобным. Во многом упрощен режим установки, благодаря этому менее опытные пользователи смогут быстрее установить сервер Half-Life или Counter-Strike.

Для создания серверов Half-Life и Counter-Strike в SteamCMD нужно проделать одни и те же действия.

Требования

Системные требования для создания сервера Half-Life 1 и Counter-Strike 1.6

Процессор: 1000 МГц и больше

Оперативная память: 128 Мб и больше

Место на жестком диске: 1.5 Гб и больше

Если система 64 битная то нужна библиотека поддержки 32 битных приложений
Ее можно установить введя команду

Создание сервера

Скачиваем архив с утилитой SteamCMD

Удаляем архив, т.к. он нам больше не понадобится:

Запускаем sh файл

Начнется скачивание и проверка последних обновлений для нашего SteamCMD. После завершения обновления, мы войдем в командную строку Steam

Теперь нужно войти в аккаунт Steam

Если у Вас включен SteamGuard, то на электронную почту придет сообщение с кодом подтверждения, его нужно ввести.

Для скачивания серверов можно не входить в свой аккаунт Steam, а воспользоваться анонимом.

После этого указываем директорию, в которую нужно устанавливать сервер.

где hl — папка в которой будет находится сервер

Приступаем к установке самого сервера

где 90 — steam_app_id нашей игры, в данном случае это Half-Life Dedicated Server

Источник

Dedicated server half life 2 linux

1,236 уникальных посетителей
28 добавили в избранное

Before you get to the server part, you need to forward some ports on your router so that Half-Life Dedicated Server (the tool we’re using) can use them, and clients from other networks can access those ports.
Open your start menu and type cmd and open the Command Prompt. Elevation is not required. In the command prompt, type the command ipconfig. A list of configurations for the network devices you have will appear. Find the one you’re using, and get the address for your Default Gateway. Type that address in the URL bar of your browser. NOTE: make sure you keep CMD open!! We will need it later. You should have a prompt appear to type a username and password. Most routers have the username and password admin, but some people, like me, have the username admin and a password. You can go to your router and there should be a sticker showing the default gateway password (it isn’t the one you use to connect to your router). If you can’t find it, you should look around the house for any other things that came with the router, or contact your ISP.

You’d think you could just go into Steam Tools and download the tool from there, but for unknown reasons, that version of the tool is broken. You need to download SteamCMD to get the fixed version of the tool. Extract the ZIP to any folder you want [if you have multiple drives, save it to the one with the most space, 3 GB+ is recommended]. Now, you can open SteamCMD and wait for it to download all the files it needs.

Once SteamCMD has finished downloading, you can sign in to your Steam account, though if you don’t want to, you can try using the anonymous account.

Create a batch file in your HLDS folder. The batch file tells HLDS what settings to use. Name the batch file with the name of the game/mod of which you want to host a server for. You can create more batch files for different mods/games.

The -game variable is not required for normal Half-Life.

If you want mods/other games, such as Counter-Strike, copy their folders from your Half-Life directory, which can be found by going to Half-Life’s properties in your Steam library, LOCAL FILES and then BROWSE LOCAL FILES. Copy the mod/game folder to your HLDS directory.

HLDS should be able to work at this point, though with only basic functions. Before we go any further, start your batch file for Half-Life and make sure you have your IP on your clipboard. Open Half-Life, open the console, and type connect and you should be able to join. If it says STEAM validation rejected, close the server and run the batch file again.

Читайте также:  Шрифты roboto для windows

If you’re able to join the server, you now need to see if other people from other networks can join. Search «what it my ip address» or just «ip» and your public IP address should appear. You can send this to playtesters of the server and they should be able to join if you port forwarded correctly.

To shut down your server, do not simply close the HLDS window, otherwise players will just lose connection. Type quit in the server console and players will be kicked from the server before HLDS closes with the message «Kicked: server shutting down.»

In this file you can change the server name, how fast players can move and add your own commands you want to run on server startup. It is recommended that you add // custom commands at the bottom of the file to enter your own commands. See section VII for a list of commands.

In ordinary deathmatch games such as Half-Life, Opposing Force, Team Fortress Classic and Deathmatch Classic, they have a mapcycle.txt file which allows you to change what maps you want in the server. After a match, the server uses that file to decide the next map. Plugins for AMX MOD X (see section VI) allow players to vote for the next map.

There are lots of handy commands in HLDS that you can use to make your server better. A lot of SV commands that work in Half-Life also work in HLDS, such as sv_airaccelerate. These commands can be added to your // custom commands section of your server.cfg file.

changelevel
Value:
Function: Changes the map without kicking out all players.

maxplayers
Value: 2-32
Function: Changes the amount of players that can be in the server. Changes are applied on the next changelevel

sv_maxspeed
Value: 10-
Function: Changes how fast players can walk. Jumping may be slowed down due the the bunnyhop cap implemented into the engine in 2003.

hostname
Value:
Function: sets the server name shown in server browser and leaderboard

sv_password
Value:
Function: Sets a password to the server. Players will need the password to connect to and join the server.

If you want more commands let me know in the comments.

Источник

Установка Half-Life Dedicated Server (HLDS) Win & Linux

rodgerland

Участник

Fenia

Участник

rodgerland

Участник

DeaD_MoroZ

Участник

скорей всего мне ни кто уже не ответит. но всё таки попробую
ставлю сервер на линух, всё по инструкции. вгетом скачал бинарник, сделал запускаемым, и после его запуска вижу

Enter ‘yes’ to accept this agreement, ‘no’ to decline: yes
sh: uncompress: команда не найдена
tar: Это не похоже на tar-архив
tar: Exiting with failure status due to previous errors

Shefs

Участник

скорей всего мне ни кто уже не ответит. но всё таки попробую
ставлю сервер на линух, всё по инструкции. вгетом скачал бинарник, сделал запускаемым, и после его запуска вижу

Enter ‘yes’ to accept this agreement, ‘no’ to decline: yes
sh: uncompress: команда не найдена
tar: Это не похоже на tar-архив
tar: Exiting with failure status due to previous errors

]# ln -s /usr/bin/gunzip /usr/bin/uncompress

Balalastik

Участник

Re: Ответ: Установка Half-Life Dedicated Server (HLDS)

Добрый день!
все сделал по инструкции, вот что вышло у меня в теминале после
./hlds_run -console -game cstrike +map de_dust -maxplayers 16 -autoupdate

/hlds_l$ ./hlds_run -console -game cstrike +map de_dust -maxplayers 16 -autoupdate
Auto detecting CPU
Using AMD Optimised binary.
Auto-restarting the server on crash
Updating server using Steam.
Checking bootstrapper version .
Updating Installation
Checking/Installing ‘Counter-Strike Base Content’ version 35

Checking/Installing ‘Linux Server Engine’ version 55

Checking/Installing ‘Half-Life Base Content’ version 12

HLDS installation up to date
CAsyncIOManager: 0 threads terminating. 0 reads, 0 writes, 0 deferrals.
CAsyncIOManager: 70 single object sleeps, 0 multi object sleeps
CAsyncIOManager: 0 single object alertable sleeps, 0 multi object alertable sleeps

Console initialized.
scandir failed:/home/balalastik/hlds_l/./valve/SAVE
scandir failed:/home/balalastik/hlds_l/./platform/SAVE
Protocol version 48
Exe version 1.1.2.6/Stdio (cstrike)
Exe build: 16:56:04 Mar 8 2010 (4883)
STEAM Auth Server
Server IP address 127.0.1.1:27015
scandir failed:/home/balalastik/hlds_l/./valve/SAVE
scandir failed:/home/balalastik/hlds_l/./platform/SAVE
[S_API FAIL] SteamAPI_Init() failed; unable to update local steamclient. Continuing with current version anyway.

couldn’t exec listip.cfg
couldn’t exec banned.cfg
scandir failed:/home/balalastik/hlds_l/./valve/SAVE
scandir failed:/home/balalastik/hlds_l/./platform/SAVE
[S_API FAIL] SteamAPI_Init() failed; unable to update local steamclient. Continuing with current version anyway.

Could not establish connection to Steam servers.
Reconnected to Steam servers.
VAC secure mode is activated.

Читайте также:  Нужно обновить установщик модулей windows перед тем как устанавливать этот пакет

как мне проверить сервер? у меня есть версия 45 Халфы , но она не заходит по ip пишет обновить клиент,что я сделал не так?
help!и где мне взячть клинет игры под win?

Установка Half-Life Dedicated Server (HLDS) в ОС Linux.

Источник

Dedicated server half life 2 linux

I’ve installed HLDS on a dedicated machine running CentOS 6 and opened all ports in this list using similar commands to these of course changing udp to tcp where necessary:

Server connects to master and VAC servers, however nobody can connect to the server and it’s not listed in favorites list (100% that ip/port is right).

If I turn off iptables it works as expected. I’m not an expert of using them so maybe I’m setting something wrong? For many other reasons I cannot leave iptables off.

Hi, thanks for your reply, swaping source/destination ports was a good point but in my case that wasn’t the cause of the problem.

Apparently default settings for my iptables (on CentOS 6) had REJECT rule at the end of the INPUT chain so when using iptables -A INPUT (which means append at the end of the chain) my rules were never reached as packets were rejected by the rule above. Solution was to use iptables -I INPUT .

I’ve installed HLDS on a dedicated machine running CentOS 6 and opened all ports in this list using similar commands to these of course changing udp to tcp where necessary:

Server connects to master and VAC servers, however nobody can connect to the server and it’s not listed in favorites list (100% that ip/port is right).

If I turn off iptables it works as expected. I’m not an expert of using them so maybe I’m setting something wrong? For many other reasons I cannot leave iptables off.

Источник

Dedicated server half life 2 linux

4,396 уникальных посетителей
33 добавили в избранное

This process is the same for all source engine games. If you already have the server files or have installed a SRCDS via SteamCMD before and know how to download server files, you can skip this.

Steam now uses SteamCMD (formerly HLDSUpdateTool) to download server files.

Download SteamCMD for your respective Operating System:
Windows
Linux

After you have downloaded SteamCMD, extract the steamcmd.exe to a folder on your server drive.

Note: In this guide the directory will be the root of the Hard Drive: E:\
This makes it easier to send the directory command as it is shorter.

However, you can paste text to CMD prompts:

Run the steamcmd.exe to install the tool’s files, the dialog will appear installing files:

Note: Do not install server files within the SteamCMD folder.
While SteamCMD is downloading the tool, go ahead and setup your server directory. For the sake of this guide and ease of cd changes in the tool, I use the root of my drive: E:\hl2mp

You can make a folder anywhere except within the SteamCMD folder!

Once SteamCMD has completed downloading it’s files, the dialog box will resemble:

Half Life 2 Deathmatch uses the APP ID 232370, you can login anonymously to download the server files (see all app ID’s here):

Assuming you have already created your server folder (E:\hl2mp) send the following:

Note: Use your server directory!
Note: Here is a list of all Steam Application ID’s for reference to installing other server games. This process is the same for all game servers, they just have a different (unique) Application ID.

This may take some time to download all the necessary files, when complete it will resemble:

Send the quit command and hit Enter,

There are many resources out there for Port Forwarding. This guide is aimed at servers that are hosting on a provider or system other than the game client. If you are hosting your server on a game server provider, you don’t need to worry about this.

The cfg file is what contains the settings (in the form of cvars) for your server.

After installing your server, by default the server.cfg does not exist. You will need to create one (or see this server.cfg example [www.dropbox.com] )

To create a new server.cfg, create the cfg within a text editor such as notepad,
or Sublime Text [www.sublimetext.com] and save the file as server.cfg

The file should be located at:

Create this file using notepad—simply right-click in the folder and select New⇒Text Document. Don’t name it anything yet; just open it.

Читайте также:  Phone calls from microsoft windows

For a complete list of Half Life 2 Cvars, see this.

One of the most important things to keep in mind while writing the server.cfg is the syntax. It is very simple actually:

// means the server will ignore everything behind // on that line, so if you want to stop using a variable, put // in front of it — this commonly referred to as «commenting out»

Every variable has to be put on its own line, or else it will not be read and/or give an error.
If you have spaces somewhere (the name of the server for example), be sure to write it between quotes.

Here are some explanations on the most important variables:

sv_maxupdaterate 100: This variable sets the maximum amount of updates the server will send to each client per second. If you set this to 100, your server will run optimally because the tickrate automatically adjusts this value. Having a tickrate of 33 will make this variable 33 as well. Thus, a setting of 100 for this variable is more or less a “one size fits all.”

sv_minupdaterate 20: This variable is the opposite of maxupdaterate. During the years I’ve been hosting servers, I’ve found out that when the updates drop below 20 per second, clients start to experience lag. That’s why we set this to 20; just like maxupdaterate, this value fits all servers.

sv_maxrate: This variable probably has the most impact on the quality of the server performance. It’s the maximum amount of data sent to one client per second. If you don’t have a great connection, you can set this variable to make your server run perfectly. As I explained above, this has something to do with the maxplayers of the server. To calculate this variable we use a formula; it’s simple and 90% accurate.

Here [www.dropbox.com] is an example server.cfg file you can download and edit.

(This section will be re-written)

Every time a player enters a HL2:DM server online, a message of the day screen welcomes them. There’s a default MOTD, but if you’re paying for your own server, you probably want to customize it. This guide will show you how.

First, we’ll look at the actual MOTD screen:

There’s two sections that you are able to customize: the host banner on top and the message of the day which takes up the majority of the screen on the bottom. These two sections are actually just web pages (html files), which can be entered into the files on the server or hosted on your own web server/web host. The two files to control these sections are “host.txt” for the host banner, and “motd.txt” for the MOTD. You can find these in your server’s hl2dm directory at hl2dm/hl2mp/. Note that this is NOT the same directory as the server.cfg file that you use to change server settings. The server.cfg file is located in hl2dm/hl2mp/cfg/.

The default host banner and MOTD run off of Valve’s web servers. The default host.txt and motd.txt files contain only one line which is a URL to the website you wish to have displayed. You can either use this method if you have your own hosting or you can just fill the .txt file with HTML code. If you have multiple servers with the same banner, it’s best to use web hosting so you only have to change the banner in one place.

One very important thing to realize about the MOTD and host banner is that they change sizes depending on the resolution the player is running at. The following values are in pixels, you can click on the screen resolutions to see what the MOTD looks like on that resolution:

The ratio of width to height for the host banner is 5:1, and the ratio of width to height is 2:1. You have two choices with the host banner: either make it one large size and have it be cropped for people on lower resolutions (which is what I believe Valve does), or you can use some CSS in your HTML code to automatically resize the banner no matter what resolution a player is using. This is the method we use, and it’s a simple little trick.

Источник

Оцените статью