ubuntu,centor 安装apache bench

ab全称为:apache bench。

是apache自带的压力测试工具。ab非常实用,它不仅可以对apache服务器进行网站访问压力测试,也可以对或其它类型的服务器进行压力测试。比如nginx、tomcat、IIS等。

ubuntu 安装:

sudo apt-get install apache2-utils



centos 安装:
yum install apr-util

# 安装依赖 yum-utils中的yumdownload 工具
# 如果没有找到 yumdownload 命令可以
yum install yum-utils


[email protected]:/$ ab -n 1000 -c 100 http://local.wo.com/api.com/Index/getBanner
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking local.wo.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests

Server Software:        nginx
Server Hostname:        local.wo.com
Server Port:            80

Document Path:          /api.com/Index/getBanner
Document Length:        162 bytes

Concurrency Level:      100
Time taken for tests:   0.074 seconds
Complete requests:      1000
Failed requests:        0
Non-2xx responses:      1000
Total transferred:      305000 bytes
HTML transferred:       162000 bytes
Requests per second:    13576.44 [#/sec] (mean)
Time per request:       7.366 [ms] (mean)
Time per request:       0.074 [ms] (mean, across all concurrent requests)
Transfer rate:          4043.76 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        1    3   0.6      3       5
Processing:     1    4   1.1      4       8
Waiting:        1    3   1.1      3       8
Total:          4    7   0.8      7      10

Percentage of the requests served within a certain time (ms)
  50%      7
  66%      7
  75%      7
  80%      7
  90%      8
  95%      8
  98%      9
  99%     10
 100%     10 (longest request)

  



原文地址:https://www.cnblogs.com/pansidong/p/10662286.html

时间: 2024-07-31 10:34:10

ubuntu,centor 安装apache bench的相关文章

ubuntu 下安装 apache php mysql

ubuntu 安装 apache+php+mysql1.打开终端,输入"sudo apt-get install apache2",回车;(安装apache2.0或2.x新版本,系统会自动查找新的版本)2.如有密码请再输入管理员密码,回车3.输入"Y",回车4.apache2.X 安装完成5.验证apache2.x安装是否完成,在浏览器中打开http://localhost/或者http://127.0.0.1.如果出现It works!那证明成功;6.打开终端,输

Ubuntu下安装Apache

Ubuntu为我们提供了 su apt-get install 命令,通过它你可以很方便地安装一些软件,这些软件是放在Ubuntu放置在各个地方的服务器上面,如果你想安装的软件是比较常见的,一般都可以通过它来下载. sudo apt-get install apache2 在Ubuntu上安装Apache,有两种方式:1 使用开发包的打包服务,例如使用apt-get命令:2 从源码构建Apache.本文章将详细描述这两种不同的安装方式. 方法一:使用开发包的打包服务——apt-get 安装apa

Ubuntu 下安装apache+PHP

1.安装apache2 sudo apt-get install apache2 运行如下命令重启:sudo /etc/init.d/apache2 restart 在浏览器里输入http://localhost或者是http://127.0.0.1,如果看到了It works!,那就说明Apache就成功的安装了. =================================================================== 如果此时你没有看到It works!也不必着

如何在Ubuntu上安装Apache,MySQL,PHP,Nginx,HAProxy,以及如何在docker上安装LAMP

如何在Ubuntu上安装Apache,MySQL,PHP,Nginx,HAProxy,以及如何在docker上安装LAMP 在Ubuntu上安装LAMP: https://help.ubuntu.com/community/ApacheMySQLPHPhttps://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntuhttp://www.makete

手把手教你在Ubuntu上安装Apache、MySql和PHP

1:首先安装apache:打开终端(ctrl+Alt+t), 输入命令:sudo apt-get install apache2即可安装, 安装完后,打开浏览器,在地址栏输入:localhost或者http://127.0.0.1 看到It works,表示安装成功! 默认根目录:/var/www/ 2:安装mysql: sudo apt-get install mysql-server-5.0 安装完后,会要你新设置mysql root密码,输入你自己的密码后enter键,再确认密码. 3:安

Ubuntu编译安装Apache

第一步:编译安装依赖包apr,apr-util和pcre ./configure --prefix= make && make install 第二步:编译安装Apache ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --enable-so --enable-deflate=shared --enable-rewrite=shar

ubuntu下安装Apache+PHP+Mysql

转载自:http://www.comflag.com/2011/05/01/apache-web.htm 电影<社交网络>中,facebook创始人马克.扎克失恋后入侵哈佛大学宿舍楼服务器,窃取数据库资料,并在两个小时内完成了一个给校内女生评分的交互网站,该网站一天内点击数过10W,直接导致学校服务器崩溃...... 其实,构建那样一个网站并不需要很多高深的技术,任何一个有一定网络编程基础的人都可以做到.马克构建网站所用的是Apache服务器和PHP服务器脚本语言,我曾经用三天时间学习PHP,

Debian/Ubuntu下安装Apache的Mod_Rewrite模块的步骤

启用 Mod_rewrite 模块:sudo a2enmod rewrite 另外,也可以通过将 /etc/apache2/mods-available/rewrite.load 连接到 /etc/apache2/mods-enabled/rewrite.load 来打开 Mod_rewrite 模块:sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load 其实,当在De

apache压力测试工具的apache bench和JMeter的安装

Apache压力测试工具的安装 1,apache bench的安装 apache  bench工具集成在http的软件包内,可以直接安装apache就可以. 当有些时候,我们不需要用到所有的软件包,我们只需要安装安装其中的某个组件就可以, 例如apache  bench这个组件. 首先安装ab运行需要的软件包apr-util yum install apr-util 然后安装一个yum的工具包,为了可以单独弄出来ab 新建一个目录  mkdir /test 切换目录  cd /test yumd