Участник:RafaelMalikov/ntop

Материал из ALT Linux Wiki

(Различия между версиями)
Перейти к: навигация, поиск
(ntop supported MySQL)
(ntop supported MySQL)
Строка 1: Строка 1:
== ntop supported MySQL ==
== ntop supported MySQL ==
-
%%# TODO from PLD:
 
-
#  - service ntop init steals terminal (it doesnt finish nor background)
 
-
#  - paths wrong somewhere /var/lib/ntop/ntop is expected (should be without last path component)
 
-
#  - ntop apperars to be daemon, so it should be in _sbindir not in _bindir
 
-
#
 
-
%define oversion 3.3
 
-
 
-
Name: ntop
 
-
Version: 3.3
 
-
Release: alt3
 
-
 
-
Summary: A network traffic probe similar to the UNIX top command
 
-
 
-
License: GPL
 
-
Group: Monitoring
 
-
 
-
Packager: Rafa aka Chuma <chuma777@yahoo.com>
 
-
 
-
Url: http://www.ntop.org/
 
-
 
-
# FIXME: libntop needs linking with ntop binary??
 
-
%set_verify_elf_method unresolved=relaxed
 
-
 
-
Source: http://dl.sf.net/%name/%name-%oversion.tar.bz2
 
-
Source1: %name.init
 
-
Source2: %name.conf
 
-
Patch1: %name-free.patch
 
-
# TODO
 
-
Patch2: %name-plugins.patch
 
-
 
-
%define _localstatedir /var
 
-
%define ntopdir %_localstatedir/lib/ntop
 
-
 
-
Requires: MySQL-server
 
-
 
-
# manually removed: lsb
 
-
# Automatically added by buildreq on Sun Oct 21 2007
 
-
BuildRequires: gcc-c++ libgdbm-devel libnet-snmp-devel libpam-devel libpcap-devel libpcre-devel librrd-devel zlib-devel libMySQL-devel libmysql++-devel
 
-
 
-
BuildRequires: rpm-build-compat
 
-
 
-
%description
 
-
ntop is a network traffic probe that shows the network usage, similar to what
 
-
the popular top Unix command does. ntop is based on libpcap and it has been
 
-
written in a portable way in order to virtually run on every Unix platform and
 
-
on Win32 as well.
 
-
 
-
ntop users can use a a web browser (e.g. netscape) to navigate through ntop
 
-
(that acts as a web server) traffic information and get a dump of the network
 
-
status. In the latter case, ntop can be seen as a simple RMON-like agent with
 
-
an embedded web interface. The use of:
 
-
 
-
    * a web interface
 
-
    * limited configuration and administration via the web interface
 
-
    * reduced CPU and memory usage (they vary according to network size and
 
-
      traffic)
 
-
 
-
make ntop easy to use and suitable for monitoring various kind of networks.
 
-
 
-
ntop should be manually started the first time so that the administrator
 
-
password can be selected.
 
-
 
-
%prep
 
-
%setup -q -n %name-%oversion
 
-
%patch1
 
-
%__subst "s|<pcre.h>|<pcre/pcre.h>|g" ntop.h
 
-
# kill libtool.m4 copy
 
-
cp -f acinclude.m4.ntop acinclude.m4
 
-
 
-
%build
 
-
%__autoreconf
 
-
# "verified.awk -u" calls require gawk
 
-
%configure \
 
-
AWK=gawk \
 
-
--disable-static \
 
-
--enable-i18n \
 
-
--enable-sslv3 \
 
-
--enable-optimize \
 
-
--enable-snmp \
 
-
--enable-jumbo-frames \
 
-
--with-gnu-ld \
 
-
--with-ossl-root=%prefix \
 
-
--with-tcpwrap \
 
-
--enable-mysql
 
-
 
-
%make_build
 
-
 
-
%install
 
-
install -d %buildroot{%ntopdir,%_initrddir,%_sysconfdir}
 
-
 
-
%make_install install DESTDIR=%buildroot
 
-
 
-
install %SOURCE1 %buildroot%_initdir/ntop
 
-
#install %SOURCE2 %buildroot%_sysconfdir/sysconfig/ntop
 
-
install %SOURCE2 %buildroot%_sysconfdir/ntop/ntop.conf
 
-
 
-
# we need devel package?
 
-
rm -f %buildroot%_libdir/lib*[a-z].so
 
-
rm -f %buildroot%_libdir/lib*Plugin*.so
 
-
 
-
#mv %buildroot%_libdir/lib*Plugin*.so %buildroot%_libdir/%name/plugins
 
-
 
-
# Create files to be %%ghost'ed - %%ghost'ed files must exist in the buildroot
 
-
install -d %buildroot%ntopdir/rrd/{flows,graphics}
 
-
install -d %buildroot%ntopdir/rrd/interfaces
 
