Warning: Missing argument 2 for wp_widget() in /www/users/haoxm.net/wp-includes/widgets.php on line 76
孤独小客 » Blog Archive » linux下安装webbench压力测试工具

linux下安装webbench压力测试工具

1、下载webbench-1.5.tar.gz
[root@RedHat ~]# wget http://www.haoxm.net/tools/webbench-1.5.tar.gz
–2010-11-29 17:07:39– http://www.haoxm.net/tools/webbench-1.5.tar.gz
Resolving www.haoxm.net… 218.85.133.154
Connecting to www.haoxm.net|218.85.133.154|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 7675 (7.5K) [application/octet-stream]
Saving to: `webbench-1.5.tar.gz’

100%[======================================>] 7,675 33.8K/s in 0.2s

2010-11-29 17:07:43 (33.8 KB/s) – `webbench-1.5.tar.gz’ saved [7675/7675]

2、解压
[root@RedHat ~]# tar zxvf webbench-1.5.tar.gz
webbench-1.5/
webbench-1.5/webbench.1
webbench-1.5/socket.c
webbench-1.5/webbench.c
webbench-1.5/Makefile
webbench-1.5/debian/
webbench-1.5/debian/rules
webbench-1.5/debian/dirs
webbench-1.5/debian/copyright
webbench-1.5/debian/control
webbench-1.5/debian/changelog
webbench-1.5/COPYRIGHT
webbench-1.5/ChangeLog
3、进入webbench目录
[root@RedHat webbench-1.5]# ls
ChangeLog COPYRIGHT debian Makefile socket.c webbench.1 webbench.c
4、编译
[root@RedHat webbench-1.5]# make
cc -Wall -ggdb -W -O -c -o webbench.o webbench.c
webbench.c: In function 鈇larm_handler?
webbench.c:77: warning: unused parameter 鈙ignal?
cc -Wall -ggdb -W -O -o webbench

webbench.o
ctags *.c
5、安装
[root@RedHat webbench-1.5]# make install
cc -Wall -ggdb -W -O -c -o webbench.o webbench.c
webbench.c: In function 鈇larm_handler?
webbench.c:77: warning: unused parameter 鈙ignal?
cc -Wall -ggdb -W -O -o webbench

webbench.o
install -s webbench /usr/local/bin
install -m 644 webbench.1 /usr/local/man/man1
install: cannot create regular file `/usr/local/man/man1′: No such file or directory
make: *** [install] Error 1
#出现一个错误,安装不成功。提示不能创建man1文件,所以我就到/usr/local/目录看下,原来没有man

目录,于是创建了一个,再安装下。(网络上都是少这一步)
[root@RedHat webbench-1.5]# cd /usr/local/man
-bash: cd: /usr/local/man: No such file or directory
[root@RedHat webbench-1.5]# cd /usr/local
[root@RedHat local]# ls
bin etc games include lib libexec sbin share src
[root@RedHat local]# mkdir man
[root@RedHat local]# cd /root/webbench-1.5
[root@RedHat webbench-1.5]# make install
install -s webbench /usr/local/bin
install -m 644 webbench.1 /usr/local/man/man1
install -d /usr/local/share/doc/webbench
install -m 644 debian/copyright /usr/local/share/doc/webbench
install -m 644 debian/changelog /usr/local/share/doc/webbench
6、再到/usr/local/man目录下看有没有man1,还真的有。
[root@RedHat webbench-1.5]# cd /usr/local/man/
[root@RedHat man]# ls
man1
7、测试
[root@RedHat webbench-1.5]#webbench -c 500 -t 30 http://127.0.0.1/test.jpg

Leave a comment

Your comment