'Just For Fun' Network Management System Version 0.7.x

	    By Javier Szyszlican
======================================================

----------------------------------------------------------------------
If you are a technical writer, want to be one, or happen to be 
inspired... We need your contribution with the Documentation.
----------------------------------------------------------------------

Please contact me if you need anything or want to participate : ) 


Requirements:
=============

-Operating System:
    .*NIX (Development is on GNU/Linux, It has been tested on FreeBSD and Solaris too)
    .Windows 2000/XP also works (A good crond for windows will be useful). 
	If you are installing on Windows please read the INSTALL.win32.txt file.
    
-Apache & Apache-Devel RPM's or Source ( > 1.3.x or > 2.0.x)

-MySQL & MySQL-Devel RPM's or Source ( > 3.23.x or > 4.0.x ) or PostgreSQL ( > 7.1.2 )

-RRDtool Source or RPM (www.rrdtool.org) for Graphs (Tested on 1.0.33 to 1.0.37)

PHP:

    -PHP4 Source ( >= 4.1.2 ) 
	-NET-SNMP,Devel & utils (4.2.5 or 4.2.6) RPM or Source
	You will need OpenSSL & Devel if your SNMP was compiled with OpenSSL support
	-GD & Devel RPM's
or 
    -PHP4 RPM and php-gd and php-snmp RPM Modules

