Gmod dedicated server linux

Установка SRCDS Linux Garry’s Mod 10

1. Создадим нам отдельного пользователя. Его имя будет gmod.

wget http://www.steampowered.com/download/hldsupdatetool.bin chmod +x hldsupdatetool.bin ./hldsupdatetool.bin ./steam

Начинается инсталляция сервера.
2. Первым делом определимся, хотим ли мы скачать дополнительный контент.

2.1. Выполняем следующее:
./steam — command update — game tf — dir tf0
./steam — command update — game «Counter-Strike Source» — dir css0
./steam — command update — game dods — dir dods

TF — TeamFortress 2
«Counter-Strike Source» — Ваш Кэп
DODS — DayOfDefeat: Source

./steam -command update -game garrysmod -dir gmod
Собственно, скачивание Garry’s Mod мода.

./steam -command update -game garrysmod -dir gmod

и перед нами откроется аналог Total Commander.
3.1. Соответственно мы идём в папку tf0 и копируем из неё папку tf

(/home/gmod/srcds_garrysmod/tf0/orangebox/) в папку orangebox

(/home/gmod/srcds_garrysmod/orangebox/).
3.1.1. Теперь можем удалить папку tf0, ведь мы всё скопировали!
3.2.Из папки css0/css нужно взять в cstrike (/home/gmod/srcds_garrysmod/css0/cstrike/), скопировать в ту же orangebox и удалить css0.
3.3. Проделать с остальным контентом то же самое.
4. Итак, сервер есть, только он полностью чист и не настрен. Что делать?! За что взяться. 11
Возьмёмся за конфигурацию. Для начала перейдём в cfg (/home/gmod/srcds_garrysmod/orangebox/garrysmod/cfg)
Создадим файл dds.cfg (вместо server.cfg).
В него впишем следующее:

hostname «смените имя сервера»
rcon_password «смените пароль«

sv_allowupload 1
sv_allowdownload 1
sv_alltalk 1
sv_use_steam_voice 0 //Тут будьте осторожны, для HLDJ эта переменная — счатстье
sv_tickrate 90
sv_defaultgamemode «sandbox»
sv_consistency 0
sv_stats 1
exec banned_user.cfg
exec banned_ip.cfg
writeid
writeip
sv_rcon_maxfailures 5
sv_rcon_banpenalty 1440
log on
sv_log_onefile 0
sv_logfile 1
sv_logbans 1
sv_logecho 1
fps_max 600
sv_minrate 0
sv_maxrate 25000
sv_minupdaterate 10
sv_maxupdaterate 66
net_maxfilesize 50
sv_cheats 0
sv_timeout 900
sbox_noclip 1/0 //Разрешить ли полёт?
sbox_godmode 1/0 //Разрешить ли бессмертие/режим бога?
sbox_plpldamage 1/0 //1 — откл. нанесение урона игроками друг другу, 0 — наоборот

Читайте также:  Добавить сетевую папку линукс

Есть?
5. Перейдём к запуску.

Источник

Linux

Set the password for the account- use something secure, using letters and numbers and mixed case.

Login as gmod before continuing.

Make a folder for your server

Go to your home folder if not already there:

Quick Installer

Just use this five second script if you want to:

