Yellow Dog Solutions

TOPIC: Host your own Battle.net(tm) gaming server on YDL 2.2



Introduction:
This topic covers the installation and configuration of a Battle.net(tm) compatible gaming server. With such a program, it is possible for other people to play games like Starcraft(tm) and Diablo(tm) with you and each other on your own server! 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 www.bnetd.org/ Battle.net(tm) server program. At the time of this writing, the latest version is 0.4.26, which can be downloaded from BNETD's SourceForge CVS account http://sourceforge.net/cvs/?group_id=6933. To download it, you'll need the CVS program. Navigate (using the cd command) to the directory you want the BNETD installer to download to. Now issue the following commands:
cvs -d:pserver:anonymous@cvs.bnetd.sourceforge.net:/cvsroot/bnetd login [ENTER]
cvs -z3 -d:pserver:anonymous@cvs.bnetd.sourceforge.net:/cvsroot/bnetd co bnetd [ENTER]
If your shell tells you that the 'cvs' command can't be found, you'll need to obtain a copy of CVS and install it on the machine you're trying to download to. If everything worked, cvs should be downloading files. Overall, it should be about 4.8MB worth of files. Wait until cvs is done and puts you back at the command line. If you type "ls" now, you'll notice a new directory called "bnetd-0.4.26" where you're at.

2. Compile and install the server.
Inside the new folder called "bnetd-0.4.26" 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.26/src [ENTER]
Once 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:
./configure [ENTER]
Among other things, the script will make sure your compiler (probably 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 report that it created a Makefile for you. Now type:
make [ENTER]
This 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. That is almost always the problem. Once compiling succeeds without any errors, you can go on. Next thing we want to do is install the server by typing:
make install [ENTER]
This will move files around to the places they need to be so you don't have to. Note: 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(tm) 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 -f [ENTER]
The -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 -f [ENTER]
If 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 [control]-Z to stop the server.

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(tm) 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.conf [ENTER]
This 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/etc [ENTER]
ls [ENTER]
pico XXX [ENTER]
where 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.

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/users [ENTER]
The 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 XXX [ENTER]
where XXX is the name of the account you created. Somewhere in the file on a new line, type:
"BNET\\auth\\admin"="true" [ENTER]
Save the file by typing [control]-O and exit pico by typing -X.

In order to connect to your new server with a Blizzard Entertainment game, you'll need a server selector utility. I suggest using one of the following tools:


For Mac OS X:
Battle.net Server Editor
www.macstorm.net/modules.php?op=modload&name=Downloads&file=index& req=viewsdownload&sid=2


For Windows:
Multiple
www.starcraft.org/downloads/downloadbnet.shtml


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.2 CD. Other than that, everything should run smoothly and you should be able to host multiplayer games on your own server!
This HOWTO was written by Chaz McGarvey



 
          Copyright ® 1999-2010. Fixstars Corporation. All rights reserved.
YDL.net Fixstars Corporation