HOW TO BUILD:
------------
As of DansGuardian 2, the distribution uses gnu autoconf.
The Makefile is auto generated with the "configure" script.

Please read the sections below for your OS for the most widely used
configuration options.

*** Solaris users, please read the Solaris section first. ***

*** xBSD users, please ensure you have bash1 installed first ***

*** OS X / Darwin users, please read the OS X section first. ***


1.	Run the configure (./configure --help) script with
	the help option to see the user selectable settings.
	Default	settings are shown in []'s.

2.	Run the configure (./configure) script with your
	options, if any.

NOTE:
----
	RedHat 6.2 and 7.0 users can run with the default settings.
	RedHat 7.1 and 7.2 will have to change their cgibin.
	OpenBSD and FreeBSD will have to set just about all settings.
	Others, just find your section in this file.

3.	Edit the "Makefile" and verify that all the directory settings
	are correct. If not, re-run the configure script.

4.	"make"** will now build DansGuardian.

5.	"make install" will create the directory structure and install
	all the files in the chosen paths.
	
6.	"make clean" will remove the now un-needed binaries etc.


** You can often use "make -j" or "make -j 99" to compile faster.
   With Solaris and possibly others you may need "gmake" instead of "make".


OPTIONS:
-------
You may change with the configure options:
        prefix		(prefix root path eg /opt/dg)
        installprefix   (make install root prefix - only affects file copying)
	bindir		(where the binary gets placed)
	sysconfdir	(where the config and data files gets placed)
	sysvdir		(where the startup script gets placed)
	cgidir		(where the cgi-bin dir is located)
	mandir          (where the man docs get placed)
	logdir		(where the logs get placed)
	runas_usr	(the system user the daemon runs as)
	runas_grp	(the system group the daemon runs as)
	piddir		(where the pid file gets placed)
        logrotatedir    (where the logrotate.d scripts go)
        gccver          (2 or 3 - if you get compile errors try both)


HP-UX:
-----

No specific notes are available.  Consult your documentation for file paths.  Otherwise follow
the FreeBSD instructions which are likely to work.  (Contributions welcome!)



MACOSX:
------

*** Note in order to do any compiling in OS X you need to install ***
*   the Developer Tools - an additional pkg called BSDSDK.pkg.      *

*** Note DG2.7.x does not currently work as it uses poll() which OSX ***
*   lacks.  There is a workaround though.  See:                        *
*** http://groups.yahoo.com/group/dansguardian/message/5027          ***

*** Note OS X version 10.3 now has poll() support see:      ***
*   http://groups.yahoo.com/group/dansguardian/message/6072   *


A standard configure script that should work, provided you have installed
MACOSX and the associated programs in their default locations.

    ./configure --cgidir=//Library/WebServer/CGI-Executables/ \
	--sysconfdir=/usr/local/etc/dansguardian/ \
	--sysvdir=/usr/local/etc/rc.d/ \
	--bindir=/usr/local/sbin/ \
	--mandir=/usr/share/man/

You might consider changing the location of the log files to
'--logdir=/usr/local/dansguardian/logs/' and use the provided
log rotation script.  Alternatively stick with the default
(/var/log/dansguardian/) and read newsyslog(8).

Note:  You will need to run 'make installx', not 'make install'.


NETBSD:
------

A standard configure script that should work, provided you have installedNetBSD and the associated programs in their default locations.
    ./configure --cgidir=/usr/pkg/www/cgi-bin/ \
	--sysconfdir=/usr/pkg/etc/dansguardian/ \
	--sysvdir=/usr/pkg/etc/rc.d/ \
	--bindir=/usr/pkg/sbin/ \
 	--mandir=/usr/pkg/man/

For NetBSD you might consider changing the location of the log files
to '--logdir=/usr/local/dansguardian/logs/' and use the
provided log rotation script.  Alternatively stick with the default
(/var/log/dansguardian/) and read newsyslog(8).
Be sure that /usr/sbin/ is in your PATH before make install (for chown).


FREEBSD:
-------
A standard configure script that should work, provided you have installed
FreeBSD and the associated programs in their default locations.

    ./configure --cgidir=/usr/local/www/cgi-bin/ \
	--sysconfdir=/usr/local/etc/dansguardian/ \
	--sysvdir=/usr/local/etc/rc.d/ \
	--bindir=/usr/local/sbin/ \
	--mandir=/usr/local/man/

For FreeBSD and OpenBSD you might consider changing the location of the
log files to '--logdir=/usr/local/dansguardian/logs/' and use the
provided log rotation script.  Alternatively stick with the default
(/var/log/dansguardian/) and read newsyslog(8).