#!/bin/bash echo "Garry's Mod Installer" echo "A screen may ask you to agree, just type yes when this happens!" echo "Starting in five seconds!" sleep 5 wget http://www.steampowered.com/download/hldsupdatetool.bin chmod +x hldsupdatetool.bin ./hldsupdatetool.bin ./steam ./steam -command update -game tf -dir . ./steam -command update -game garrysmod -dir . echo "Installed! Any problems should have been reported!"
nano installgmod.sh Paste it into there (copy it, then when nano is up RIGHT CLICK if you're using putty!) chmod +x installgmod.sh ./installgmod.sh

It should then do everything for you unless there is a problem.

Problems

If you get the «lib/ld-linux.so.2: bad ELF interpreter: No such file or directory.» problem, it is associated with running a 64 bit os. For some odd reason, linux does not install the 32 bit gcc libs REQUIRED to run the bin file on a 64 bit os. Follow the directions below to make it work. This also works if you get this error «bash: ./hldsupdatetool.bin: No such file or directory» you may be missing lib32gcc1, follow the directions below.

This works on Centos 6.0, and requires a sudo bump up or root console:

If you are running Ubuntu run this as root:

You can read about the problem here.

Installing Steam (Manual Way)

Download the dedicated server update tool, make it executable and run it.

wget http://www.steampowered.com/download/hldsupdatetool.bin chmod +x hldsupdatetool.bin ./hldsupdatetool.bin

You will need to agree to the terms of the license agreement — type ‘yes’ and press return.

If you receive an error about uncompressing, make a symbolic link to the gunzip tool called «/usr/bin/uncompress». If you already have a tool called uncompress, be sure to move it away from /usr/bin/uncompress first.

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

Now run Steam — Providing you have an active Internet connection and the Steam servers are up, it will update itself.

Читайте также:  Linux yum install all packages

Now we want to install Garry’s Mod.

Installing GM10 Content

./steam -command update -game tf -dir . ./steam -command update -game garrysmod -dir .

This will download the Team Fortress 2 and Garry’s Mod content. You have to download the Team Fortress 2 Content so that you get the latest Lin-Bins for your server.

./steam -command update -game "Counter-Strike Source" -dir . ./steam -command update -game garrysmod -dir .
If css does not mount, open up the css folder (root/css) and move the cstrike folder in it to the orangebox folder (root/orangebox).

This will download the Counter Strike Source and Garry’s Mod content, if you don’t want to download the Team Fortress 2 content, but it is not confirmed that it will download the latest Lin-Bins for your server!

Installing extra game content

Currently there are issues with some add-ons related to filename case-sensitivity on most Linux filesystems. In some situations running a shell script to recursively change the filenames to lowercase solves this issue. Alternatively you can move your linux server installation to a JFS partition.

Optionally Creating a Startup Script

You can now in theory just run the server with this command: orangebox/srcds_run -console -game garrysmod +maxplayers 16 +map gm_construct -autoupdate

(you need to be in the orangebox folder and then run ./srcds_run -console -game garrysmod +maxplayers 16 +map gm_construct -autoupdate)

However if you close SSH your server will close too.

We want to attach our GMod server to a virtual screen so we can log off and come back later or share the screen with other users (Other admins for example).

Open up a file called startgmod.sh with your favourite editor, for example:

Enter the following into the file:

#!/bin/bash echo "Starting up Garry's Mod 10 server." sleep 5 screen -A -m -d -S gm10server ./srcds_run -console -game garrysmod +maxplayers 16 +map gm_construct -autoupdate echo "Started. Type screen -x to resume!"

You may wish to edit maxplayers and map.

Читайте также:  Zabbix linux proc num

Once you’ve got to this stage you’re good to go. Make the script executable before running it:

If server gives an error «Segmentation failed» and you’re using 64bit linux, you can try launching directly srcds_i486 instead of srcds_run.

Everyday Server Operations

Starting Up

Shutting Down

This resumes your screen session, sharing it with any other users. If the server is still active with players, it’s advisable to shut it down by typing:

Once you’ve done that, press Ctrl+C+X to kill the screen.

If it’s hung, just press Ctrl+C+X.

Administration

You’re sitting at the console of your server.

To disconnect from screen, type Ctrl+A+D.

Trouble Shooting

Segmentation Fault

You have probably overwitten the binary files and you need to redownload this,

cd /srcds/ rm -rf bin ./steam -command update -game tf -dir . -verify_all

Invalid game type ‘garrysmod’ sepecified

(Or: orangebox/srcds_run: No such file or directory)

You are not in the orangebox folder.

from there you can run srcds_run

./srcds_run -console -game garrysmod +maxplayers 16 +map gm_construct -autoupdate

Access denied on srcds_run

You must chmod the srcds_run,

cd /srcds/orangebox/ chmod 0755 srcds_run

High CPU Usage

This is a very common issue with most recent distros of Linux. Especially servers with Dual Core processors.

I suggest looking here for steps on how to recompile your Linux Kernel to support SRCDS.

lua_shared.so error

Valve recently upgraded their Linux compiling system, and upgraded their libraries to higher versions then that are in most distributions.

The safest fix it to manually compile libstdc++, however the easiest and quickest fix it just to downgrade the shared objects that the server will use, however this may provide unwanted results.

Vehicles crash the server

This is a GCC bug, and a fix is available.

This seems to have been fixed.

Источник

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