-
touch %buildroot%ntopdir/{addressQueue,dnsCache,fingerprint,LsWatch,macPrefix,ntop_pw,prefsCache}.db
 
-
 
-
%pre
 
-
%groupadd -r -f ntop || :
 
-
%useradd -M -r -d %ntopdir -s /bin/false -c "ntop User" -g ntop ntop || :
 
-
 
-
%post
 
-
%post_service %name
 
-
%post_ldconfig
 
-
#if test "$1" = "0"; then
 
-
echo "***********************************************************************"
 
-
echo "* YOU MUST SETUP A PASSWORD BEFORE RUNNING NTOP                      *"
 
-
echo "*                                                                    *"
 
-
echo "*    (as root run) $ %_bindir/ntop -A          *"
 
-
echo "*                                                                    *"
 
-
echo "*    see 1STRUN.txt in %_docdir/ntop-%version                  *"
 
-
echo "*    You can configure %_sysconfdir/ntop/ntop.conf                            *"
 
-
echo "*                                                                    *"
 
-
echo "***********************************************************************"
 
-
#fi
 
-
 
-
%preun
 
-
%preun_service %name
 
-
%postun
 
-
%postun_ldconfig
 
-
%files
 
-
%doc AUTHORS ChangeLog NEWS README THANKS
 
-
%doc www docs NetFlow utils
 
-
%_bindir/*
 
-
%_libdir/lib*-3.3.so
 
-
%_datadir/%name/
 
-
%dir %_libdir/%name/
 
-
%_libdir/%name/plugins/
 
-
%_man8dir/*
 
-
%_initdir/ntop
 
-
#%attr(640,root,root) %_sysconfdir/sysconfig/ntop
 
-
%dir %_sysconfdir/ntop/
 
-
%config(noreplace) %_sysconfdir/ntop/ntop.conf
 
-
%_sysconfdir/ntop/*.gz
 
-
%config(noreplace) %_sysconfdir/ntop/*.pem
 
-
#%attr(644,root,ntop) %config(noreplace) %verify(not md5 mtime size) %_sysconfdir/ntop.conf
 
-
 
-
%attr (0770,root,ntop) %dir %ntopdir/
 
-
%defattr(0640,root,ntop,-)
 
-
%ghost %ntopdir/addressQueue.db
 
-
%ghost %ntopdir/dnsCache.db
 
-
%ghost %ntopdir/fingerprint.db
 
-
%ghost %ntopdir/LsWatch.db
 
-
%ghost %ntopdir/macPrefix.db
 
-
%ghost %ntopdir/ntop_pw.db
 
-
%ghost %ntopdir/prefsCache.db
 
-
# This will catch all the directories in rrd.  If %ghost'ed files are added
 
-
# under rrd, this will have to be changed to %dir and more directives for
 
-
# directories under rrd will have to be added.
 
-
%defattr(0770,root,ntop,-)
 
-
%ntopdir/rrd/
 
-
 
-
 
-
%changelog
 
-
* Tue Oct 28 2008 Rafa aka Chuma <chuma777@yahoo.com> 3.3-alt3
 
-
- enable DB (MySQL) support
 
-
 
-
* Wed Nov 07 2007 Vitaly Lipatov <lav@altlinux.ru> 3.3-alt2
 
-
- update Summary, description
 
-
- remove chmod/chown from pre section, add ghost files to /var/lib/ntop
 
-
- cleanup spec, add some ideas from FC specs (written by Bernard Johnson)
 
-
 
-
* Sun Oct 21 2007 Vitaly Lipatov <lav@altlinux.ru> 3.3-alt1
 
-
- fix compiling, update buildreq
 
-
- add --enable-sslv3 --enable-jumbo-frames to configure
 
-
 
-
* Thu Jun 28 2007 Vitaly Lipatov <lav@altlinux.ru> 3.3rel-alt1
 
-
- new version (3.3rel)
 
-
 
-
* Sat Apr 28 2007 Vitaly Lipatov <lav@altlinux.ru> 3.3rc1-alt1
 
-
- new version (3.3rc1)
 
-
 
-
* Mon Sep 11 2006 Vitaly Lipatov <lav@altlinux.ru> 3.2-alt0.2
 
-
- change Packager, cleanup spec
 
-
- unresolved=relaxed :(
 
-
 
-
* Wed Dec 14 2005 Anton Korbin <ahtoh@altlinux.ru> 3.2-alt0.1
 
-
- First new version for Alt Linux
 
-
 
-
* Wed Nov 02 2005 Vitaly Lipatov <lav@altlinux.ru> 3.1-alt0.1
 
-
- spec from PLD Team <feedback@pld-linux.org> (thanks)%%
 
-
{{BackLinks}}
 

Версия 05:04, 1 ноября 2008

ntop supported MySQL

 
Личные инструменты