1
0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-09-26 22:10:47 +02:00

Add nDPI install to fastnetmon_install script

This commit is contained in:
Pavel Odintsov 2015-07-24 15:00:59 +03:00
parent 51d7a6b190
commit 17dcb34adc

View File

@ -110,7 +110,8 @@ sub install {
chomp $kernel_version;
my $we_have_pfring_support = '';
my $we_have_ndpi_support = '';
print "Install PF_RING dependencies with package manager\n";
if ($distro_type eq 'debian' or $distro_type eq 'ubuntu') {
@ -236,6 +237,33 @@ sub install {
`ldconfig`;
}
if ($we_have_ndpi_support) {
if (-e "/usr/src/nDPI") {
# Get new code from the repository
chdir "/usr/src/nDPI";
`git pull`;
} else {
chdir "/usr/src";
`git clone https://github.com/ntop/nDPI.git`;
chdir "/usr/src/nDPI";
}
`./autogen.sh`;
`./configure --prefix=/opt/ndpi`;
`make install`;
print "Add ndpi to ld.so.conf\n";
my $ndpi_ld_so_conf = "/etc/ld.so.conf.d/ndpi.conf";
open my $ndpi_ld_so_conf_handle, ">", $ndpi_ld_so_conf or die "Can't open $! for writing\n";
print {$ndpi_ld_so_conf_handle} "/opt/ndpi/lib";
close $ndpi_ld_so_conf_handle;
print "Run ldconfig\n";
`ldconfig`;
}
print "Install FastNetMon dependency list\n";
if ($distro_type eq 'debian' or $distro_type eq 'ubuntu') {