OPENBSD:
-------
A standard configure script that should work, provided you have installed
OpenBSD and the associated programs in their default locations.

    ./configure --cgidir=/var/www/cgi-bin/ \
	--sysconfdir=/usr/local/etc/dansguardian/ \
	--sysvdir=/usr/local/etc/rc.d/ \
	--bindir=/usr/sbin/ \
	--mandir=/usr/share/man/



REDHAT 6.2/7.0:
--------------
It is safe to run the configure (./configure) script with the defaults.



REDHAT 7.1/7.2/8/9/Fedora Core 1:
--------------------------------
Here is a configure example for RedHat 7.1 + 7.2 + 8 + 9 + Fedora Core 1:
	
    ./configure --sysconfdir=/usr/local/etc/dansguardian/ \
	--sysvdir=/etc/rc.d/init.d/ \
	--cgidir=/var/www/cgi-bin/



MANDRAKE 7.2:
------------
Here is a configure example for Mandrake 7.2:
	
    ./configure --mandir=/usr/share/man/



MANDRAKE 8/8.1:
--------------

Here is a configure example for Mandrake 8 + 8.1:
	
    ./configure --mandir=/usr/share/man/ \
        --cgidir=/var/www/cgi-bin/

The system user 'squid' might be also appropriate rather than 'nobody'
when configuring your systems "runas" option.



SuSE 7.2:
--------
Here is a configure example for SuSE 7.2:
	
    ./configure --runas_grp=nogroup \
        --cgidir=/usr/local/httpd/cgi-bin/



SuSE 7.3:
--------
Here is a configure example for SuSE 7.3:
	
    ./configure --runas_grp=nogroup \
        --cgidir=/usr/local/httpd/cgi-bin/ \
        --sysvdir=/etc/init.d/



SuSE 8.1:
--------
Here is a configure example for SuSE 8.1:
	
    ./configure --runas_grp=nogroup \
        --cgidir=/usr/local/httpd/cgi-bin/ \
        --sysvdir=/etc/init.d/



Debian 2.2:
-----------
Here is a configure example for Debian 2.2, it is much like Suse 7.3:
        
    ./configure --runas_grp=nogroup \
        --sysvdir=/etc/init.d/ \
        --cgidir=/usr/lib/cgi-bin/ \
        --mandir=/usr/local/man/

You may need to do a 'mkdir /var/lock/subsys'.



Debian 3.0 (Woody):
-----------
It is suggested to install the current debian binary version first:

     apt-get install dansguardian
        
    ./configure --runas_grp=dansguardian \
        --runas_usr=dansguardian
        --sysvdir=/etc/init.d/ \
        --cgidir=/usr/lib/cgi-bin/ \
        --mandir=/usr/share/man/
	
You may need to do a 'mkdir /var/lock/subsys'. 



SOLARIS:
-------

Only Solaris 8 (7/01 and beyond) and Solaris 9 has been tested.
DansGuardian requires the GNU version of make (gmake), and GCC version
2.95.3  (3.01 will *not* work).

Both gmake and GCC 2.95.3 are included with the OS on the "Companion CD",
and are usually installed in /opt/sfw/bin.  To ensure these are in your
path, simply do (in csh; bash syntax is different):

    setenv PATH /opt/sfw/bin\:$PATH

Also, to ensure that the right libraries are used, simply do:

    setenv LD_RUN_PATH /opt/sfw/lib:/usr/lib

Before you *compile* (not necessary during run-time).

To configure and compile, do:
    ./configure --bindir=/opt/dansguardian/sbin/ \
        --sysconfdir=/opt/dansguardian/etc/ \
        --sysvdir=/etc/init.d/ \
        --cgidir=/var/apache/cgi-bin/ \
        --mandir=/opt/dansguardian/man/ \
        --logdir=/opt/dansguardian/log/





HOW TO CONFIGURE:
----------------

1.	crontab -e and set up the log rotation script as follows:
	59 23 * * sat /etc/dansguardian/logrotation
	I.e. 23:59 every Saturday.  Or change to as pleases you.
	Or use your own prefered method.

2.	Edit the dansguardian.conf.  Make sure you edit the
        accessdeniedaddress.  Also edit the other files that are in
        the same directory as the conf file.



HOW TO RUN:
----------

You can start it by just running the binary.  You can stop it by
appending a ' -q' to the end, thus: 'dansguardian -q'.  Or you can use
the SysV(-like) script provided.



HOW TO GET HELP:
---------------
http://dansguardian.org/

Here is the first place to start for getting support.  There is a mailing
list available for those that do not find the answers to their questions
from the url above. The mailing list can be found on the url.


