SRCDS Steam group

SRCDS on Arch Linux
I set SRCDS up on a 64-bit Arch Linux server, and the process was relatively simple. I researched the process beforehand, and didn't find much information available for running SRCDS on Arch. So maybe this will help someone out.

In brief:
  1. Install Arch
  2. Install SteamCMD
  3. Install your game server (e.g. CS:GO)
If, like me, you installed 64-bit Arch, you'll encounter the well documented SteamCMD error:
Quote:steamcmd: error while loading shared libraries: cannot open shared object file: No such file or directory
The solution is to install 32-bit C libraries:
pacman -S lib32-glibc lib32-libstdc++6
Then don't forget to set the environment variable for steamcmd to launch it, or you'll see a steamexe not found error.
STEAMEXE=steamcmd ./
That's the cliff notes.

Arch Linux is pretty awesome. Their philosophy is that Arch should empower competent users, rather than be user-friendly to a fault.
Quote:Arch Linux defines simplicity as without unnecessary additions, modifications, or complications, and provides a lightweight UNIX-like base structure that allows an individual user to shape the system according to their own needs. In short: an elegant, minimalist approach.

So Arch seems like a terrific game server. We don't need all the unnecessary cruft that comes with most distributions. And since we don't need many packages to get going, maintaining the server with updates should be relatively smooth.

Now for further reference, here's a more detailed description of how I installed everything on my server. This isn't meant to be followed step by step, rather it is just to illustrate what needs to be done. Everything here is documented in the links I provided earlier. I start by booting the Ach installation media and selecting the 64-bit install. Here is the script I wrote that sets my system up:
# creates a generic Arch installation on a 1tb disk

# Inform user and allow chance to cancel
printf "\nSetting up hard disk partitions in 5 seconds...\n" && sleep 5
parted /dev/sda mklabel gpt
parted /dev/sda mkpart primary ext2 1 3                  # Grub bios-gpt
parted /dev/sda mkpart primary ext2 3 259                # /boot
parted /dev/sda mkpart primary ext4 259 10GB             # /
parted /dev/sda mkpart primary ext4 10.3GB 992.2GB       # /home
parted /dev/sda mkpart primary linux-swap 992.2GB 1000GB # swap
# grub needs a small part for it's core.img, otherwise not available with a bios-gpt drive
parted /dev/sda set 1 bios_grub on
parted /dev/sda set 2 boot on
parted /dev/sda name 1 grub
parted /dev/sda name 2 boot
parted /dev/sda name 3 root
parted /dev/sda name 4 home
parted /dev/sda name 5 swap
# Arch parted doesn't have the mkfs or mkpartfs commands
mkfs.ext2 /dev/sda2
mkfs.ext4 /dev/sda3
mkfs.ext4 /dev/sda4
mkswap /dev/sda5
mount /dev/sda3 /mnt
mkdir /mnt/{boot,home}
mount /dev/sda2 /mnt/boot
mount /dev/sda4 /mnt/home
swapon /dev/sda5
parted /dev/sda print

printf "\nOptimizing local repository list in 10 seconds...\n" && sleep 10
# Get current list of US mirrors
curl -o mirrorlist
# Uncomment all mirrors
sed '/^#\S/ s|#||' -i mirrorlist
# Rank mirrors and sort them accordingly
/usr/bin/rankmirrors -n 0 mirrorlist > /etc/pacman.d/mirrorlist
# pacstrap will copy mirrorlist to our installation

printf "\nInstalling Arch base in 10 seconds...\n" && sleep 10
pacstrap /mnt base base-devel
genfstab -p /mnt >> /mnt/etc/fstab

arch-chroot /mnt
Now we've entered our Arch system, time to configure it!
# configures a generic Arch installation
# this should be run inside of the chroot install environment!

printf "\nSetting Timezone to America/Los_Angeles\n"
ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

printf "\nSetting Locale to en_US\n"
echo "LANG=en_US.UTF-8" > /etc/locale.conf
export LANG=en_US.UTF-8
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen

printf "\nSetting time to UTC\n"
hwclock --systohc --utc

printf "\nSetting hostname\n"
echo "" > /etc/hostname

printf "\nSetting Name Servers\n"
echo "nameserver" > /etc/resolv.conf
echo "nameserver" >> /etc/resolv.conf

printf "Creating an initial ramdisk environment in 10 seconds..." && sleep 10
mkinitcpio -p linux

printf "Installing Grub in 10 seconds..." && sleep 10
pacman -S grub-bios
grub-install --target=i386-pc --no-floppy --recheck /dev/sda
mkdir -p /boot/grub/locale
cp /usr/share/locale/en\@quot/LC_MESSAGES/ /boot/grub/locale/
grub-mkconfig -o /boot/grub/grub.cfg

#printf "\nSet root password!\n"

printf "Done! Rebooting in 10 seconds..." && sleep 10
umount /mnt/{boot,home}
umount /mnt
And we've got Arch! Time to add SteamCMD along with it's dependencies
# Set up keyring
pacman-key --init
pacman-key --populate archlinux

# Sync, refresh, and upgrade
pacman -Syu

# Install packages
pacman -S openssh
pacman -S lib32-glibc lib32-libstdc++6

# Set up users

# Install SteamCMD
mkdir /opt/steam && cd /opt/steam
curl -O
tar xf steamcmd.tar.gz && rm steamcmd.tar.gz
STEAMEXE=steamcmd ./
Now we're in the SteamCMD console:
login username password
force_install_dir /opt/steam/csgo-ds/
app_update 740 validate
SRCDS is installed now and we can launch it. Make sure the current path is in the same location as srcds_run, otherwise you'll get a game doesn't exist error.
cd /opt/steam/csgo-ds
./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 0 +mapgroup mg_bomb +map de_dust
And that concludes my notes on this. Big Grin
Now I just need to write an init script that starts up several different game modes.
This is a fine little tutorial. I'm using Arch myself and agree that even though it's a nearly a bare bones install, the customization and molding that you do to personalize it can't be beat, vs a bulky, hand you everything install.

I'm unfamiliar with the SteamCMD so this was a good help.

Good Job.

Forum Jump:

Users browsing this thread: 1 Guest(s)