-NET-SNMP utilities and trapd server (optional) 
-GNU Diff 
-TFTP Server (optional)
-JFF NMS Integration Packages (TACACS+ & Syslog) (optional, useful on routers) 
-Graphviz & WebFonts RPMS (http://www.graphviz.org) (optional)
-NMAP PortScanner > 2.54B (http://www.insecure.org/nmap/) for TCP Port Discovery (optional)
-Fping (http://www.fping.com) for Reachability (Only Linux/*NIX)

Warnings:
=========

If you are trying to install JFFNMS on a RedHat 8 or 9 system, be adviced that the RPMS for PHP and NET-SNMP 
are experimental. 

This applies to any system using NET-SNMP v5 not just RedHat.

Another solution is to use RedHat 7.3 or the RPMS from RedHat 7.3 for Apache,php-* and UCD-SNMP.  
Also, try to use the updates for RedHat 7.3.


Steps:
======

. Compile and/or Install MySQL / PgSQL

. Compile and/or Install Apache

. Compile and/or Install Graphviz and WebFonts (optional)

. Compile and/or Install NMAP
    
    Nmap should be set-uid root if you want UDP port monitoring & discovery to work.

    Execute: 
        # chmod +s /usr/bin/nmap
        # chmod a+x /usr/bin/nmap

. Compile and/or Install Fping

    Verify that the user running the cron jobs, is able to execute fping and that it is set-uid root.
     
    Execute: 
        # chmod +s /usr/sbin/fping
        # chmod a+x /usr/sbin/fping
    
    And you should see something like this:
	-rwsr-xr-x    1 root     adm         28291 May 31 22:14 /usr/sbin/fping

. Compile and/or Install RRDtool (./configure --enable-shared --prefix=/usr or from RPM's)
    JFFNMS will use the RRDtool executable.
    
. Compile and/or Install PHP 

	I M P O R T A N T
	-----------------

    PHP Modules Needed: sockets, snmp, gd, (pgsql and/or mysql), wddx (for satellites), pcre (syslog parsing)

    Be sure to add the required modules to your /etc/php.ini file.
    
    Remember to verify that your modules are loaded with /admin/adm/test.php or the JFFNMS setup screen.

    A N D

    ---------------------------------------------------
    ---------------------------------------------------
    Change This in your php.ini file.

    Register_Globals = On 
    error_reporting  =  E_ALL & ~E_NOTICE
    allow_url_fopen = On
    include_path = .:/usr/share/pear
    
    ---------------------------------------------------
    ---------------------------------------------------

    Also check if your Apache has loaded the PHP Module. 

    Any Change to the /etc/php.ini requires an Apache restart to take effect.

--------------------------------------------------------------
. Read the docs/* files, these are examples of configuration.
--------------------------------------------------------------

. Optional: Install Integration Packages tac_plus and msyslog (read the README and INSTALL files of each program).
    Hints: 
	-If you have problems with mysql when compiling (mysql.h lines ~245 & ~256) change DB to db (lowercase);
	-If you have a linking problem with compress add -lz to the Makefile libraries      
	-msyslog: Remember to change your init.d/syslog to the new binary and command line options. (read the example)

. Unpack the release:
    tar xvzf jffnms-0.7.x.tar.gz 

    You will get a directory called jffnms-0.7.x/ 

    Move it to /opt/jffnms

. Permission Change.

	chown -R apache.apache /opt/jffnms/ 
    
	cd /opt/jffnms/

. Add this to your /etc/crontab:  (if you don't do this, the nms will not work.)

    Change /opt/jffnms with your actual path to JFFNMS.

JFFNMS=/opt/jffnms/engine
*/1 * * * * apache cd $JFFNMS && php -q consolidate.php >/dev/null 2>&1
*/5 * * * * apache cd $JFFNMS && php -q poller.php >/dev/null 2>&1
*/30 * * * * apache cd $JFFNMS && php -q rrd_analizer.php >/dev/null 2>&1
*/30 * * * * apache cd $JFFNMS && php -q autodiscovery_interfaces.php > /dev/null 2>&1
02 4 * * * apache cd $JFFNMS && php -q tftp_get_host_config.php >/dev/null 2>&1
02 5 * * * apache cd $JFFNMS && php -q cleanup_raw_tables.php >/dev/null 2>&1
20 5 * * * apache cd $JFFNMS && sh tmpwatch.sh $JFFNMS >/dev/null 2>&1

    Replace apache with the Apache server user. (usualy nobody, apache or httpd)
    And replace php with the FULL PATH of php. (usualy /usr/bin/php) 

    02 4 means 4:02am you can change it, to suit your config backup needs.


    - Poller Helper check the alarmed interfaces, to allow faster UP's, its optional, experimental, and may use a lot of resources.

	*/1 * * * * apache cd $JFFNMS && php -q poller_helper.php >/dev/null 2>&1


    - If you will use Satellites (Distributed Polling) add:
    
	* * * * * apache cd $JFFNMS && php -q satellite_distribution.php > /dev/null 2>&1

	This Script updates the remote satellite's database.


. Create the Databases

    Manually create the database "jffnms", set the permissions and then import the schema and data.
    
    Replace the 'x' with the jffnms version number.
    
    MySQL:
    ======
	# mysql -u <mysql admin username> -p<password>
	mysql> CREATE DATABASE jffnms;
	mysql> GRANT ALL PRIVILEGES ON jffnms.* TO jffnms@localhost IDENTIFIED BY 'jffnms';
	mysql> FLUSH PRIVILEGES;
	mysql> quit
    
	# mysql -u jffnms -pjffnms jffnms < docs/jffnms-0.7.x.mysql
    
    PostgreSQL:
    ===========
	# psql template1 postgres
	template1=# create user jffnms password 'jffnms' createdb;
	template1=# \connect template1 jffnms
	template1=# create database jffnms;
	template1=# \q
	
	# psql jffnms jffnms < docs/jffnms-0.7.x.pgsql
    
    This will create the jffnms Tables and required records.  

    
    If you are upgrading, read the UPGRADE file.
	
. Configure Apache as follows (from docs/*): 

    1. As a Virtual Host (if you control a DNS server):

	<VirtualHost *>
            ServerAdmin you@yournet.com
            DocumentRoot /opt/jffnms/htdocs
            ServerName nms.yournet.com
        </VirtualHost>

    2. As a sym-link (in Unix):

	ln -s /opt/jffnms/htdocs /var/www/html/jffnms 

	(or the path your apache uses).

    JFFNMS needs to be at the main Document Root, a VirtualHost or a SymLink. (I've not seen it work with ScriptAlias).

. Restart/Reload Apache, MySQL or PgSQL, xINETD (tftpd)

. PHP Module Load Errors are reported to /var/log/httpd/error_log (RedHat)

. Point your browser to http://www.yourserver.com/jffnms/admin/setup.php

    This Script will show you all the configuration options, verify everything is OK before continuing.
    
    Only check the last option (to password-secure this page) when you are absolutly sure that everthing works OK (later). 

. Restart Crond

. Point your browser to http://www.yourserver.com/jffnms (or the domain you have defined).

    Username: admin 
    Password: admin

    And you are now inside the system.

. This is the creation order of the records:

Required:
---------
    Zones (Admin/Hosts/Zones) describe geographical zones (That's the way I use them)
    Customers  (Admin/Users/Customers) own diferent Interfaces
    Hosts (Admin/Hosts/Hosts) reside in Zones
    Interfaces (Admin/Hosts/Interfaces) correspond to a Host and a Customer.
    
Optional:
--------
    Users (Admin/Users/Users) can access the NMS.

    All interfaces are in the Root Map. 
    But you can define a SubMap (Admin/Hosts/Submaps)
    And make a relation beetwen a Interface and a Submap in View
    
Try NOT using the Unknown Records (Uknown Host, Unknown Zone, Unknown Customer,etc). 


More Documentation (in development) is available at http://www.jffnms.org 


=========================================================================

If you need anything, contact us at: jffnms-users@lists.sourceforge.net

Thank You for trying 'Just For Fun' Network Management System

Don't forget to Donate to the project if you find it useful for your work.

=========================================================================
Javier Szyszlican aka SzYsZ
Buenos Aires, Argentina
javier@jffnms.org (please try the mailing list first) 
ICQ #397319
