Jump to content



Photo

[Howto] Garry´s Mod Server Newbie Friendly


  • This topic is locked This topic is locked
1 reply to this topic

#1 Arctic

Arctic

    Haphost Staff

  • Moderators
  • 341 posts
  • LocationGermany

Posted 31 March 2015 - 03:11 PM

Installation

 

The installer will automatically download and configure a Garry's Mod server.

 

Prerequisites

 

Before installing, please ensure you have all the dependencies required to run the script.

 

 

Ubuntu

 

Ubuntu 32-bit

apt-get install tmux gdb mailutils postfix libstdc++6:i386

Ubuntu 64-bit

apt-get install tmux gdb mailutils postfix lib32gcc1 libstdc++6:i386

Debian

 

Debian 32-bit

apt-get install tmux gdb mailutils postfix ca-certificates

Debian 64-bit

dpkg --add-architecture i386

apt-get update

apt-get install tmux gdb mailutils postfix ca-certificates lib32gcc1

RHEL 6/CentOS 6

 

Note: EPEL repository or equivalent is required.
http://fedoraproject.org/wiki/EPEL

 

RHEL 6/CentOS 6 32-bit

yum install tmux gdb mailx postfix glibc

RHEL 6/CentOS 6 64-bit

yum install tmux gdb mailx postfix glibc.i686 libstdc++.i686

Install

 

1. Create a user and login.

adduser gmodserver

passwd gmodserver

su - gmodserver

2. Download the script.

wget http://danielgibbs.co.uk/dl/gmodserver

3. Make it executable.

chmod +x gmodserver

4. Run the installer and follow the instructions.

./gmodserver install

Usage

 

Running the Server

 

Start the server.

./gmodserver start

Stop the server.

./gmodserver stop

Restart the server.

./gmodserver restart

Updating the Server

 

The server can be updated automatically using SteamCMD. The update option will stop the server, run the SteamCMD update and start the server again.

./gmodserver update

To restart the server while updating use update-restart.
It is recommended that you restart the server when an update is completed to apply the update.

./gmodserver update-restart

Server Validate

 

It is possible to use the validate option when updating the server.

Validate is a command that will check all the server files to make sure they match the SteamCMD files.
This command is useful if you think files may be missing or corrupted.
Note: Validation will overwrite any files that have been changed. This may cause issues with customized servers. For example if you customize mapcycle.txt this file will be overwritten to the server default. Any files that are not part of the default installation will not be affected.
./gmodserver validate

To restart the server while validating use validate-restart.

./gmodserver validate-restart

Running on Boot

 

To run gmodserver on boot add the command in to the rc.local file.

nano /etc/rc.local
su - gmodserver -c '/home/gmodserver/gmodserver start'

Monitoring the Server

 

The script can monitor the server to ensure it is online. Should the server go offline, the monitor will attempt to start it again.

./gmodserver monitor

Note: see Automation on how to get monitor to run automatically.

 

Game Server Query Plugin

 

The Game Server Query plugin adds improved monitoring over the standard monitoring feature.

gsquery.py queries the server to see if it responds with its server details. If it fails to respond the server will be restarted.

This is particularly useful if a server has locked up or frozen but the server instance/process is still running.

 

Install Game Server Query Plugin

 

Download gsquery.py to the same directory as the main script.

wget http://danielgibbs.co.uk/dl/gsquery.py

Make it executable.

chmod +x gsquery.py

To test is works run monitor and it will state that gsquery.py was detected.

 

 

Source


any support PM's be Ignored please use the Support section for it

 

Support


#2 Arctic

Arctic

    Haphost Staff

  • Moderators
  • 341 posts
  • LocationGermany

Posted 31 March 2015 - 03:21 PM

Questions? PM with subject Garry's MOD

 

 

 

Close


any support PM's be Ignored please use the Support section for it

 

Support





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users