1
0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-11-24 02:46:36 +01:00

Automatic installer support for FreeBSD

This commit is contained in:
Pavel Odintsov 2015-09-20 23:25:31 +03:00
parent 7d0c854ab8
commit f2d164f470

@ -1,38 +1,17 @@
FreeBSD 9, 10, 11 and Dragonfly BSD 4.0
Install dependencies:
Stable version 1.1.2 is already in [official FreeBSD ports](https://freshports.org/net-mgmt/fastnetmon/) but if you want to hack it or install development version, please use this script.
Install stable 1.1.2 version:
```bash
pkg install cmake git ncurses boost-all log4cpp
curl https://raw.githubusercontent.com/FastVPSEestiOu/fastnetmon/master/src/fastnetmon_install.pl -ofastnetmon_install.pl
sudo perl fastnetmon_install.pl
```
Update linker paths:
Install development version:
```
/etc/rc.d/ldconfig restart
```
```bash
mkdir /usr/local/src
cd /usr/local/src
git clone https://github.com/FastVPSEestiOu/fastnetmon.git -b v1.1.2
cd fastnetmon/src
mkdir build
cd build
cmake ..
make
```
Or you can try native FreeBSD port (will be added to port tree soon):
```bash
pkg install cmake git ncurses boost-all log4cpp
/etc/rc.d/ldconfig restart
mkdir /usr/local/src
cd /usr/local/src
git clone https://github.com/FastVPSEestiOu/fastnetmon.git
cd fastnetmon/src/FreeBSD_port/
make makesum
make install
curl https://raw.githubusercontent.com/FastVPSEestiOu/fastnetmon/master/src/fastnetmon_install.pl -ofastnetmon_install.pl
sudo perl fastnetmon_install.pl --use-git-master
```
And please switch capture interface to promisc mode.
@ -50,23 +29,3 @@ ifconfig ix1 promisc
Please put your networks in CIDR format here: /usr/local/etc/networks_list.
For netmap support you may need compile kernel manually with this [manual](BUILDING_FREEBSD_KERNEL_FOR_NETMAP.md).
On 32 bit FreeBSD you could hit this issue:
```bash
fastnetmon.cpp:(.text+0xc979): undefined reference to `__sync_fetch_and_add_8'
```
It could be fixed by this patch.
Please add this lines before line "post-patch" line:
```bash
.include <bsd.port.pre.mk>
# Port requires 64 bit atomics
#.if ${ARCH} == i386 && empty(MACHINE_CPU:Mi586)
CFLAGS+= -march=i586
#.endif
```
And replace last string ```.include <bsd.port.mk>``` by ```.include
<bsd.port.post.mk>```.