File: README

package info (click to toggle)
haci 0.97c-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,816 kB
  • sloc: perl: 19,106; sh: 190; makefile: 8
file content (182 lines) | stat: -rw-r--r-- 7,280 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
###############################################################################
##    HaCi - IP Address Administration                                        #
##    Copyright (C) 2006-2010 by Lars Wildemann                               #
##    Author: Lars Wildemann <HaCi@larsux.de>                                 #
##                                                                            #
##    HaCi is an IP Address / Network Administration Tool with IPv6 Support.  #
##    It stores its data efficiently in a relational Database and uses a      #
##    treelike Strukture to illustrate supernets and subnets.                 #
##                                                                            #
##    This program is free software; you can redistribute it and#or modify    #
##    it under the terms of the GNU General Public License as published by    #
##    the Free Software Foundation; either version 2 of the License, or       #
##    (at your option) any later version.                                     #
##                                                                            #
##    This program is distributed in the hope that it will be useful,         #
##    but WITHOUT ANY WARRANTY; without even the implied warranty of          #
##    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           #
##    GNU General Public License for more details.                            #
###############################################################################

OVERVIEW
  HaCi is a web frontend for administrating networks. It consist of a (perl) CGI and a (mySQL) database as backend.

REQUIRERMENTS
  All you need is a webserver (e.g.: Apache), a database (e.g.: mySQL) and an OS which supports perl.

  - Perl    (check with `perl -M<MODULE> -e 1 2>/dev/null && echo "Ok" || echo "Failed"`)
    - Cache::Cache
    - CGI
    - CGI::Ajax
    - CGI::Carp
    - CGI::Cookie
    - CGI::Session
    - Class::Accessor
    - Class::MakeMethods
    - Config::General
    - DBD::mysql
    - Digest::MD5
    - Digest::SHA
    - DNS::ZoneParse           (optional for importing Zonefiles)
    - Encode
    - Encode::Guess
    - File::Temp
    - HTML::Entities
    - IO::Socket::INET6        (optional for IMAP authentication support)
    - Locale::gettext
    - Log::LogLite
    - Math::BigInt::GMP        (optional, but proposed for more performance!)
    - Math::BigInt v1.87
    - Net::CIDR
    - Net::DNS                 (optional for importing Zonefiles)
    - Net::IPv6Addr
    - Net::Ping                (optional for Ping-Plugin)
    - Net::SNMP
    - Pod::WSDL                (optional for SAOP support)
    - SOAP::Transport::HTTP    (optional for SAOP support)
    - SQL::Translator::Diff    (optional for automatic database upgrade support)
    - SQL::Translator v0.09000 (optional for automatic database upgrade support)
    - Storable
    - Template
    - Text::CSV_XS             (optional for importing CSV-Files)
    - Time::Local
    - Apache::DBI              (optional for getting connection persistence when using mod-perl)
  - HTTP Server
  - SQL Database

  You can use the scripts 'bin/checkPerlDependencies.bash', 'bin/checkPerlOptionals.bash' or the testpage "/cgi-bin/test.cgi" to check for dependencies. 

INSTALLATION
  1)
    First, extract the archiv into a directory, from which the HTTP server will process it and check dependencies.

  2)
    If needed, accommodate the file/directory permissions, so the HTTP server will have no problems.
      <installDir>/logs   : HTTPServer (rwx)
      <installDir>/spool  : HTTPServer (rwx)

  3)
    Modify the HaCi.conf.sample (<installDir>/etc) for your needs. 
    It can be stored either in '/etc/HaCi.conf' or '<installDir>/etc/HaCi.conf'. 
    '/etc/HaCi.conf' has precedence.
    
  4)
    Configure your database and webserver, for serving your new tool. 
    e.g.:
    - MySQL
---------------------- 8< ---------------------
CREATE USER 'HaCi'@'localhost' IDENTIFIED BY '<GEHEIM!>';
GRANT USAGE ON *.* TO 'HaCi'@'localhost' IDENTIFIED BY '<GEHEIM!>';
CREATE DATABASE `HaCi`;
GRANT ALL PRIVILEGES ON `HaCi`.* TO 'HaCi'@'localhost' WITH GRANT OPTION;
---------------------- 8< ---------------------

      - Apache  (httpd.conf)
---------------------- 8< ---------------------
<VirtualHost *:80>
  ServerName  haci.domain.tld
  DocumentRoot  /var/www/HaCi/html
  ScriptAlias   /cgi-bin/  /var/www/HaCi/cgi-bin/

  <Directory /var/www/HaCi/cgi-bin>
    # If you want to use Mod-Perl ---
    PerlRequire   /var/www/HaCi/etc/startup.pl
    SetHandler    perl-script
    PerlHandler   Apache::Registry         # mod-perl1
    PerlResponseHandler ModPerl::Registry  # mod-perl2
    #--------------------------------
    Options       +ExecCGI
    AllowOverride All
    Order         allow,deny
    allow from    all
  </Directory>
</VirtualHost>
---------------------- 8< ---------------------



    - lighttpd
      - standalone (/etc/lighttpd/lighttpd.conf):
---------------------- 8< ---------------------
server.document-root  = "/var/www/HaCi/html"
server.errorlog    = "/var/www/HaCi/logs/error.log"
alias.url    += ("/cgi-bin/" => "/var/www/HaCi/cgi-bin/")
---------------------- 8< ---------------------

      - VHost (/etc/lighttpd/conf-available/20-HaCi.conf):
---------------------- 8< ---------------------
server.modules                 += ( "mod_simple_vhost" )
simple-vhost.server-root        = "/var/www"
simple-vhost.document-root      = "/html/"
simple-vhost.default-host       = "HaCi"
alias.url                      += ( "/cgi-bin/" => "/var/www/HaCi/cgi-bin/" )
---------------------- 8< ---------------------

      - activate CGI
        - Debian:
ln -s /etc/lighttpd/conf-available/10-cgi.conf /etc/lighttpd/conf-enabled/

Edit '/etc/lighttpd/conf-available/10-cgi.conf' and comment the alias-Line out:
# alias.url       += ( "/cgi-bin/" => "/usr/lib/cgi-bin/" )
#
        - SuSE:
          Edit '/etc/lighttpd/modules.conf' and enable following line:
          include "conf.d/cgi.conf"


  5)
    HaCi Daemon (bin/HaCid.pl)
    The HaCi daemon is responsible for the recurrent plugins. It runs them in defined intervals.
    You can start it with the parameter '-c' therewith it exists after one full run and you can start it by crontab.
    The daemon stores its PID in 'spool' and writes its logfile in 'logs'. So it must have write permissions to this directories.


  6)
    HaCiAPI
    HaCi supports a SOAP-Interface for accessing the data not only from the webfrontend but also from a perl/php/... script.
    You can find a short description and a demo perl script in the 'docs' directory.

  
  7)
    Look at 'http://sourceforge.net/projects/haci/' for new releases and
            'http://haci.larsux.de' for a wiki and the latest infos about HaCi.

    For exporting the last CVS version call
    $ cvs -z3 -d:pserver:anonymous@haci.cvs.sourceforge.net:/cvsroot/haci export -D NOW HaCi
  
  8)
    FINISH
  

  9) Additional comments

    Cleanup Database
      'bin/cleanupDatabase.pl'
      This tool checks the database for stale and broken entries. Pass '-c' as parameter in order to cleanup found issues. Please make sure to backup your database before.


AUTHOR
  Lars Wildemann
  haci@larsux.de

# vim:ts=8