KingLinkTiger's Blog A blog about Minecraft, Video Games, Computers, and Technology

16Feb/120

How to install a Garry’s Mod server on Ubuntu Linux

Garry's Mod Logo
EDIT: I have updated this tutorial in a new post. This update works with Garry's Mod 13, which most likely many of you are looking for. Link: http://tigerclan.net/blog/2012/10/24/how-to-set-up-a-garrys-mod-13-server-in-ubuntu/

Introduction

I spent many hours looking at how to make a Garry's Mod server in linux. To prevent my future self from having to go through this trouble again I put a post on my website here for me to easily find. I tried to write this post without any jargon, but I'm sure some made it in so please carefully read this post and look something up if you don't understand it.

Alright I've been looking around for proper tutorials on how to do this so I decided that I should compile everything that I have gathered for future reference or for those are looking to do the same thing.

 

Instructions

I am running an Ubuntu 11.10 Server x64 x84 (I had some trouble with 64bit, but it turns out that the segfaults I was getting was because Garry forgot some binary and not a 64bit problem) in a XenServer VM. I have full root access to the VM and it is a clean install the only thing I installed was openssh server to ssh into it. Now to what I've done.

Following the old Gmod wiki I created a srcds dir in the root folder by doing the following:

1
2
3
cd ~
mkdir srcds
cd srcds

I then created a file called "install.sh" and pasted the following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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 . -verify_all
./steam -command update -game garrysmod -dir . -verify_all
./steam -command update -game "Counter-Strike Source" -dir . -verify_all
./steam -command update -game garrysmod -dir . -verify_all
echo "Installed! Any problems should have been reported!"

I then CHMODed the file for execution and executed the file:

1
2
chmod +x install.sh
./install.sh

After the 5 seconds I was asked to input 'yes' and I did so.

Now this is going to take some time (Depending on download speeds an hour+). You know when it is done when you see "Installed! Any problems should have been reported!" If there were problems, you are on your own with figuring out what the problem is there. If you get this error "bash: ./hldsupdatetool.bin: No such file or directory" you may be missing lib32gcc1, run "apt-get install lib32gcc1" and then rerun the install.sh.

Now, there is one last thing that needs to be done before configuration, you must copy the entire cstrike folder located in the css folder. A simple "cp -r ./css/cstrike/ ./orangebox" will suffice. It should only take about a minute, but this is an essential step and if you skip it the game will not work correctly.

One thing that you may also have to do, depending on wither or not Garry has fixed this, Garry forgot the linux binaries in the current release of Garry's mod (As of Feb 17th 2012).

00:51:02 garry http://dl.dropbox.com/u/3590255/Temp/linux-131.zip
00:51:38 Python1320 let's see
00:52:08 NxD I remember i added these ones to my gmod installation
00:52:29 Python1320 garry, yep works now
00:52:34 * luastoned (~luastoned@luastoned.com) has joined #gmod
00:52:47 * Ideal-Hosting has quit (Ping timeout)
00:52:58 Cprossu yay a solution!
00:53:09 Dataanti patch derps
00:53:18 Dataanti not as bad as 1.2 for skyrim tho
00:54:54 garry ok I'm gonna patch this up then
00:55:04 garry you can use those dropbox bins for the time being

So simply do this

1
2
3
cd ~/srcds/orangebox/garrysmod/bin
wget http://dl.dropbox.com/u/3590255/Temp/linux-131.zip
unzip linux-131.zip

If you don't have unzip then install it using "apt-get install unzip."

Now another thing that has yet to be patched (As far as I am aware) is the TTT gamemode. If at the time of reading this the gamemode has been patched than ignore this section, if not then read on.
BKU (Bad King Urgrain) The creator of TTT somehow lost access to the gmod SVN server and has to manually release updates, this was as of Nov 2011. What you will have to do is download the current release from http://ttt.badking.net/releases and manually upload it to your gmod server. The best way to make sure you have the correct version would be to fully remove the terrortown folder from your gmod/gamemodes folder and upload the latest version of it.

 

Sources:

http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index4875.html

http://wiki.garrysmod.com/page/Main_Page

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

 

No trackbacks yet.