Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/feed-rss2.php on line 8
Game Servers – AKLWEB HOST LLC Support Center https://support.aklwebhost.com Thu, 09 Jan 2020 19:17:59 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 Terraria Server with TShock on Linux https://support.aklwebhost.com/knowledgebase/terraria-server-with-tshock-on-linux/ https://support.aklwebhost.com/knowledgebase/terraria-server-with-tshock-on-linux/#respond Tue, 26 Nov 2019 07:58:53 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2341 Terraria is a MMORPG based on mining, building, and fighting. Some people say its a 2D version of Minecraft, but that wouldn’t do justice to Terraria’s offerings – not by a long shot.

In this guide, I’ll show you step by step how to make a Terraria server with TShock on Linux. You could even setup multiple Terraria servers.

Some basic Linux knowledge is recommended. At the very least, you should understand how to use SSH.

By the end of the tutorial, you will be able to invite friends over to join your epic quests.

Prerequisites

This tutorial is based on Ubuntu 14.10, but more recent Ubuntu or Debian flavors will work. For other Linux versions, the package names may differ but most of the steps and configuration will be the same.

We will start off with a new Ubuntu 14.10 server on Aklwebhost.

Terraria uses quite a bit of memory, especially for large worlds. For instance, a Aklwebhost server with 1024MB RAM will only support a small world with a few players.

Security

A clean Ubuntu-based image on Aklwebhost starts with access to basic services. Only NTP and SSH ports are opened. If you want to host other services, then you might want to secure your incoming traffic and move your SSH port to something other than the default port.

This guide doesn’t cover all the changes needed to secure your server – there are other guides on Aklwebhost Docs for that. Remember, Terraria uses TCP port 7777 by default.

Basic Setup

We’ll create a basic user to run the Terraria server, since we don’t want to run the server as root. After that, we’ll install the necessary packages.

Creating A User

Log in to your server as root and create a new user for your Terraria server. You may receive some error messages about missing locales. Ignore those for now.

adduser terraria

The system will ask for a new UNIX password. Enter a fairly secure random password and remember it (or jot it down).

Now, the system will ask for some user details. You can just press Enter to leave these empty.

When the system asks you to confirm the information (“Is the information correct?”), press Y followed by Enter.

Installing Packages

Terraria is a game based on the Microsoft “.NET” framework. The Linux implementation of “.NET” is called “mono”. We’ll install only the necessary packages to get the game running and some support packages.

apt-get -y install wget unzip screen \
    libmono-corlib4.0-cil libmono-sqlite4.0-cil libmono-system-core4.0-cil libmono-system-net4.0-cil \
    libmono-system-runtime4.0-cil mono-runtime mono-runtime-sgen libmono-corlib4.0-cil \
    libmono-sqlite4.0-cil libmono-system-core4.0-cil libmono-system-net4.0-cil \
    libmono-system-runtime4.0-cil  mono-runtime mono-runtime-sgen libmono-data-tds4.0-cil \
    libmysql6.4-cil libmono-system-runtime-serialization4.0-cil \
    libmono-system-runtime-serialization-formatters-soap4.0-cil libmono-system-data-linq4.0-cil \
    libmono-system-xml-linq4.0-cil libmono-system-xml-serialization4.0-cil libmono-system-xml4.0-cil

Your system is now ready to run Terraria.

Installing TShock

At this point, you need to be logged into your server as user “terraria”.

su terraria

Download and unzip a release of TShock. You can check the official TShock website for newer releases. The Terraria server download is included with TShock.

wget -O tshock.zip 'https://github.com/NyxStudios/TShock/releases/download/v4.2.9/tshock_4.2.9.zip'
unzip tshock.zip -d ~/tshock

Starting TShock For The First Ttime

The first time you start TShock, you must join your server to make yourself the administrator. Start the server.

cd ~/tshock
mono TerrariaServer.exe

The gameserver will start and show you the server version. After that, it will ask you what world you would like to start. Since this is a new server, there are no previous worlds. We’ll create a new one.

The larger the world, the more memory you’ll need. Remember, a basic Aklwebhost server with 1024MB RAM will only support a small world.

  • Press N followed by Enter for a new world.
  • Choose the size that you would like.
  • Type a (short) name for your world, followed by Enter.

The server will now start generating your new world. When it has finished, you’ll be back in the main selection menu.

  • Choose your newly generated world by pressing 1, followed by Enter.
  • Enter a port to listen on, or just press Enter to use the default Terraria port 7777.

Your world will be loaded and TShock will show you an authorization code.

TShock Notice: To become SuperAdmin, join the game and type /auth 2044111

This token will display until disabled by verification. (/auth-verify)

Write this code down and start Terraria.

Tip: Use windowed mode in Terraria so that you can switch between your SSH session and the game.

  • Go to Multiplayer -> Join.
  • Select or create a character.
  • Enter the IP of your Aklwebhost server.
  • For the server port, use the default 7777 or the port configured on your server.

Congratulations, you’ve just entered your new world. Now it’s time to authenticate as the administrator.

  • In your game window, press Enter.
  • Type /auth XXXXXXX replacing XXXXXXX with the authentication code displayed when your server was started.

The server will confirm your authentication code and display a message.

You are now superadmin, please do the following to finish your install:
/user add <username> <password> superadmin
Creates: <username> with the password <password> as part of the superadmin
group.
Please use /login <username> <password> to login from now on.
If you understand, please /login <username <password> now, and type
/auth-verify

Note: If the text went away too fast, press Enter to show it again.

The server wants us to create a new admin user so that we can gain admin permissions the next time we join our server.

  • Press Enter in your game window.
  • Type /user add <username> <password> superadmin replacing <username> and <password> with your own username and a new password.
  • Press Enter again and log in using /login username password.
  • If this all works correctly, you can confirm everything with /auth-verify.

Now that the configuration is done. We’ll shutdown the server and have it save everything.

First, disconnect your Terraria client from the server.

  • Press Escape.
  • Go to “Settings”.
  • Select “Save & Exit”.

