[參考](https://gist.github.com/jjsantanna/f2ee2f1fe23208299f4a2ca392f8b23f?permalink_comment_id=3749338) ## Foreword nfdump 是一個用於蒐集和分析 netflow 資料的工具集,雖然透過 apt 可以直接安裝基本的 nfdump ,但有些工具和功能預設是未啟用的,必須自行編譯才能獲得其他功能,以下將說明安裝步驟。 ## Installation 1. 增加軟體來源 Uncomment lines from /etc/apt/sources.list(needs root): `xenial` will be different depending on the ubuntu version ``` ## deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe ## deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe ``` 2. 更新軟體庫清單 ```shell $ sudo apt update ``` 3. 下載 nfdump 的 source code 和 dependencies ```shell $ sudo apt source nfdump $ sudo apt install libtool dh-autoreconf libpcap-dev libghc-bzlib-dev flex autoconf pkgconf bison -y ``` 4. 產生設定腳本並設定參數 參數可參考 [nfdump](https://github.com/phaag/nfdump) ```shell $ sudo ./autogen.sh $ sudo ./configure --enable-readpcap --enable-nfpcapd ``` 5. 編譯及安裝 ```shell $ sudo make $ sudo make install $ sudo ldconfig ```