In order to better fit your needs, Jffnms ebuild has the following USE Flags available:
| USE Flags for Jffnms | Description |
|---|---|
Being written in PHP, Jffnms is heavily dependent on php USE Flags. In order to install Jffnms successfully, it is required that you have your php package installed with (at least) the following USE flags:
| USE Flags for PHP | Description |
|---|---|
Just like any package in Portage, jffnms can be installed with
# emerge jffnms
Jffnms should be installed in
Sometimes you will want to run Jffnms on your local computer instead of a remote server. If this is your case, it is very likely that you don't have an apache setup running. Don't worry about installing apache though, Portage has already done that for you. Nevertheless, you still have to configure and test apache, which (luckily) is pretty straightforward. Start by adding apache to your default runlevel:
# rc-update add apache2 default * apache2 added to runlevel default * rc-update complete.
If you haven't done it yet, it's time to start apache2:
# /etc/init.d/apache2 start
Finally, point your browser at
# nano -w /etc/conf.d/apache2 APACHE2_OPTS="-D DEFAULT_VHOST -D PHP4"
After that, you should create a symlink to the Jffnms install directory in your
Apache document root dir. In Gentoo, by default, Apache uses
# cd /var/www/localhost/htdocs && ln -s /opt/jffnms/htdocs
Now that apache is running, it is time to configure PHP. Jffnms requires that
you set some variables in php.ini in order to run. The php.ini file is usually
located in
# nano -w /etc/php/apache2-php4/php.ini register_globals = On register_argc_argv = On error_reporting = E_ALL & ~E_NOTICE allow_url_fopen = On include_path = ".:/usr/share/php4:/usr/share/php:/usr/share/php/PEAR" short_open_tag = On
Jffnms allows you to use either PostgreSQL or MySQL as its database. Here we'll show you how to create the database and necessary tables where Jffnms will store its data. It's important to note that it isn't necessary to have a database running localy to run Jffnms and except for the fact that you need to run this commands on the remote host, the procedure is the same.
You should add PostgreSQL to your default runlevel so it's started each time you boot your computer.
# rc-update add postgresql default * postgresql added to runlevel default * rc-update complete.
Now you must setup the PostgreSQL database.
# emerge --config postgresql
Now start PostgreSQL:
# /etc/init.d/postgresql start
Once you have your PostgreSQL set up and running, you have to create a Jffnms user and a database to store host data. We provide files to do both.
# psql template1 postgres < /usr/portage/net-analyzer/jffnms/files/postgresql_db
# psql template1 postgres < /usr/portage/net-analyzer/jffnms/files/postgresql_db_table
Finally, you need to create all the tables where data will be stored:
# psql jffnms jffnms < /opt/jffnms/docs/jffnms-0.8.2.pgsql
Once you have run those steps, PostgreSQL database configuration for Jffnms should be ok.
In case you want to run Jffnms with MySQL, the process is a bit simpler. We provide two files to create database, user and tables for MySQL.
# mysql -uusername -ppassword < /usr/portage/net-analyzer/jffnms/files/mysql_db
# mysql -u jffnms -pjffnms jffnms < /opt/jffnms/docs/docs/jffnms-0.8.2.mysql
If you want UDP port monitoring and discovery, you need to set
# chmod +s /usr/bin/nmap ; chmod a+x /usr/bin/nmap # chmod +s /usr/sbin/fping ; chmod a+x /usr/sbin/fping
The poller process is responsible for gathering data from hosts. In order to collect this data at regular intervals, it must be added to crontab.
# crontab -u jffnms /opt/jffnms/docs/unix/crontab # crontab -e -u jffnms
By now, Jffnms should be correctly installed on your system. You still need,
however, to configure Jffms. Luckily, Jffnms provides us with an easy to use
web page where it's possible to configure access to database, user access as
well as check if the current host configuration suffices Jffnms needs. You can
access this web interface through the following URL:
Though Jffnms is a wonderful software, it is a bit hard to get it up and running. So if you run into problems with Jffnms, there are some places where you can look for help:
You may also run into problems when configuring Apache to work with PHP
(specially if you run both PHP4 and PHP5 on the same system). In that case, our