Jump to content



Photo

[Howto] Natural Selection 2 Linux 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 01 April 2015 - 06:23 PM

Installation

The installer will automatically download and configure a Natural Selection 2 server.

 

Prerequisites

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

 

Ubuntu

 

Ubuntu 32-bit

apt-get install speex:i386 libgtk2.0-0:i386 tmux mailutils postfix

Ubuntu 64-bit

apt-get install speex:i386 libgtk2.0-0:i386 mailutils postfix lib32gcc1

Debian

 

Debian 32-bit

apt-get install speex:i386 libgtk2.0-0:i386 mailutils postfix tmux ca-certificates

Debian 64-bit

dpkg --add-architecture i386

apt-get update

apt-get install speex:i386 libgtk2.0-0:i386 tmux mailutils postfix lib32gcc1 libstdc++6:i386

RHEL 6/CentOS 6

 

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

 

RHEL/CentOS 32-bit

yum install speex mailx tmux glibc

RHEL/CentOS 64-bit

yum install speex.i686 mailx tmux glibc.i686 libstdc++.i686

Install

 

1. Create a user and login.

adduser ns2server

passwd ns2server

su - ns2server

2. Download the script.

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

3. Make it executable.

chmod +x ns2server

4. Add Steam login details
You will need to enter your steam username and password to allow authentication to the steamCMD system. I recommend that you create a new Steam username just for the server.

nano ns2server
# Steam login
steamuser="username"
steampass="password"

5. Modify start Parameters.
Edit all the start parameters to meet your requirements.

nano ns2server
# Start vars
servername="NS2 Server"
defaultmap="ns2_summit"
port="27015"
webdomain="127.0.0.1"
webadminuser="admin"
webadminpass="password"
webadminport="8080"
maxplayers="18"
password=""

6. Run the installer and follow the instructions

./ns2server install

Usage

 

Running the Server

 

Start the server.

./ns2server start

Stop the server.

./ns2server stop

Restart the server.

./ns2server 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.

./ns2server update

Webadmin

 

You can access the Webadmin to make game configuration changes to the server.

http://localhost:8080/index.html

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.

./ns2server 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 01 April 2015 - 06:24 PM

Questions? Send me a PM with the subject NS2 Server


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