I had a little trouble when installing this at house. So for you, this is a little how-to.
Installing a Battelfield 2142 dedicated server
Hardware requirements:
From the original readmeserver.txt. Seem to be very accurate.
- Minimum Specification, based on playing a 16 player game:
CPU: 1 Ghz
RAM: 256 Mb
- Recommended Specification, based on playing a 64 player game:
CPU: 3 Ghz. For AMD Athlon 64 CPU: 3500+ (2.2 Ghz)
RAM: 2 Gb
- Recommended Specification, based on playing a 48 player Titan game:
CPU: 3.6 Ghz. For AMD Athlon 64 CPU: 4800+
RAM: 2 Gb
Software requirements:
Linux or FreeBSD (with linux compatibility activated) installed.
Glibc 2.4 installed
Latests dedicated version of Battlefield 2142 server:
Largedownloads.ea.com
Note: My linux server was running Debian etch 4.0, but the glibc version is 2.3.6. I had to update to unstable (lenny) wich comes with glibc 2.7. Before updating, dedicated server didn't want to start.
Installation
Download the dedicated server. We will have a zip file, so we need to extract the installer. Open a console and change to the directory where you downloaded the file and execute:
unzip bf2142-linuxded-1.10.48.0-installer.zip
It will extract a lonely file called "bf2142-linuxded-1.10.48.0-installer.sh"
In need execute privileges. So type in the console:
sudo chmod u+x bf2142-linuxded-1.10.48.0-installer.sh
And lastly, we'll execute the decompressed installer:
sudo sh bf2142-linuxded-1.10.48.0-installer.sh
Now two licenses will be presented. One is for the dedicated server and the another one is for punkbuster.
Finally enter an instation path like "/usr/share/" or if you wish "/home/user/". A subfolder called bf2142 with the server will be created. The files will be unzipped at those folder
Configuration
Now change to your Battelfield 2142 dedicated server folder. If you followed some of the previous suggestions, it will be named "/usr/share/bf2142" or "/home/user/bf2142".
To edit the general settings, you will need to edit the "mods/bf2/settings/serversettings.con"
It can be done with nano. Note the -w parameter to disable line wrap, it makes easier editing this file:
sudo nano -w mods/bf2/settings/serversettings.con
The map rotation is contained in the file "mods/bf2/settings/maplist.con" so to edit the rotation map will do:
sudo nano -w mods/bf2/settings/maplist.con
Starting the server
When all is configured (maybe i'll do another post about configurations) just can start your server just typing:
./start.sh
But it needs a console I/O permanently, so it better to use the screen command. The standard command is:
screen ./start.sh
Use (ctrl-a) then (ctrl-d) to detach from the screen session. The server will keep running in background. To retach to the server, typen the following command:
screen -r
If you wish to start the dedicated server from another script, then you will need the dedicated server to go automatcly to background. It can be done with these command:
screen -fa -d -m -S bf2142 ./start.sh
Note that assigns a name to the screen session called bf2142 so if we have more than one screen session, we can retach just typing
screen -r bf2142
So that' all. Maybe in the future I'll complete some details, like making an autostart script, setting mod parameters, or looking in the settings.
So meanwhile, i expect that this little how-to is usefull for you.
Note: Battlefield 2 follows the same steps. The difference is the file to download. The 1.41 version isn't in the EA download server, so you will have to look for the "bf2-linuxded-1.1.2963-795-installer.sh.gz". You can found more information here. And if you want to install in a FreeBSD system, check out this link.