Now, shutdown the server. This is accomplished in your SSH session by typing “off” in the server console, then pressing Enter.

The initial configuration is now complete.

Running Your Server

We want the server to keep running, even when we disconnect our SSH session. So we’ll use a screen session to do so.

As the “terraria” user, start screen:

screen

Press Enter to close the credits screen. Now, start the TShock server again.

cd ~/tshock
mono TerrariaServer.exe

Load your world.

  • Press 1 followed by Enter to select your world.
  • Enter a port or press Enter to use the default port of 7777.

You are now in the server console, for a list of commands, type “help”, then press Enter. You can enter Terraria server commands in this console.

To close your SSH session and keep the server running, use the following key sequence:

  • Press Ctrl + A.
  • Press D.

You won’t get any feedback until you press the D key.

After this, your screen will be cleared and you will see output similar to the following.

[detached from 1298.pts-2.aklwebhost]

You can now safely close your SSH session and the server will keep running in the background.

When you reconnect to your server, you can type the following to enter the server console again:

screen -r

Closing Notes

There are lots of options and things to change with the TShock server. Please read the documentation for more details. Enjoy!

]]>
https://support.aklwebhost.com/knowledgebase/terraria-server-with-tshock-on-linux/feed/ 0
Starting a Teamspeak 3 Server on CentOS 6.4 https://support.aklwebhost.com/knowledgebase/starting-a-teamspeak-3-server-on-centos-6-4/ https://support.aklwebhost.com/knowledgebase/starting-a-teamspeak-3-server-on-centos-6-4/#respond Tue, 26 Nov 2019 07:58:33 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2339 Run the following commands to install a Teamspeak 3 server.

# Secure Iptables
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

# Teamspeak
iptables -I INPUT -p udp --dport 9987 -j ACCEPT
iptables -I INPUT -p udp --sport 9987 -j ACCEPT

iptables -I INPUT -p tcp --dport 30033 -j ACCEPT
iptables -I INPUT -p tcp --sport 30033 -j ACCEPT

iptables -I INPUT -p tcp --dport 10011 -j ACCEPT
iptables -I INPUT -p tcp --sport 10011 -j ACCEPT

# HTTP(s)
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --sport 80 -j ACCEPT

iptables -I INPUT -p tcp --dport 443 -j ACCEPT
iptables -I INPUT -p tcp --sport 443 -j ACCEPT

# SSH
iptables -I INPUT -p tcp --dport 22 -j ACCEPT
iptables -I INPUT -p tcp --sport 22 -j ACCEPT

# DNS
iptables -I INPUT -p udp --dport 53 -j ACCEPT
iptables -I INPUT -p udp --sport 53 -j ACCEPT

service iptables save && service iptables restart

# Update system
yum -y update

# Add Teamspeak user
useradd teamspeak

