User:Arek75/Installing the Linux Dedicated Server/OldInstructions

Installing the NWN Dedicated Server for Linux, advanced method.

This installation method is fairly advanced, and intended for people who are:
 * Starting a PW server,
 * Running games all the time (every day, sometimes multiple games on the same day, for instance),
 * Hosting a server for somebody else (PW or not), or
 * Want a more secure envorinment to run NWServer in for any reason.

First things first, assumptions:
 * You already have linux installed on your server. If you don't, then you need to install linux on your server.  I recommend Ubuntu 7.10 Server Edition (http://www.ubuntu.com).
 * When showing you what commands to use in a codebox, I will be assuming that you're using Ubuntu linux. Debian users should be able to use the exact same commands.  Other distros differ in some of these commands, and I am not familiar with their versions - in particular, installing packages works differently on non-ubuntu/debian systems, as are some package names.
 * You know how to do basic stuff from the command line in linux such as copy files, make directories, etc.
 * You already have NWN installed on a windows machine somewhere, and your server is on the same local network as the windows machine. This is because I will be having you use windows file sharing to transfer the files to your server.[/list]

Beginning the installation: First, create a new user and group for NWServer (called nwn for reference):

Now, add your user to the 'nwn' group:

Make a directory to install nwserver into:

Make your nwn folder available to your linux box: Back on your server... Make a mount point for your NWN install: Start this by creating a mount point for the media:
 * 1) On the windows machine with NWN installed, open C:\NeverwinterNights (or the folder above wherever you installed NWN)
 * 2) Right-click on the NWN folder
 * 3) Select "Sharing ans Security"
 * 4) In the dialog that opens, you'll either see a couple of checkboxes for sharing and a box to put the share name in, or you'll see a warning to use the "network setup wizard" to set up sharing.
 * 5) *If the warning appears, click it, then in the resulting dialog check "Just enable file sharing" and click OK (If you want to enable the built-in windows firewall to "protect" your computer from hackers, you can use the wizard, but I've never used it since I have a decent hardware firewall on my network).
 * 6) Now that file sharing is enabled (if you needed to enable it), you should check the box that says "share this folder on the network". The share name should default to NWN, which is fine.  Don't check the other box, you don't need it.  Click OK.  Leave the folder open for now.

Now mount the install: The above is needed since Ubuntu doesn't install the cifs/smbfs mount helpers by default. After entering your password to run mount, you'll be prompted for your windows password. Enter it if you have one; otherwise just hit enter. Replace "User Name" with your windows user name, and //windows/nwn with //(the computer name of your windows box)/(the "share name" of your nwn share).

Once this finishes, you can (and should) stop sharing the NWN folder. To do so, go back to your windows machine, right-click the NWN folder and select "Sharing and Security" again, uncheck the box you checked earlier, and press OK. This will stop windows from sharing your NWN folder.

One last thing you'll need before you begin the actual installation: Unzip isn't installed by default on ubuntu, but is needed in order to unzip the dedicated server for later use, since Atari/Bioware chose not to provide seperate downloads for each platform.

Now that we've done that, switch to the 'nwn' user: Notice that that's -s, not -i. -i won't work because nwn's shell is set to /bin/false (and so you need to stay in your current shell). (needed because, despite what the prompt says, we're still in your home directory, not nwn's).

and set your umask (default read/write permissions) appropriately: This will make sure that you'll be able to write to the files you need to later without having to switch to the nwn user. Be sure you either let the server create any new files you need, create them as nwn, or sudo chown/chmod them later. If you don't, you might get errors when running nwn.

Change to the directory we're going to install nwserver into: and copy your nwn files there If you get any errors, make sure that you included the trailing ".", then check that you followed all of the previous steps (paying particular attention to the chown you were supposed to do earlier). Once this gets started, I suggest you go find something to do. It'll probably take a while (it took about 20 minutes on my network). If you're doing this over the internet (if you are, I sure hope you're not using windows file sharing), I suggest you go to work/bed, and have other things to do for the next day or 2, because unless you have a commercial broadband connection (T1/E1/ISDN PRI or better), this is going to take a very long time (estimated to about 23.25 hours at 768kbps, which is about the best upstream money can buy for DSL/Cable connections), or better still see if your provider can make the files available at his/her end.

Now to download and install the server: (go have lunch or something, this will take at least a few minutes)

Once that's done, unzip the files: When asked, tell unzip to overwrite [A]ll files.

And run the fixinstall script to make sure everything is installed correctly:

Ok, basic installation should be almost done now...all that's left to do is to set up a startup script. The easiest thing to do here is to start up nano: and enter the following code into it: Then press ctrl-o, enter, then ctrl-x. That will put you back on the command prompt. Note: You might be tempted to create this file on windows and copy it to your linux computer. Please don't. It might work, but it might not. If you do, and your server barfs on it, don't say I didn't warn you.