Installation Guide
07/28/2000
Freemed-YiRC Beta0.13
---------------------

Freemed-YiRC Beta0.13 is the thirteenth public release Freemed-YiRC!  Therefore
it's still kinda rough around the edges :).  But it's getting much, much better!

BEFORE YOU BEGIN
----------------
	Freemed-YiRC is coded in PHP and uses PostgreSQL or MySQL as it's DB.
	Therefore, you need a DB running (on Linux), as well as a copy of PHP
	with your DB support binded to Apache.  This sounds like a lot, but if
	you get a copy of RedHat (6.x, preferably) or Mandrake (7.0), and do a
        FULL INSTALL, it should work.  If you don't, every necessary package
	(like the PHP modules) may not get installed correctly.

	TO ENABLE PHP on your apache server (RedHat 6.1):
	Even with a FULL install, PHP is not enabled due to security reasons.
	To enable it, you need to uncomment a few lines in your
	/etc/httpd/conf/httpd.conf file.   The lines are:

		LoadModule php_module		modules/mod_php.so
		LoadModule php3_module		modules/libphp3.so
		LoadModule perl_module		modules/libperl.so

		AddModule mod_php.c
		AddModule mod_php3.c
		AddModule mod_perl.c

	Note that these two sections are in different parts of the httpd.conf
	file.  To make it easy, load up vi and just do a search for 'php',
	and uncomment every line that has php in it (as well as the perl lines).	
	OK.  Save the file.  Next to you need to make sure that Apache
	recognizes .php3 files as valid PHP script files.  You need to 
	modify the line:

	DirectoryIndex index.html index.shtml index.cgi 
	(yours may not look exactly like this, but it must start with
	 DirectoryIndex)

	And add index.php3 to it...  so it should look something like this:

	DirectoryIndex index.html index.shtml index.cgi index.php3

	Finally, you need to find the line:

	#AddType application/x-httpd-php3 .php3

	And uncomment it.  Just remove the '#' in front of the line.
	OK?  Good.  Save the file.

	The last thing you need to do to enable PHP is
	to re-start the Apache web server.  To do this using RedHat 6.x,
	issue the following command:

		/etc/rc.d/init.d/httpd restart

	This should stop and start your webserver.  If when you restart
	you find you get errors stating that some file is not found, your
	installation wasn't complete and all the necessary files weren't
	installed.  If you're using RedHat (I think Mandrake is the same
	way...) then it's NO BIG PROBLEM.  DON'T PANIC!!  Just whip out
	your trusty Linux CD and find the php-pgsql*.rpm.  On RedHat's
	CD it's located in /etc/RedHat/RPMS.  Then all you need to do
	is install that RPM.  Hard?  NO WAY.  Just do this:

	cd (mounted cd-rom drive)/RedHat/RPMS
	rpm -i php-pgsql*.rpm

	And viola!  It should work like magic.  Restart your webserver
	(AGAIN) using the command above, and you should be A-OK.

	TO ENABLE PHP on your apache server (Mandrake 7.0):
	If you do the 'recommended' install for Mandrake, all the RPMs
	don't get installed by default.  However, PHP is enabled by default
	so you don't have to edit the above files.  All you have to do is to
	install the following RPMS:
		mod_php-3*.rpm
		mod_php-manual*.rpm 
		mod_php-pgsql*.rpm

		If you're going to use PostgreSQL:
		postgresql-6*.rpm
		postgresql-server*.rpm
		postgresql-devel*.rpm
		postgresql-odbc*.rpm

		If you're going to use MySQL:
		MySQL-3*.rpm
		MySQL-client*.rpm
		MySQL-devel*.rpm
		MySQL-shared-libs*.rpm

	Restart your apache daemon and off you SHOULD go!

HOW TO INSTALL
--------------
	1.  Take freemed_yirc-VERSION.tgz and put it somewhere in your web
	    server's directory structure.
	    NOTE:  Please do not put Freemed-YiRC on a public web server, as
	    it has not been fully tested against security problems.  Please
	    place it on a private (or intranet) web server...  unless your
	    goal is to shoot holes through it :).  If that's your perogative,
	    then do it!

	2.  Gunzip and untar it:
		gunzip freemed_yirc.tgz
		tar -xvf freemed_yirc.tar
		It should unpack itself into a directory called 'freemed-yirc'.

	3.  Modify the 'freemed_yirc-vars.inc' file to reflect your 
	    webservers IP address as well as the PostgreSQL database name
	    and PostgreSQL user name.  You only need to be concerned with
	    the following lines:

		$fydb_type = "psql"
		$fydb_name = "freemed_yirc"
		$fydb_user = "postgres"
		$fydb_host = "10.0.1.1"

	    Now, Freemed-YiRC doesn't create the freemed_yirc database itself,
	    the scripts only do the tables.  So you need to create a database
	    called 'freemed_yirc'.  Of course, you can call it whatever you
	    want.  If you call it something else, you must replace 
	    'freemed_yirc' in the freemed_yirc-vars.inc file with the name of
	    the database you've created.  If you don't know how to create
	    SQL databases, you should check out a good book on SQL.  In any
	    case, the most simple way to do this is to start up psql (for
	    PostgreSQL) or mysql (for MySQL) and issue the following command:

		CREATE DATABASE freemed_yirc;
	
	    That should do it.

	    As for the $fydb_user, this should be a valid PostgreSQL user name
	    (mysql for MySQL).  Obviously, this is very insecure.  It isn't
	    to be bullet-proof, yet.  So fill in a user name here.  At this
	    point I don't have the password option implemented.  So if you've
	    got a password associated with your user, plese make a different
	    user without a password!  (SORRY!  I will work on this!).

	    Finally, the $fy_db needs to be the IP address OR hostname of your
	    database server (usually the same as your webserver).  The 
	    default probably doesn't match yours, so please enter in the
	    right value!!!
	

	4.  Run the SQL table creation scripts.  These are located in the 
	    'DB' directory, under the directory for our database server.
	    In order to run this, you need to have a database created and the
	    database daemon running.  Go to your DB directory and issue the
	    following commands (remember that if your database is called
	    something different than 'freemed_yirc', then you need to modify
	    the following command files!):

		make_psql (PostgreSQL)
		make_mysql (MySQL)

	    The makedb script makes the basic tables.  The makedb_con script 
	    creates the Contact System's tables.  The makedb_ir script creates
	    the Incident Report tables.  
	    The filldb scripts enters 'filler' data into these tables (i.e.
	    the root users name and password, etc...).

	5.  Make the 'usr', 'DB/postgresql', and 'DB/mysql' directories 
	    writable for everybody!

		chmod 777 usr
		chmod 777 DB
		chmod 777 DB/postgresql
		chmod 777 DB/mysql


OK?  Now you should be ready to go!!!

Go ahead and start up your browser.  Enter in the appropriate URL.  For instance
if your webserver is named 'bobjohnson', then enter:
	
	http://bobjohnson/freemed-yirc/

(DON'T forget the last forward-slash!  Sometimes not having this causes
 problems!!!)

If everything worked OK, you should see a the Freemed-YiRC login screen.
It should look something like this:

            +-----------------------------------------------+
            |	    	Freemed-YiRC                  [<][X]|
            |   Username:                                   |
            |   Password:                                   |
            |                   Login Clear                 |
            |                                               |
            |	Welcome to Freemed-YiRC Version Beta0.13!   |
            +-----------------------------------------------+

Freemed-YiRC Beta0.13 should be installed!
For a starter guide to Freemed-YiRC, please read the file 'GETTING_STARTED'.
Also, for more info, read the README file and the PROGRAMMING_STYLE guide!!!
