Bandwidthd完整实战笔记(2)

二、Bandwidthd服务器安装配置

(1)首先安装CentOS 6.4,从 网易的开源镜像站点,很快就可以下载了。推荐下载这个minimal的版本,300M左右。

(2)服务器需要2块网卡

eth0配置为管理地址,eth1网卡不需要配置IP,直接插到交换机的镜像口上。

(3)安装Bandwidthd支持软件包

yum install gcc cpp glibc glibc-devel gcc-c++

Bandwidthd完整实战笔记


 

yum install libpcap libpcap-devel libpng libpng-devel gd gd-devel

Bandwidthd完整实战笔记


yum install httpd mod_ssl

Bandwidthd完整实战笔记


service httpd start


chkconfig httpd on

安装wget下载工具

yum install wget

Bandwidthd完整实战笔记

(4)下载Bandwidthd代码

官网地址:

下载地址:%202.0.1/bandwidthd-2.0.1.tgz

用wget下载:

wget %202.0.1/bandwidthd-2.0.1.tgz

tar -zxvf bandwidthd-2.0.1.tgz

Bandwidthd完整实战笔记

解压缩完毕后,就准备编译安装了

cd bandwidthd-2.0.1

./configure

[root@localhost bandwidthd-2.0.1]#  ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for bison... no
checking for byacc... no
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for flex... no
checking for lex... no
checking for yywrap in -lfl... no
checking for yywrap in -ll... no
checking how to run the C preprocessor... gcc -E
checking for X... no
checking for /sw/lib... no
checking for /sw/include... no
checking for /usr/pkg/lib... no
checking for /usr/pkg/include... no
checking for connect in -lsocket... no
checking for gethostbyname in -lnsl... yes
checking for inet_aton in -lresolv... yes
checking for pow in -lm... yes
checking for libiconv_open in -liconv... no
checking for png_read_info in -lpng... yes
checking for gdImageCreate in -lgd... yes
checking for pcap_open_live in -lpcap... yes
checking for /usr/local/pgsql/lib... no
checking for /usr/local/pgsql/include... no
checking for PQconnectdb in -lpq... no
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking for gd.h... yes
checking for gdfonts.h... yes
checking for pcap.h... yes
checking for arpa/inet.h... yes
checking for errno.h... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for stddef.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for sys/socket.h... yes
checking for sys/time.h... yes
checking for sys/wait.h... yes
checking for syslog.h... yes
checking for unistd.h... yes
checking for arpa/nameser.h... yes
checking for resolv.h... yes
checking for gcc option to accept ANSI C... none needed
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for ANSI C header files... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for unistd.h... (cached) yes
checking for pid_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tcphdr.source... yes
checking for struct tcphdr.th_sport... no
checking for struct tcphdr.dest... yes
checking for struct tcphdr.th_dport... no
checking for stdlib.h... (cached) yes
checking for working malloc... yes
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/time.h... (cached) yes
checking for unistd.h... (cached) yes
checking for alarm... yes
checking for working mktime... no
checking return type of signal handlers... void
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for alarm... (cached) yes
checking for gethostbyaddr... yes
checking for inet_ntoa... yes
checking for memset... yes
checking for strdup... yes
checking for strftime... yes
checking for pcap_findalldevs... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h

linux

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/18994.html