This does not set up the start script, stop script, or the startstop daemon included in Alloc's official instructions, but it is simple to stop the server with the "shutdown" command from telnet or in game.
First step is to ensure you have all the
pre-requisites installed and if you're so inclined,
have user set up to run the server. These pieces will require root.
After navigating to the directory you want the server installed to, here are the steps to get everything up and running:
Save the current directory to a variable for referencing later
Download and extract all the tarballs
Code:
wget http://illy.bz/fi/7dtd/linux_files.tar.gz -O - | tar -xzf -
mkdir management_scripts && wget http://illy.bz/fi/7dtd/management_scripts.tar.gz -O - | tar -xzf - -C management_scripts
mkdir steamcmd && wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz -O - | tar -xzf - -C steamcmd
Install the dedicated server (put your steam username in place of "loginnamegoeshere")
Steam will ask for your password and, if applicable, your steamguard code.
Code:
./steamcmd.sh +quit
./steamcmd.sh +@sSteamCmdForcePlatformType windows +login loginnamegoeshere +force_install_dir $installdir/engine "+app_update 294420" validate +quit
Copy the fixes to their correct locations
Code:
cd ..
cp -R linux_files/engine/* engine/
cp engine/7DaysToDie_Data/Managed/Assembly-CSharp.dll engine/7DaysToDie_Data/Managed/Assembly-CSharp.dll_orig
cp management_scripts/usr/local/lib/7dtd/server-fixes/* engine/7DaysToDie_Data/Managed/
cp engine/Install/32bit/SteamworksManaged.dll engine/7DaysToDie_Data/Managed/
cp management_scripts/home/sdtd/templates/admins.xml engine/serveradmin.xml
Edit the admin and config files, if you want
Code:
cd engine
vi serveradmin.xml
vi serverconfig.xml
create a directory to put the logs in
start the server
Code:
LD_LIBRARY_PATH=$installdir/linux_files LC_ALL=C $installdir/engine/7DaysToDie.x86 -- -logfile $installdir/engine/logs/output_log.txt -configfile=$installdir/engine/serverconfig.xml -dedicated
P.S. You might want to install tmux, dtach, or screen so you don't tie up your terminal. It's easiest to use one of those to run bash, and then run the command to start the server.
- - - Updated - - -
Here's the same instructions, just in one long code block instead of broken up with explanations:
Code:
installdir=$(pwd)
wget http://illy.bz/fi/7dtd/management_scripts.tar.gz -O - | tar -xf -
wget http://illy.bz/fi/7dtd/linux_files.tar.gz -O - | tar -xf -
mkdir steamcmd
cd steamcmd/
wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz -O - | tar -xf -
./steamcmd.sh +quit
./steamcmd.sh +@sSteamCmdForcePlatformType windows +login loginnamegoeshere +force_install_dir $installdir/engine "+app_update 294420" validate +quit
cd ..
cp -R linux_files/engine/* engine/
cp engine/7DaysToDie_Data/Managed/Assembly-CSharp.dll engine/7DaysToDie_Data/Managed/Assembly-CSharp.dll_orig
cp management_scripts/usr/local/lib/7dtd/server-fixes/* engine/7DaysToDie_Data/Managed/
cp engine/Install/32bit/SteamworksManaged.dll engine/7DaysToDie_Data/Managed/
cp management_scripts/home/sdtd/templates/admins.xml engine/serveradmin.xml
cd engine/
vi serveradmin.xml
vi serverconfig.xml
mkdir logs
LD_LIBRARY_PATH=$installdir/linux_files LC_ALL=C $installdir/engine/7DaysToDie.x86 -- -logfile $installdir/engine/logs/output_log.txt -configfile=$installdir/engine/serverconfig.xml -dedicated