# Download, unzip and cleanup Teamspeak
cd /home/teamspeak
wget http://ftp.4players.de/pub/hosted/ts3/releases/3.0.7.1/teamspeak3-server_linux-amd64-3.0.7.1.tar.gz
tar xvfz teamspeak3-server_linux-amd64-3.0.7.1.tar.gz
mv teamspeak3-server_linux-amd64/* `pwd`
rm -rf teamspeak3-server_linux-amd64 && rm -rf teamspeak3-server_linux-amd64-3.0.7.1.tar.gz

# Add chkconfig support to startup file and link to binary
sed -i 's/# All rights reserved/# All rights reserved\n# chkconfig: 2345 99 00/g' ts3server_startscript.sh
ln -s /home/teamspeak/ts3server_startscript.sh /etc/init.d/teamspeak

# Change permissions of Teamspeak
chown -R teamspeak:teamspeak /home/teamspeak
chown -R teamspeak:teamspeak /etc/init.d/teamspeak

# Remount shared memory
mount -t tmpfs tmpfs /dev/shm

# Change to Teamspeak user and run server
su teamspeak
./ts3server_startscript.sh start

echo "Your Teamspeak URL is: `curl ipv4.icanhazip.com`"
]]>
https://support.aklwebhost.com/knowledgebase/starting-a-teamspeak-3-server-on-centos-6-4/feed/ 0
Setup an SA-MP San Andreas Multiplayer Server on CentOS 6 https://support.aklwebhost.com/knowledgebase/setup-an-sa-mp-san-andreas-multiplayer-server-on-centos-6/ https://support.aklwebhost.com/knowledgebase/setup-an-sa-mp-san-andreas-multiplayer-server-on-centos-6/#respond Tue, 26 Nov 2019 07:58:17 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2337 Welcome to another Aklweb host tutorial. Here, you’ll learn how to install and run a SAMP server. This guide was written for CentOS 6.

Prerequisites

You will need “screen” to keep the server running when you exit your SSH client (such as PuTTY). Installing “screen” is simple and only requires you to perform one command.

yum install -y screen

Installing The Server Software

Create a new directory and retrieve the SA-MP software. The “wget” below uses the latest version from the time this article was posted. You may visit the official site to check for newer releases.

cd /
mkdir samp-server
wget http://team.sa-mp.com/files/samp03dsvr_R2.tar.gz

Extract the “tar” file.

tar -zxf samp037svr_R2.tar.gz

Enter the “samp03” folder and edit the configuration file. Make any configuration changes that you would like during this step.

cd samp03
vi server.cfg

Running the server

This is the easy part. First, we must open up a “screen” session. You can change “server” to any name you’d like for easier access back to the “screen” session.

screen -S server

Start the SA-MP server.

./samp03svr

At this point, the server is running. You may leave it running and detach from your screen session by pressing Ctrl+A, then D.

If you require access to the server console again, you can return to the screen with the following command. Update the “server” string if you changed it earlier.

screen -r server

Congratulations! You have installed and started an SA-MP server.

]]>
https://support.aklwebhost.com/knowledgebase/setup-an-sa-mp-san-andreas-multiplayer-server-on-centos-6/feed/ 0
Setup an Insurgency Game Server on Ubuntu 15.04 https://support.aklwebhost.com/knowledgebase/setup-an-insurgency-game-server-on-ubuntu-15-04/ https://support.aklwebhost.com/knowledgebase/setup-an-insurgency-game-server-on-ubuntu-15-04/#respond Tue, 26 Nov 2019 07:57:58 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2335 In this tutorial, we will be setting up an Insurgency game server on Ubuntu 15.04.

Before we can setup the Insurgency server, we need to install a few other packages. Follow the steps below.

Getting Started:

  1. Install the dependency to run SteamCMD: sudo apt-get install lib32gcc1
  2. Create a new user for running SteamCMD: useradd -m steam
  3. Login to the newly created user: su - steam
  4. Make a directory for SteamCMD: mkdir steamcmd
  5. Move into the SteamCMD directory: cd steamcmd
  6. Download SteamCMD for Linux: wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz

Running SteamCMD

  1. Unzip SteamCMD: tar -xvzf steamcmd_linux.tar.gz
  2. To run SteamCMD type: ./steamcmd.sh

Downloading Insurgency files

  1. Once SteamCMD has started, login to the servers: login anonymous
  2. Set the install directory: force_install_dir ./insurgency/
  3. Download the Insurgency server files (this may take a while): app_update 237410
  4. End the session once the files have downloaded: quit

Running the Insurgency server

  1. Navigate to the directory where the server files were downloaded: cd insurgency
  2. Run the startup script for the server: screen ./srcds_linux

Congratulations! You now have an Insurgency game server all setup and running. You can connect to it by using the IP address allocated to your Aklweb host server.

If you received an error on executing the startup script, try running the following command first:

export LD_LIBRARY_PATH=/home/steam/steamcmd/insurgency/bin

There are many configuration options for Insurgency. See this guide for configuration reference.

]]>
https://support.aklwebhost.com/knowledgebase/setup-an-insurgency-game-server-on-ubuntu-15-04/feed/ 0
Setup a Team Fortress 2 Server on Arch Linux https://support.aklwebhost.com/knowledgebase/setup-a-team-fortress-2-server-on-arch-linux/ https://support.aklwebhost.com/knowledgebase/setup-a-team-fortress-2-server-on-arch-linux/#respond Tue, 26 Nov 2019 07:57:34 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2333 This tutorial explains how to setup a Team Fortress 2 server on Arch Linux. I assume that you are logged in with a non-root user account that has sudo access. This tutorial uses AUR to build packages, and that operation should not be performed from the root account.

Before You Begin

It is very important that you have the multilib repository enabled if and only if you are on a 64-bit (amd64) server. If it isn’t enabled, then SteamCMD cannot run and you cannot even download the server files. To do this, you must uncomment the following lines in /etc/pacman.conf.

[multilib]
Include = /etc/pacman.d/mirrorlist

If you are on 32-bit (i686) Arch, you can safely ignore this.

Install SteamCMD

There is an AUR package for SteamCMD and it is one of the easiest ways to install SteamCMD on Arch. There are a couple odd things about it though:

  • All relative paths are relative to /usr/share/steamcmd.
  • To upgrade SteamCMD itself, you must be root.

If you are on a 64-bit server, you must install the package lib32-gcc-libs.

sudo pacman -Sy lib32-gcc-libs

Now we must build the package. Using curl, download the tarball for the package.

curl -O http://media.steampowered.com/installer/steamcmd_linux.tar.gz

Once the download finishes, extract and change to the directory created.

tar -xvzf steamcmd.tar.gz
cd steamcmd

Now, using makepkg, build the package.

makepkg -ci

If you didn’t pass the -i flag to the makepkg command, use pacman to install it.

sudo pacman -U *.pkg.tar.xz

You now have SteamCMD installed and ready to download Team Fortress 2 server.

Install The Team Fortress 2 Server

This guide uses a separate user to run the server, so we will create a new tf2 user and group with it’s own home folder in /var/lib.

sudo groupadd tf2
sudo mkdir /var/lib/tf2
sudo useradd -d /var/lib/tf2 -g tf2 -s /bin/bash tf2
sudo chown tf2.tf2 -R /var/lib/tf2

Now to install the server.

sudo -u tf2 steamcmd +login anonymous +force_install_dir ~tf2/server +app_update 232250 validate +quit

Once that finishes downloading, you have the server installed.

Configuring

Although you can run the server, some configuration should be done so that the server isn’t too generic. The main file that we put settings in is the server.cfg file. Below is a very basic server.cfg file.

To open/create the file, use your favorite editor. Here vim is used, but you can use any text editor like nano.

sudo -u tf2 vim ~tf2/server/tf/cfg/server.cfg

Add the following. More settings can be found on the Team Fortress 2 wiki and Valve developer page. Be sure to change some of the settings to suit your needs.

hostname "Server Name"
rcon_password "password"
sv_password ""
sv_contact "email@example.com"
sv_tags ""
sv_region "255"
sv_lan "0"

exec banned_user.cfg
exec banned_ip.cfg
writeid
writeip

Running Your Server

It is known that you need a multiplexer like GNU Screen or tmux to run your server unattended. Here we are going to use tmux to run the server, but if you prefer and know how to use screen, feel free to use it.

Install tmux by using pacman.

sudo pacman -Sy tmux

You can start the server with the following command. You can change the map and maxplayers if desired.

sudo -u tf2 tmux new-session -d -s tf2-console -d '~tf2/server/srcds_run -console -game tf +map cp_dustbowl +maxplayers 24'

If you ever need to attach to the console, run the following.

sudo -u tf2 tmux attach -t tf2-console

You can leave the server console by typing CTRL + B then releasing those keys and then pressing D.

Running With systemd

Running the server with systemd is convenient for many reasons. The main one is that you can have it start when the VPS starts. This requires a script and a systemd unit to be written. Even though this is a good idea, it is optional.

The first thing to write is the start script. To create the script, use your favorite editor. Here vim is used, but you can use any text editor like nano.

sudo -u tf2 vim ~tf2/server/tf2.sh

Add the following.

#!/bin/sh

USER=$2

if [ -z $2 ]; then
  USER="tf2"
fi

case "$1" in
  start)
    sudo -u $ tmux new-session -d -s tf2-console -d '/var/lib/tf2/server/srcds_run -console -game tf +map cp_dustbowl +maxplayers 24'
    ;;

  stop)
    sudo -u $ tmux send-keys -t tf2-console 'say Server shutting down in 10 seconds!' C-m
    sleep 10
    sudo -u $ tmux send-keys -t tf2-console 'quit' C-m
    sleep 5
    ;;

  *)
    echo "Usage: $0  user"
esac

exit 0

Now you need to make the systemd unit. To create the unit, use your favorite editor. Here vim is used, but you can use any text editor like nano.

sudo vim /usr/lib/systemd/system/tf2.service

Add the following.

[Unit]
Description=Team Fortress 2 Server (SRCDS)
After=local-fs.target network.target

[Service]
ExecStart=/var/lib/tf2/server/tf2.sh start
ExecStop=/var/lib/tf2/server/tf2.sh stop
Type=forking

[Install]
WantedBy=multi-user.target

Now make sure the tf2.sh file is executable.

sudo chmod +x ~tf2/server/tf2.sh

After all that, you can use systemctl to start and stop the server. Also you can use it to make it start on boot.

To start:

sudo systemctl start tf2.service

To stop:

sudo systemctl stop tf2.service

To restart:

sudo systemctl restart tf2.service

To enable at boot:

sudo systemctl enable tf2.service

To disable at boot:

sudo systemctl disable tf2.service

Even though systemd is handling starting and stopping the server, you can still access the console with the following command:

sudo -u tf2 tmux attach -t tf2-console

Final Notes

SteamCMD is installed in an area where only root can change files (see note in “Install SteamCMD”). If you ever need to upgrade SteamCMD itself, just run it as root.

sudo steamcmd +quit

If you need to update the server. First stop the server and then use SteamCMD to update (using the same command to install).

sudo systemctl stop tf2.service
sudo -u tf2 steamcmd +login anonymous +force_install_dir ~tf2/server +app_update 232250 validate +quit
sudo systemctl start tf2.service

There are a lot more configuration topics that are not covered in this tutorial. If you need more information, please refer to the Team Fortress 2 Wiki and the Valve Developer Wiki.

]]>
https://support.aklwebhost.com/knowledgebase/setup-a-team-fortress-2-server-on-arch-linux/feed/ 0
Setup a Rust Game Server on CentOS https://support.aklwebhost.com/knowledgebase/setup-a-rust-game-server-on-centos/ https://support.aklwebhost.com/knowledgebase/setup-a-rust-game-server-on-centos/#respond Tue, 26 Nov 2019 07:57:15 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2331 In this article, I’ll will explain how to install a Rust game server, which uses the Steam gaming platform. Follow the steps below to continue. This tutorial was written for CentOS 6.

Step 1: Installing the prerequisites

In order to host a Rust game server, you need a program called steamcmd. With that program, we can obtain all the required game server files and start the server. But first, we need to install some packages for Steam to work properly.

If you have a 32 bit installation, run this set of commands:

yum install glibc libstdc++ screen -y

For 64 bit installations of CentOS, use this set of commands:

yum install glibc.i686 libstdc++.i686 -y

Then, once you’ve finished installing your package set, execute the following:

yum groupinstall 'Development Tools' -y
yum install libX11-devel freetype-devel zlib-devel libxcb-devel -y
yum install libX11-devel -y 
yum install -y freetype freetype-devel -y

Namely, Steam requires the C/C++ runtimes installed to run properly. Alongside, this set of commands will install screen, a program that you can use to keep other programs running after disconnecting from your SSH/console session.

Step 2: Installing Rust

We’ll create another user for security, because running the game server with the root user is dangerous. Feel free to change the user name, if you wish.

useradd rust
su rust

The useradd command will add the user, rust. The su command, will effectively change our current user to “rust”.

Now that we’re using the unprivileged user, we’ll create the folder where Rust will run.

mkdir ~/game_server && cd ~/game_server

Now, let’s get the Rust game server files.

wget http://playrust.com/wp-content/uploads/2015/04/Rust_Server.zip && unzip Rust_Server.zip

Because Rust requires Windows to run, we’ll be installing a program named WINE. WINE (Wine Is Not a Emulator) is a program that allows us to use Windows software on Linux. The great part is that it’s fairly simple to install.

cd /usr/src && wget http://skylineservers.dl.sourceforge.net/project/wine/Source/wine-1.7.50.tar.bz2 && tar xjf wine-1.7.50.tar.bz2

If you’re running a 64-bit installation of CentOS, use these:

cd wine-1.7.50 && ./configure --enable-win64

If you’re using the 32 bit version of CentOS, use this:

cd wine-1.7.50 && ./configure

To finish installing Wine, run:

make && make install

This will take a fair amount of time, so hang tight while Wine is being built.

Once Wine has finished compiling, execute:

cd /home/rust/game_server/steam
/usr/src/wine-1.7.50/wine64 steamcmd.exe +runscript ../update_script.txt
cd .. && cd rustds

Good job, you have successfully setup a Rust server.

Step 3: Usage

To start your Rust server, execute:

su rust
cd rustds
/usr/src/wine-1.7.50/wine64 RustDedicated.exe -batchmode +server.hostname "rust-server.localdomain" +server.port 28015 +server.identity "my_server" +server.seed 1234567 -logFile "output.txt" -autoupdate

This command will start a server with the hostname rust-server.localdomain, and the seed 1234567. If desired, you can change the server seed, the hostname, and any of the configurable options.

Conclusion

To conclude, you installed a Rust server – all that’s left is to recruit some players!

]]>
https://support.aklwebhost.com/knowledgebase/setup-a-rust-game-server-on-centos/feed/ 0
Setup a Multi Theft Auto Server on Debian https://support.aklwebhost.com/knowledgebase/setup-a-multi-theft-auto-server-on-debian/ https://support.aklwebhost.com/knowledgebase/setup-a-multi-theft-auto-server-on-debian/#respond Tue, 26 Nov 2019 07:56:56 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2329 This is a tutorial explains how to install a Multi Theft Auto server on Debian. It was last updated for Debian 7 and MTA 1.5.4.

Any VPS from AKLWEB Host is great for an MTA server, whether it’s just a private server for friends or development, to a server that will host lots of people 24/7.

For a development server or a server for your friends, I would recommend the lowest-end VPS (768 MB ram). The more people you are hosting, the bigger the server you would get (obviously).

Lets get started!

Credit goes to jhxp on the Multi Theft Auto forums for the majority of the steps in this tutorial. I have just added the links for 1.4.0 and changed a few things to make it shorter.

Installing packages

These packages must be installed before the MTA server.

For 32-bit Debian:

apt-get update; 
apt-get upgrade; 
apt-get -y install zip unzip libreadline5 screen

For 64-bit Debian:

apt-get update; 
apt-get upgrade; 
dpkg --add-architecture i386; #add the i386 architecture so the ia32-libs package can be installed
apt-get update; #update the list of packages so the ia32-libs package is included in the list
apt-get -y install zip unzip ia32-libs lib32ncursesw5 lib32readline5 screen

Summary:

  • We have installed the appropriate packages needed.
  • We have added support for the i386 architecture on 64-bit systems.

Installing Multi Theft Auto

Do the steps listed below, one at a time:

cd ~; 
mkdir mtasa; 
cd mtasa; 

wget -O mtasa-linux-server.tar.gz http://linux.mtasa.com/dl/154/multitheftauto_linux_x64-1.5.4.tar.gz;
wget -O baseconfig.tar.gz http://linux.mtasa.com/dl/154/baseconfig-1.5.4.tar.gz;
wget -O mtasa-resources.zip https://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip;

tar -zxf mtasa-linux-server.tar.gz; 
mv multitheftauto_linux_x64-1.5.4 mtasa-server; 
unzip -q mtasa-resources.zip -d mtasa-server/mods/deathmatch/resources/;

tar -zxf baseconfig.tar.gz; #uncompress default server configuration files
mv baseconfig/* mtasa-server/mods/deathmatch; 
rmdir baseconfig; 
rm mtasa-linux-server.tar.gz baseconfig.tar.gz mtasa-resources.zip; 

Summary:

  • We have made a directory called mtasa.
  • Then, we have downloaded everything that we need.
  • Then, we have unzipped and uncompressed all of the downloaded files and put them where they needed to go.
  • And finally, we have deleted the old downloaded files since we don’t need them anymore.

Configuring the Server

Run the following commands:

cd ~; 
cd mtasa/mtasa-server/mods/deathmatch; 
nano mtaserver.conf;

Summary:

  • We have gone back to the main directory, then gone to the directory where the config file is located.
  • Then, we have opened up the config file in nano.

Now, we can configure our server. All that you really need to configure in this step is the server name, the amount of slots the server can have (default is 32), and what resources it will run upon start-up. To configure your server, make any changes to the mtaserver.conf file in nano that you deem necessary. Once you have finished, hold CTRL and press O, then type y to save.

Running the Server

Run the following commands:

cd ~; 
cd mtasa/mtasa-server/; 
./mta-server; 

Summary:

  • Basically, go to your main directory, then go to mtasa-server folder.
  • Then, do ./mta-server to start your server.

If everything is working, the MTA console should be displayed. The server will print a message stating that it is ready to accept connections.

There you go – you now have a fully working Multi Theft Auto 1.4.0 server that is ready for players!

Extras

At this point, the server is running. Once you exit the shell though, the server will stop. To keep it running when you have exited the shell, run the following commands:

cd ~; 
cd mtasa/mtasa-server/; 
screen -dmS mtasa ./mta-server; 

Summary:

  • We have gone to the mtasa-server folder.
  • This time, we have started the server with screen and called it mtasa (This can be whatever you want).

To view your server, run screen with the process ID of the server:

screen -r PROCESS_ID 

You can find the process ID of your server by running this command:

screen -ls

Your server will appear with the ID being the first number next to what you called the screen (Example: 1231.mtasa).

To exit the screen, hold down CTRL, then press A and D at the same time to exit. If you are using a shell program, such as PuTTY, then you can just close PuTTY.

To stop the server, go into the screen and type quit in the server console.

If the server has crashed, then get the screen ID and run: kill <id> or kill -9 <id>.

Enjoy your new MTA server!

]]>
https://support.aklwebhost.com/knowledgebase/setup-a-multi-theft-auto-server-on-debian/feed/ 0
Setup a Minecraft PE Server on CentOS 6 https://support.aklwebhost.com/knowledgebase/setup-a-minecraft-pe-server-on-centos-6/ https://support.aklwebhost.com/knowledgebase/setup-a-minecraft-pe-server-on-centos-6/#respond Tue, 26 Nov 2019 07:56:40 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2327 This article will teach you how to setup a Minecraft Pocket Edition server on CentOS 6. Setting up a Minecraft PE server is quite simple.

First, install the required libraries.

yum -y install m4 automake autoconf make gcc libtool

Once these libraries have finished installing, you must install the server script. We will be using PocketMine.

wget http://downloads.sourceforge.net/project/pocketmine/linux/installer.sh

Chmod the server script to make it executable.

chmod +x ./installer.sh

Begin the install process. This may take up to 5 minutes to install.

./installer.sh

Next, start the server.

./start.sh

Voila. We just need to make sure that port 19132 is open so that people can join. To open it in CentOS 6, run the following commands.

iptables -A INPUT -p tcp -m tcp --dport 19132 -j ACCEPT
service iptables save
service iptables restart

If you are running CentOS 7, then you must use firewalld to open it. To do so, perform the following commands:

firewall-cmd --zone=dmz --add-port=19132/tcp --permanent
firewall-cmd --reload

Your server is ready to go! Happy building!

]]>
https://support.aklwebhost.com/knowledgebase/setup-a-minecraft-pe-server-on-centos-6/feed/ 0
Setup a Counter-Strike: Global Offensive (CSGO) Server on Arch Linux https://support.aklwebhost.com/knowledgebase/setup-a-counter-strike-global-offensive-csgo-server-on-arch-linux/ https://support.aklwebhost.com/knowledgebase/setup-a-counter-strike-global-offensive-csgo-server-on-arch-linux/#respond Tue, 26 Nov 2019 07:56:14 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2325 This tutorial explains how to setup a Counter-Strike: Global Offensive server on Arch Linux.

This tutorial assumes that you logged in with a standard user account and have sudo privileges. We will be using a normal user account because building packages with AUR should not be done from the root account.

Before You Begin

If you are using a 64-bit version of Arch Linux, it is very important that you have the multilib repository enabled. If it is not enabled, SteamCMD cannot download or run the game server files. To enable multilib, simply uncomment the following lines in /etc/pacman.conf.

[multilib]
Include = /etc/pacman.d/mirrorlist

This does not apply to 32-bit Arch Linux systems.

Install SteamCMD

There is an AUR package for SteamCMD. It is possibly the easiest way to install SteamCMD on Arch. There are a few things to note about it though:

  • All relative paths are relative to /usr/share/steamcmd.
  • To upgrade SteamCMD itself, you must be on the root account.

If you are on a 64-bit server, you must install the package lib32-gcc-libs.

sudo pacman -Sy lib32-gcc-libs

Now we must build the package. Using curl, download the tarball for the package.

curl -O https://aur.archlinux.org/packages/st/steamcmd/steamcmd.tar.gz

Once the download finishes, extract and change to the directory created.

tar -xvzf steamcmd.tar.gz
cd steamcmd

Now, using makepkg, build the package.

makepkg -ci

If you didn’t pass the -i flag to the makepkg command, then use the following command to install it.

sudo pacman -U *.pkg.tar.xz

You now have SteamCMD installed and ready to download Counter-Strike: Global Offensive server.

Install The Counter-Strike: Global Offensive Server

This guide uses a separate user to run the server, so we will create a new csgo user and group with it’s own home folder in /var/lib.

sudo groupadd csgo
sudo mkdir /var/lib/csgo
sudo useradd -d /var/lib/csgo -g csgo -s /bin/bash csgo
sudo chown csgo.csgo -R /var/lib/csgo

Now to install the server.

sudo -u csgo steamcmd +login anonymous +force_install_dir ~csgo/server +app_update 740 validate +quit

Once that finishes downloading, you have the server installed.

Configuring

Although you can run the server, some configuration should be done so that the server isn’t too generic. The main file that we put settings in is the server.cfg file. Below is a very basic server.cfg file.

To open/create the file, use your favorite editor. I use vim in this example.

sudo -u csgo vim ~csgo/server/csgo/cfg/server.cfg

Add the following. More settings can be found on the Valve Developer Wiki. Be sure to change some of the settings to suit your needs.

hostname "Server Name"
rcon_password "password"
sv_password ""
sv_contact "email@example.com"
sv_tags ""
sv_region "255"
sv_lan "0"

exec banned_user.cfg
exec banned_ip.cfg
writeid
writeip

Running Your Server

To run your server unattended, you will need a multiplexer like GNU Screen or tmux. In this article, I am going to use tmux to run the server, but if you prefer and know how to use screen, feel free to use it.

Install tmux by using pacman.

sudo pacman -Sy tmux

You can start the server with the following command. You can change the map if desired. Please read the “Final Notes” for more information on the game_type and game_mode values. This example is for a classic casual server.

sudo -u csgo tmux new-session -d -s csgo-console -d 'cd /var/lib/csgo/server/; ./srcds_run -console -game csgo -usercon +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2'

If you ever need to attach to the console, run the following.

sudo -u csgo tmux attach -t csgo-console

You can leave the server console by typing CTRL + B then releasing those keys and then pressing D.

Running With systemd

Running the server with systemd is convenient for many reasons. The main one is that you can have it start when the VPS starts. This requires a script and a systemd unit to be written. Even though this is a good idea, it is optional.

The first thing to write is the start script. To create the script, use your favorite editor. Here vim is used, but you can use any text editor like nano.

sudo -u csgo vim ~csgo/server/csgo.sh

Add the following and be sure to look at the line with the start command as it has the game mode and type.

#!/bin/sh

USER=$2

if [ -z $2 ]; then
  USER="csgo"
fi

case "$1" in
  start)
    sudo -u $ tmux new-session -d -s csgo-console -d 'cd /var/lib/csgo/server/; /var/lib/csgo/server/srcds_run -console -game csgo -usercon +game_type 0 +game_mode 0 +mapgroup mg_active +map de_dust2'
    ;;

  stop)
    sudo -u $ tmux send-keys -t csgo-console 'say Server shutting down in 10 seconds!' C-m
    sleep 10
    sudo -u $ tmux send-keys -t csgo-console 'quit' C-m
    sleep 5
    ;;

  *)
    echo "Usage: $0  user"
esac

exit 0

Now you need to make the systemd unit.

sudo vim /usr/lib/systemd/system/csgo.service

Add the following.

[Unit]
Description=Counter-Strike: Global Offensive Server (SRCDS)
After=local-fs.target network.target

[Service]
ExecStart=/var/lib/csgo/server/csgo.sh start
ExecStop=/var/lib/csgo/server/csgo.sh stop
Type=forking

[Install]
WantedBy=multi-user.target

Now make sure the csgo.sh file is executable.

sudo chmod +x ~csgo/server/csgo.sh

After all that, you can use systemctl to start and stop the server. Also you can use it to make it start on boot.

To start:

sudo systemctl start csgo.service

To stop:

sudo systemctl stop csgo.service

To restart:

sudo systemctl restart csgo.service

To enable at boot:

sudo systemctl enable csgo.service

To disable at boot:

sudo systemctl disable csgo.service

Even though systemd handles starting and stopping the server, you can access the console with the following command.

sudo -u csgo tmux attach -t csgo-console

Final Notes

SteamCMD is installed in an area where only root can change files (see note in the “Install SteamCMD” section). If you ever need to upgrade SteamCMD itself, just run it as root.

sudo steamcmd +quit

If you need to update the server. First stop the server and then use SteamCMD to update (using the same command to install).

sudo systemctl stop csgo.service
sudo -u csgo steamcmd +login anonymous +force_install_dir ~csgo/server +app_update 740 validate +quit
sudo systemctl start csgo.service

The game mode and game type in the starting command are important depending on what kind of server you want. Here’s a quick table of the possible values.

      Game Mode      | game_type | game_mode
Classic Casual       | 0         | 0
Classic Competitive  | 0         | 1
Arms Race            | 1         | 0
Demolition           | 1         | 1
Deathmatch           | 1         | 2

There are a lot more configuration topics not covered in this tutorial. If you need more information, please refer to the Valve Developer Wiki.

]]>
https://support.aklwebhost.com/knowledgebase/setup-a-counter-strike-global-offensive-csgo-server-on-arch-linux/feed/ 0
Setup a Call of Duty 4 Server on Debian 7 x64 https://support.aklwebhost.com/knowledgebase/setup-a-call-of-duty-4-server-on-debian-7-x64/ https://support.aklwebhost.com/knowledgebase/setup-a-call-of-duty-4-server-on-debian-7-x64/#respond Tue, 26 Nov 2019 07:55:40 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2323 Overview

This guide will cover the installation and operation of a Call of Duty 4 (COD4) server using screen. In this tutorial, we will install COD4 on Debian 7.

Requirements

  • Call of Duty 4 game client installer CD or image.
  • Debian server running a stable release (Wheezy, Jessie)
  • Aklwebhost VPS (1 CPU, 1GB Memory, 20GB Storage) as a minimum. This configuration may not be suitable for large servers.

Installation

Login as root on the server that you will be using for this installation.

Run the command below to update your server’s list of available packages from the repositories and then upgrade any existing packages.

apt-get update && apt-get upgrade

Screen is often times included with the OS image by default, but you may be required to install it yourself.

apt-get install screen

Because the Call of Duty 4 server only runs on i386 machines, you have to enable the “multilib” feature in Debian.

dpkg --add-architecture i386
apt-get update

For security purposes, we do not want to run the server using the root account. You should use a standard user account.

Create a directory for the game server.

cd ~
mkdir cod4

Download the Call of Duty 4 dedicated server.

cd cod4
wget http://treefort.icculus.org/cod/cod4-linux-server-06282008.tar.bz2

The download size is roughly 280 MB. When the download finishes, unpack the package.

tar -xvjf cod4-linux-server-06282008.tar.bz2

Install the COD4 game client onto your computer. Copy the main and zone folder of the game client onto the COD4 directory of your server using your favorite SCP client.

Once your upload completes, download the IceOps made executable. It contains various bugfixes and improvements.

wget https://iceops.in/cod4x17a_dedrun

Make the server “executable”.

chmod +x cod4x17a_dedrun

Create a config file for the dedicated server.

nano general.cfg

If you want to run a simple “Team Deathmatch” or “Search & Destroy” server, then use this sample config.

//************************************************** ****************************
// Call of Duty 4
//************************************************** ****************************
//************************************************** ****************************
// Public Information
//************************************************** ****************************
sets sv_hostname "CoD4 Server" // Change this field, what is the server name
sets _Admin "Admin" // Change this
sets _Email "admin@admin.com" // Change this
sets _Website "www.website.com" // Change this
sets _Location "Location" // Change this
sets _Irc ""
sets _Mod ""
sets _ModVer ""
sets _ModUpdate ""
sets _Maps "COD4 Stock"
set scr_motd "Message of the Day when the gamer joined the server" // Change it

//************************************************** ****************************
// Common Server Settings
//************************************************** ****************************
// Log Settings
set g_logsync "2" // 0=no log, 1=buffered, 2=continuous, 3=append
set logfile "1" // 0 = NO log, 1 = log file enabled
set g_log "games_mp.log" // Name of log file, default is games_mp.log
set sv_log_damage "1"

// Network options
set net_ip "192.168.1.1" // Set your servers IP address
set net_port "28960" // Set your port number
set com_hunkMegs "512"
set net_noipx "1" // Allow ONLY tcp/ip protocol, player/server communications

// Server Network Mode
set dedicated "2" // 0 = Listen, 1 = LAN, 2 = Internet

// Password Settings
set rcon_password "yourpass" // RCON must be set.
set sv_privatePassword "" // Private slots, non-public slots

// The following can be used to lock out the server so that only those
// players that have been provide the password can connect. Good for
// matches, practices, etc.
set g_password ""

// Player slots setup
set sv_maxclients "32" // MAX server player slots, this is TOTAL player slots
set sv_privateclients "" // Number of private player slots, maxclients - privateclients = public slots

// Ping
set sv_minPing "0" // MIN player ping on CONNECT, any lower and player isnt allowed to connect
set sv_maxping "250" // MAX player ping on CONNECT, any higher and player isnt allowed to connect

// Client Download Settings. (0=off/1=on) Used for MODs and custom maps
// You have to got a working httpd server if fast downloading enabled.
set sv_allowdownload "0"
seta sv_wwwDownload "0"
seta sv_wwwBaseURL ""
seta sv_wwwDlDisconnected "1"

// Rate
set sv_maxRate "25000"


// Drop inactive players
set sv_timeout "300"
set sv_zombietime "1"
set g_inactivity "0"
set g_inactivityspectator "0"

// AntiFlooding Settings
set sv_floodProtect "1"
set sv_reconnectlimit "3"

// Anti Cheat Settings
// In IceOps Dedicated server have their own cheat protection, so Punkbuster not needed
set sv_punkbuster "0"
set sv_disableClientConsole "0"
set cl_autocmd "0"
set sv_cheats "0"
set sv_pure "1"
set g_banIPs ""
set g_no_script_spam "1"

// Temporary Ban duration, in seconds
set sv_kickBanTime "3600"

// In-game voice communication system
set sv_voice "0"
set sv_voiceQuality "4"
set voice_deadChat "0"
set voice_global "0"
set voice_localEcho "0"
set winvoice_mic_mute "1"

//************************************************** ****************************
// Misc
//************************************************** ****************************
set sv_allowAnonymous "0"
set g_antilag "0"
set g_compassShowEnemies "0"
set scr_hardcore "1"
set g_allowvote "0"
set scr_allow_vote "0"
set scr_teambalance "1"
set ui_hud_hardcore "1"
set scr_game_allowkillcam "0"
set scr_game_onlyheadshots "0"
set scr_game_deathpointloss "0"
set scr_game_suicidepointloss "0"
set scr_team_teamkillpointloss "1"
set scr_game_spectatetype "1" // [0-2] 0=none, 1= team only, 2=spectate all
set scr_team_fftype "1" // 0=off 1=on 2=reflect damage 3=shared


//================================================== ===============================
// Gametype Settings
//================================================== ===============================

// First gametype to load
// "dm" - free for all deathmatch
// "dom" - domination
// "koth" - headquarters
// "sab" - sabotage
// "sd" - search & destroy
// "war" - team deathmatch

// Deathmatch
set scr_dm_scorelimit   150
set scr_dm_timelimit    10
set scr_dm_roundlimit   1
set scr_dm_numlives 0
set scr_dm_playerrespawndelay -1
set scr_dm_waverespawndelay 0


// Domination
set scr_dom_scorelimit  200
set scr_dom_timelimit   0
set scr_dom_roundlimit  1
set scr_dom_numlives 0
set scr_dom_playerrespawndelay -1
set scr_dom_waverespawndelay 0


// Teamdeath Match
set scr_war_scorelimit  750
set scr_war_timelimit   10
set scr_war_roundlimit  1
set scr_war_numlives 0
set scr_war_playerrespawndelay -1
set scr_war_waverespawndelay 0

// Sabotoge
set scr_sab_scorelimit  3
set scr_sab_timelimit   10
set scr_sab_roundlimit  3
set scr_sab_roundswitch 1
set scr_sab_numlives 0
set scr_sab_bombtimer   30
set scr_sab_planttime   3
set scr_sab_defusetime  3
set scr_sab_hotpotato   0
set scr_sab_playerrespawndelay -1
set scr_sab_waverespawndelay -1

// King of the Hill
set scr_koth_scorelimit 250
set scr_koth_timelimit  15
set scr_koth_roundlimit 1
set scr_koth_roundswitch    1
set scr_koth_numlives   0
set scr_koth_playerrespawndelay -1
set scr_koth_waverespawndelay 0
set koth_autodestroytime    60
set koth_spawntime  0
set koth_kothmode   0
set koth_capturetime    20
set koth_destroytime    10
set koth_delayPlayer    0
set koth_spawnDelay 60

// Search and Destroy
set scr_sd_scorelimit   6
set scr_sd_timelimit    3
set scr_sd_roundlimit   0
set scr_sd_roundswitch  3 // rounds between switching teams
set scr_sd_numlives 1 // elimination
set scr_sd_bombtimer    60
set scr_sd_planttime    7
set scr_sd_defusetime   7
set scr_sd_multibomb    0
set scr_sd_playerrespawndelay -1
set scr_sd_waverespawndelay 0

// Team-Balance and Voting
set scr_teambalance "1"
set g_allowvote "0"

set sv_mapRotation "gametype sd map mp_bloc gametype sd map mp_backlot gametype sd map mp_crash gametype sd map     mp_convoy gametype sd map mp_vacant gametype sd map mp_bog gametype sd map mp_pipeline gametype sd map mp_farm gametype sd map mp_crossfire gametype sd map mp_overgrown gametype sd map mp_citystreets gametype sd map mp_showdown gametype sd  map mp_strike gametype sd map mp_cargoship gametype sd map mp_countdown"

Save your changes to the config file.

Next, create a start-up script that starts a dedicated server (with screen) and enables map rotation.

nano cod4.sh

Paste the following content into the script file.

#!/bin/bash
screen -dmS cod4 ./cod4x17a_dedrun +set sv_authorizemode "-1" +exex general.cfg +map_rotate

Save your changes to the script file, then make it “executable”.

chmod +x cod4.sh

If you are using the iptables firewall, add the following rules. Update the ports if you have changed them in the server configuration file.

-A INPUT -p udp --dport 28960 -j ACCEPT
-A INPUT -p udp --sport 28960 -j ACCEPT
-A INPUT -p tcp --dport 28960 -j ACCEPT
-A INPUT -p tcp --sport 28960 -j ACCEPT
-A INPUT -p udp --dport 20800 -j ACCEPT
-A INPUT -p udp --sport 20800 -j ACCEPT
-A INPUT -p tcp --dport 20800 -j ACCEPT
-A INPUT -p tcp --sport 20800 -j ACCEPT
-A INPUT -p udp --dport 20810 -j ACCEPT
-A INPUT -p udp --sport 20810 -j ACCEPT
-A INPUT -p tcp --dport 20810 -j ACCEPT
-A INPUT -p tcp --sport 20810 -j ACCEPT

Finally, start your server.

./cod4.sh
]]>
https://support.aklwebhost.com/knowledgebase/setup-a-call-of-duty-4-server-on-debian-7-x64/feed/ 0