<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[First Strike Forums — Dedicated Linux Server Tutorial]]></title>
	<link rel="self" href="https://forums.fsmod.com/extern.php?action=feed&amp;tid=8771&amp;type=atom" />
	<updated>2009-03-06T20:14:10Z</updated>
	<generator version="1.4.5">PunBB</generator>
	<id>https://forums.fsmod.com/viewtopic.php?id=8771</id>
		<entry>
			<title type="html"><![CDATA[Dedicated Linux Server Tutorial]]></title>
			<link rel="alternate" href="https://forums.fsmod.com/viewtopic.php?pid=122569#p122569" />
			<content type="html"><![CDATA[<p>First, download the required files:<br /></p><div class="codebox"><pre><code>wget ftp://largedownloads.ea.com/pub/patches/BF2142/1.50/bf2142-linuxded-1.10.48.0-installer.zip
wget http://www.woodat.com/firststrike_v1.30_serverfiles.rar
wget http://www.woodat.com/builds/firststrikeserver1.4updater_linux.zip</code></pre></div><p>Next, unzip the 2142 server installer with:<br /></p><div class="codebox"><pre><code>unzip bf2142-linuded-1.10-48.0-installer.zip</code></pre></div><p>Now, run the 2142 server installer.<br /></p><div class="codebox"><pre><code>sh bf2142-linuxded-1.10.48.0-installer.sh</code></pre></div><p>Your server files will now begin to install, and you&#039;ll be prompted to agree to the EA and PB EULA.&nbsp; After these two prompts, you will be asked for the directory you wants to install your server to.&nbsp; You may install it wherever you please.&nbsp; For the sake of this guide, we will use &quot;/home/bf2142server&quot;.</p><p>So, now you have the 2142 server installed, it&#039;s time to install First Strike to it, the first step is to extract the 1.3 server files to the mods folder.&nbsp; To do this, type the following command (assuming you installed to &quot;/home/bf2142server&quot;, replace with your actual path)<br /></p><div class="codebox"><pre><code>unrar x firststrike_v1.30_serverfiles.rar /home/bf2142server/bf2142/mods</code></pre></div><p>Now, we&#039;ll extract the server updater with the following command<br /></p><div class="codebox"><pre><code>unzip firststrikeserver1.4updater_linux.zip -d /home/bf2142server</code></pre></div><p>Now, we can boot up our server for a test run and first update.&nbsp; To do this, run the following command<br /></p><div class="codebox"><pre><code>python /home/bf2142server/bf2142/FirstStrikeServer.py</code></pre></div><p>Once this starts up, your server will begin to update to the latest version of First Strike before launching.&nbsp; This may take a few moments on the first go, so be patient.&nbsp; While running, your server will periodically check to see if a new version has been released and keep your server up to date.&nbsp; It will only update if your server is unoccupied, so don&#039;t worry about it emptying out your populated server.</p><p>Once the update is done, your server should begin to load up on the default maplist and configurations.&nbsp; Likely these settings aren&#039;t right for you, and will need some tweaking, so go ahead and kill the server (CTRL + C Twice, once for the main server and once for the Updater) Now, we can begine editing the server settings.</p><p>Using your favorite editor, the first file you&#039;ll want to edit is the serversettings.con:<br /></p><div class="codebox"><pre><code>mcedit bf2142/mods/firststrike/settings/serversettings.con</code></pre></div><p>Note: You can also use joe, emacs, vi(m) or nano instead of mcedit. Any editor you feel comfortable with.</p><p>It&#039;s very important that you change sv.internet to 1, sv.serverIP to your server&#039;s IP and sv.interfaceIP to your server&#039;s IP as well or it will not be visible online.&nbsp; You&#039;ll also probably want to change a few other settings to fit your needs, such as sv.ServerName, but these are self explanatory.&nbsp; Once you&#039;re finished, save serversettings.con and close the editor.</p><p>You can also edit the maplist.con in the same way to change what maps are in your rotation.</p><p>Once these files are edited, you&#039;re ready to start up your server for regular use.&nbsp; To do so, simply type the following command<br /></p><div class="codebox"><pre><code>python /home/bf2142server/bf2142/FirstStrikeServer.py</code></pre></div><p>Your server should now be up and running and read to join.&nbsp; If the server should crash, it will be started back up automatically.&nbsp; However, if you wish to start your server on boot, you will have to configure this yourself.&nbsp; The following will setup your server to start on boot on a debian-based distro:</p><div class="codebox"><pre><code>add a short script in /etc/init.d
called _gameserver.sh which puts your server in an accessible screen session on each boot.
You can then view your server session using screen -r bf2142_fs but you have to install the screen utility first.
Anyway, let&#039;s add the start-up script.
mcedit /etc/init.d/_gameserver.sh
with these contents:

#!/bin/sh
# Start gameservers on boot-up

case &quot;$1&quot; in
&#039;start&#039;)
    screen -dmS bf2142_fs python /home/bf2142server/bf2142/FirstStrikeServer.py 
    ;;
&#039;stop&#039;)
    ;;
*)
    echo &quot;Usage: $0 { start | stop }&quot;
    ;;
esac
exit 0
Note: This is for Debian-based Distros only! I don&#039;t know where other distros have their start-up scripts.</code></pre></div><p>Thanks goes to Svenstaro for pieces of this tutorial.&nbsp; If you have any problems let me know.&nbsp; Info on adding 2142cc support will be added in the near future.</p>]]></content>
			<author>
				<name><![CDATA[Imperial]]></name>
				<uri>https://forums.fsmod.com/profile.php?id=587</uri>
			</author>
			<updated>2009-03-06T20:14:10Z</updated>
			<id>https://forums.fsmod.com/viewtopic.php?pid=122569#p122569</id>
		</entry>
</feed>
