Requirements:

 Netacct-mysql (> 0.73rc2) depends on libpcap and mysql so you'll need to have
 both of them.
 Make sure that is installed these packages:

 RedHat:

 Debian:
  libmysqlclient
  libmysqlclient-dev
  and all packages which depends on libmysqlclient 

 *BSD or linux distributions:
  don't know them but must be something similar

 Othewise you need to compile the yourself. Download them from:

  libpcap: ftp://ftp.ee.lbl.gov/libpcap.tar.Z
  mysql: http://www.mysql.com

 Note: If you want you can use old version 0.73rc1 which depends only on mysql but compiles and run only on linux platforms.
 
Installation:

 Make sure that you've readed requirement section. Download source archive and
 type:

  $ zcat netacct-mysql-0.7x.tar.gz|tar -xvf -
  $ cd netacct-mysql-0.7x

  $ ./configure
  $ make
  $ su -
  # make install (as root)

 by default when `make install' is run it will copy nacctd in /usr/local/sbin
 and naccttab in /usr/local/etc/naccttab.
 if you want to install it somewhere else just give --prefix=/your/install/dir 
 to configure script or only config file in different dir use --sysconfdir=/path/to/etc.

 Example:

 $ ./configure --prefix=/usr
 
 netacct-mysql will be installed in /usr/sbin and config file in /usr/etc

 Example:

 $ ./configure --prefix=/usr --sysconfdir=/etc
 
 netacct-mysql will be installed in /usr/sbin and config file in /etc
 If configure script can't find mysql try to give --with-mysql=/your/mysql/install/dir, 

 Example:

 $ ./configure --with-mysql=/usr 

 or 

 $ ./configure --with-mysql=/usr/local/mysql

 If it can't find libpcap includes or libraries try to give full path with ./configure --with-libpcap-includes=/path/to/includes --with-libpcap-libraries=/path/to/libraries

 Example:

 $ ./configure --with-libpcap-includes=/usr/local/include --with-libpcap-libraries=/usr/local/lib

Preparing mysql:

 - Create database, table, user, pass and etc.
 Important:
 Edit netacct.sql and change password for user acct

 $ mysql -u root -p < netacct.sql

 If you want you may change user "acct" with which the program connects to 
 mysql. Look at naccttab (config file) for more info.
  
  The /etc/init.d/ scripts  
  Debian: look at contrib/ dir for init.d script for debian

  RedHat: look at contrib/ dir for init.d script for redhat (thanks to 
  xerxes@eda.bg)

   cp contrib/nacctd.redhat /etc/rc.d/init.d/nacctd
   chkconfig --add nacctd

  Other: not supported yet but if you write some init.d script and want to be
  included here .. just send it to me :)
   
Other Platforms:

  I've tested it on FreeBSD 4.3 and OpenBSD 2.9 and it compiles and works but it needs more testing, so please report any bugs, problems or successful compiling/running on this platforms.
    
Latest version:
 
 *Official site*
 Download latest version from http://sf.net/netacct-mysql
 
 *Mirrors*
 ftp://debian.gabrovo.com/pub/linux/netacct-mysql

Upgrade:
 
 From >= 0.73rc4 there is new table in mysql. It is called traffic and is for
 compactnet logging. See netacct.sql and add this table with all fields to 
 mysql.
