Installation
Type this command to start installing “sh bf2-linuxded-1.0.2442.0-installer.sh”. This will unpack the install files and prompt you to go to the EULA for Battlefield 2. Once you agree to it you'll also have to agree to one for Punkbuster. After you say yes to the Punkbuster document, it will prompt you for an install directory. This is the directory that you want the game files to reside in. Now, it will make a bf2 directory wherever you give it a path, so if you don't want to, you don't have to make a special directory for it. For example, let's say that you want to run the server as a user named bf2server and your home directory is /home/bf2server, you can just make the path “/home/bf2server” and it'll make a bf2 directory for you.
We're getting close now, we just need to do some configuration. The first thing we need to look at is the “serversettings.con” file located in the mods/bf2/settings directory. You'll need to open this file up with your favorite text editor, I use NANO but there are plenty out there to choose from. This file is the basic configuration file for your server. We're going to go through the important lines here (Note: this is not a full list, I have dropped certain commands that don't need to be altered and are fine like they are or don't have much impact on the actual gameplay. Overall, very few lines have been removed.):
sv.serverName "Default Server Name"
This setting is used to set the name that the rest of the world sees your server as.
sv.password ""
If you want to set a password that people will have to use to access your server, you set it here.
sv.internet 0
This setting is used to broadcast your servers information to the list servers so that everyone can see it. If you want it to be a public server, set this to 1 otherwise leave it at 0.
sv.bandwidthChoke 0
If you want to put a cap on how much bandwidth that your server uses, you would put that here.
sv.serverIP ""
This is one of the most important settings. This is where you put the IP address of your server.
sv.serverPort 16567
This is the port that your server listens on for Battlefield 2 connections. You can change this if you want, but make sure you check a port list to see whats reserved for other things. It defaults at 16567.