ngBBS - Installation Guide
--------------------------

I.	Untar the archive to a permanent place (/usr/local/ngbbs is
	recommended).
II.	Make sure the path to your perl interpreter is correct in the first line
	of ngbbsd.pl and ngbbsdman.pl

III.	Do any optional changes to the default configuration in ngbbsd.pl,
	described in Appendix A, below.

IV.	Create a MySQL database with the name of ngbbs, and populate it
	using ngbbs.sql. See Appendix B, below.

V.	Start ngbbsd.pl.

VI.	Login immediatly as sysop. The default password is 'ngbbssysop'
	(without the quotes, of course), and you must change this immediatly
	for security purposes.

VII.	Create any users you wish to have. See the sysop guide
	(README.sysop) that came with this package.

VIII.	Review the sysop guide to familiarize yourself with ngBBS's
	commands.



Appendix A:	Configuration
-----------------------------
	There are a few things in the default configuration that you may
want to change. They are in the top of the file ngbbsd.pl where it says:

my %conf = (    'bbsname'       	=>      'Your BBS Name',
                'banner'        	=>      'ngbbs-0.1.6',
                'port'          	=>      23,
                'jail'          	=>      '/usr/local/ngbbs',
                'prefork'       	=>      10,
                'mpc'           	=>      10,
                'tz'            	=>      'CST',
                'dbtype'        	=>      'mysql',
                'dbname'        	=>      'ngbbs',
                'dbuser'        	=>      'ngbbs',
                'dbpass'        	=>      'somepass',
                'user'          	=>      'ngbbs',
                'group'         	=>      'ngbbs',
		'max_con_per_user'	=>	1,
		'max_con_per_host'	=>	5	);

Here are a list of the options and what they are used for:
	bbsname			What you want to call your BBS
	banner			The version of ngBBS you are running, this
				should _NOT_ be changed.
	port			The port you want to listen for connections on.
				Note: if the port is below 1024, ngbbsd.pl must
				be startd by root to bind the socket, but then
				the priviliges will be dropped to the user and
				group you specify in the configuration (see 
				below).
	jail			The installation directory of ngBBS. In the
				future, this will also be the directory that 
				ngBBS will chroot to upon startup.
	prefork			How many processes to spawn. These will be
				spawned as the user and group you specify in
				the configuration (see below).
	mpc			Maximum connections per child (fork). This 
				currently has no effect, because of issues I 
				am still working on (see TODO if you would 
				like to help :)
	tz			Timezone abbreviation.
	dbtype			Database type you are going to user. MySQL is 
				the only tested database. While others may
				work, they are not officially supported.
	dbname			The name of the database we are going to use.
	dbuser			Database user that has full priviliges on the
				database we are using.
	dbpass			The password for the database user.
	user			The username (_NOT_ uid) that we want to switch
				to after binding the socket. User should be 
				non-priviliged and have a shell of either
				/bin/false or /dev/null.
	group			The groupname (_NOT_ gid) that we want to 
				switch to. Same rules apply as for user.
	max_con_per_host	Maximum simultaneous connections per IP
	max_con_per_user	Maximum simultaneous connections per user


Please note, if you want to keep logs and process information, the JAIL/var/log
and JAIL/var/run directories must be writable by the user that you are running
ngbbsd.pl as. For exaple, if you set jail (above) to /usr/local/ngbbs,
/usr/local/ngbbs/var/log and /usr/local/ngbbs/var/run must be writable by the 
user you are running ngbbsd.pl as.


Appendix B:	Database Setup
------------------------------

	Setting up the database is fairly simple. First, login to your
database as root using the mysql console client, then issue the following
commands (change where appropriate):

	CREATE DATABASE ngbbs;
	GRANT ALL PRIVILIGES ON ngbbs.* TO ngbbs@localhost IDENTIFIED BY
		'whatever-you-want-to-use-for-a-password';
	\q

	Now issue the following command from the installation directory
(change where appropriate):

	mysql -u ngbbs -p ngbbs < ngbbs.sql

	The -u specifies the user that you want to run the mysql command as,
the -p specifies to prompt for a password, the second 'ngbbs' specifies the
database we are operating with and the < ngbbs.sql tells mysql to read in
all SQL statements from the file ngbbs.sql.

	This should be all that you have to do to setup the database for
ngBBS. If you have any problems, feel free to contact me at
x86@duskglow.com.
