Introduction:
This topic covers the installation and configuration of a Battle.net compatible gaming server. With such a server, it is possible for you to allow other users to connect and play games like Starcraft and Diablo with you and each other! Best of all, installation is quick and relatively easy.
To avoid any permission problems, make sure you're logged in as the 'root' user. All of the installation and configuration takes place at the command-line in this HOWTO.
Step I: Installation
1. Download the server program.
There are a couple of server programs you can choose from, but this HOWTO will use the BNETD [http://www.bnetd.org/ ] Battle.net server program. At the time of this writing, the latest recommended version is 0.4.25pre3, which can be downloaded from the official BNETD web site at [http://www.bnetd.org/files.php].
Once you have downloaded the file to your YDL machine, you need to expand it. Make sure you're in the same directory as the file you just downloaded and type:
tar zxvf bnetd-0.4.25pre3.tar.gzThis will decompress the archive and create a new directory called "bnetd-0.4.25pre3" where you're at.
2. Compile and install the server.
Inside the new folder called "bnetd-0.4.25pre3" are other folders and files. In particular, there's a folder called "src" which contains the source code of the server. You need to navigate to that folder by typing:
cd bnetd-0.4.25/srcOnce inside, you may like to type "ls" to look around a bit. You'll notice that there's a file called "configure". It's a script that will prepare for the installation to take place. To execute it, type:
./configureAmong other things, the script will make sure your compiler (gcc) is working correctly. If you receive an error at this point, you probably do not have a compiler installed or it's not configured properly. If you don't get any errors, the script will happily report that it created a Makefile for you. Now type:
makeThis will start the compiling process, which may take a while depending on how fast your computer is. Throughout the duration, you're likely to come across a lot of warnings, which are usually OK. If the compiling stops, however, and you come out with an error, you should try to compile it one more time by typing "make" again.
If you continue to experience problems compiling, make sure once again that you've installed a compiler and that it's set up correctly. Once compiling succeeds without any errors, you can go on. Next thing we want to do is install the server by typing:
make installThis will move files around to the places they need to be so you don't have to. If you already have a previous version of BNETD installed, this command may replace some of your configuration files.
If you've made it to this point, your new Battle.net server is installed and the worst of it is over!
Step II: Configuration
1. Test and configure your server.
Being installed, your server should work without any configuration. To start your server, simply type:
bnetd -fThe -f option simply means that bnetd will run in the foreground. This is fine for testing purposes. If you get "command not found" errors, you may need to type the whole path:
/usr/local/sbin/bnetd -fIf everything is working correctly, nothing should happen when the server is launched. It should *not* put you back to the shell prompt; it should just sit there until your press
In order to test your server to make sure it is working properly, you'll need to actually connect to it through a Blizzard Entertainment game or even a Battle.net chat program or bot. I recommend first testing it with a chat program because it is easier to enter IP addresses into them than into a Blizzard Entertainment game. Once you've confirmed that your server is working, you'll probably want to do some configuring. To edit the main configuration file, type:
pico /usr/local/etc/bnetd.confThis file will allow you to change many of the behavioral features of the server. You may also like to look inside some of the other configuration files in that directory by typing:
cd /usr/local/etcwhere XXX is a name of a file that appears on the screen after the "ls" command. Remember: it's always a good idea to edit a *copy* of a configuration file so you have something to fall back to if you do something wrong.
ls
pico XXX
2. Create a new "admin" account.
If you would like to have an admin account, first create a regular account with a Blizzard Entertainment game. Then go to the directory where your users are stored:
cd /usr/local/var/usersThe account you just created should be in this directory. To make sure, type "ls". If there is nothing there, try restarting the BNETD server. Now open your account file by typing:
pico XXXwhere XXX is the name of the account you created. Somewhere in the file, type:
"BNET\\auth\\admin"="true"Save the file by typing
In order to connect to your new server with a Blizzard Entertainment game, you'll need a server selector utility, which can be obtained at the official BNETD web site at [http://www.bnetd.org/files.php ]. If BNETD does not have a server selector utility that works on the platform you want to use for your Blizzard Entertainment game (i.e. Mac OS), you will need to search the internet for one. Using Mac OS as an example, I suggesting using keywords like "server gateway editor selector for Mac OS" in your search query. Alternatively, if you're handy with Res Edit, you may also edit the Battle.net gateway resource (of type 'HKEY') in your Starcraft Prefs file.
Conclusion:
The installation process was pretty straight forward and quite similar to installing any other Linux program. If you ran into some problems, don't despair! The most common problem is your compiler isn't set up right. Make sure you've got the packages gcc, glibc, and make installed from your YDL 2.1 CD. Other than that, everything should run smoothly and you should be able to host your own multiplayer games on your own server!
This HOWTO was written by Chaz McGarvey





