(转)Spec Web 2009 web服务器测试

标签:
it |
分类: Linux技术 |
转自:http://blog.csdn.net/kensp1/article/details/8498262
二.设置
Besim
a.httpd-2.2.22.tar.gz
b.
fcgi-2.4.0.tar.gz
c.
mod_fastcgi-2.4.6.tar.gz
Tar –zxvf
httpd-2.2.22.tar.gz
./configure
–prefix=/usr/local/apache2 –enable-so
–with-mpm=worker
Make
& Make install
Test web
site: Http://192.168.0.2/
a. tar
-zxvf fcgi-2.4.0.tar.gz
b. cd fcgi-2.4.0
c. 修改 /include/fcgio.h
with #include
d.
./configure --libdir=/lib
c. make & make
install
e. mkdir
/usr/local/appache2/htdocs/fcgi-bin/
f. make fcgi
TARGET='clean all install'
DEST=/usr/local/appache2/htdocs/fcgi-bin/
you should see besim_fcgi.fcgi under folder
/usr/local/appache2/htdocs/fcgi-bin/
g. chmod 777
/usr/local/appache2/htdocs/fcgi-bin
a. tar
-zxvf mod_fastcgi-2.4.6.tar.gz
b. cd
mod_fastcgi-2.4.6
c. cp Makefile.AP2
Makefile
d.
Modify Makefile
1. top_dir=/usr/local/apache2
2. APXS=/usr/local/apache2/bin/apxs
3.APACHECTL=/usr/local/apache2/bin/apachectl
e. Make & Make install
f. 查看 ls
–l
/usr/local/apache2/modules/mod_fastcgi.so
http://img.my.csdn.net/uploads/201301/13/1358065418_7931.jpgWeb 2009 web服务器测试" />
mkdir -p /usr/local/apache2/fastcgi
chmod 777 /usr/local/apache2/fastcgi
Modify configure file
for /usr/local/conf/httpd.conf):
LoadModule
fastcgi_module modules/mod_fastcgi.so
ScriptAlias
/fcgi-bin/
"/var/www/fcgi-bin/"
FastCgiIpcDir /usr/local/apache2/fastcgi
AllowOverride
None
Options
+ExecCGI -Includes
SetHandler
fastcgi-script
Order
allow,deny
Allow
from all
AddHandler
fastcgi-script fcgi
perl
test_besim_bank.pl http://192.168.0.2/fcgi-bin/besim_fcgi.fcgi
http://img.my.csdn.net/uploads/201301/13/1358065598_2825.jpgWeb 2009 web服务器测试" />
返回结果
SUT
"display_errors
on
"display_startup_errors
On
error_reporting = E_ALL",
确保 DOCROOT=/var/www/html
SIMULTANEOUS_SESSIONS=合适值(1600)
运行./wafgen.sh /unix/bank_image_props.rc
等 文件
a. 在besim 服务器
/usr/local/apache2/htdocs/ 目录下新建 a.txt
b.把 test.php 文件放到 support 下,test.php
代码如下:
c.新建 test.html 并放在
supports/templates/ 目录下
<{$test}>
d. 如果显示”open remote web server ok”代表成功配置web
server
Prime
client/Client
set JAVA="C:\Program Files\Java\jre6\bin\java.exe“
SPECweb_Ecommerce.Unix-PHP.config 更改为
SPECweb_Ecommerce. Config
SPECweb_Power.Unix-PHP.config
更改为 SPECweb_Power. Config
SPECweb_Support.Unix-PHP.config
更改为 SPECweb_Support. config
Test.Unix-PHP.config 更改为
Test.config
start_client.bat
start_prime_client.bat
一.软件环境
Web Server 192.168.0.3 Port 80
Linux Red Hat 6.2
Apache Web Server 2.2.14 shipped with OS
PHP script 5.3 shipped with OS
Smarty 2.2.26 shipped with OS
Perl
Test PHP page
JDK
jdk-7u9-linux-i586.rpm
Besim 192.168.0.2 Port 80
Linux Red Hat 6.2
Apache Web Server 2.2.22 Compiled from the
source
PHP script engine 5.3 nice to have
Perl required for test
Fcgi
2.4.0
Mod_fcgi 2.4.6
JDK jdk-7u9-linux-i586.rpm
Prime client
192.168.0.10
Windows XP
JDK
jdk-6u24-windows-i586.exe
Client 192.168.0.20
Windows XP
JDK
jdk-6u24-windows-i586.exe
二.设置
所有机器
安装 JDK
Linux : JDK jdk-7u9-linux-i586.rpm
Besim Web server 安装RPM
Windows: jdk-6u24-windows-i586.exe
Prime Client/Client 双击安装
服务器设置
Besim
配置 192.168.0.2 Port 80
Install Linux Red Hat
6.2 选择基本服务器
1.Copy related software to /usr/local
2.Build and install Apache 2
3. FastCgi 代码编译
4. Mod_fastcgi 代码编译
5. 服务器配置
1.
Add this line in the "Dynamic Shared Object (DSO) Support"
section:
2.
Add the following lines just after theScriptAlias /cgi-bin/
line:
3.
Add the following section, preferably after the/cgi-bin">
section:
6. 测试 Besim
7. Service iptables stop 去掉防火墙
http://img.my.csdn.net/uploads/201301/13/1358065664_9198.jpgWeb 2009 web服务器测试" />
SUT Web
Server 配置 192.168.0.3 Port
80
Linux Red Hat 6.2
1.安装 RHEL6.2 ,并选择自带的网页服务器配置(Intall Web Server with RHEL6.2.It
is ok to install native apache web server and PHP
engine)
2.Copy the contents of the
SPECweb2009/Script/PHP/* to
/usr/local/apache/htdocs/
3..tar –zxvf Smarty-2.6.26.tar.gz
4.复制 smarty 2.6.26 目录下libs 到 /var/www/html/
并改名为 smarty
5.Chmod 777 /var/www/html*
6.修改/etc/php.ini ,或者查看 error_log
7. 修改 spec web \wafgen\目录下 workload 文档
http://img.my.csdn.net/uploads/201301/13/1358066152_1658.jpgWeb 2009 web服务器测试" />
8. 测试 web server
http://img.my.csdn.net/uploads/201301/13/1358066456_7928.jpgWeb 2009 web服务器测试" />
代码如下
9. Service iptables stop 去掉防火墙
Client设置 client 可以是Prime Client
Prime
client/Client 192.168.0.10
1.安装Spec web 软件,修改 start_client.bat
,start_prime_client.bat
2.将SPECweb_Banking.Unix-PHP.config
更改为 SPECweb_Banking.config
3.修改 SPECweb_(X).config
PADDING_DIR = "/var/www/html/bank/dynamic_padding/“
PADDING_DIR = "/var/www/html/ecommerce/dynamic_padding/“
PADDING_DIR = "/var/www/html/support/dynamic_padding/“
4.修改 test.config
CLIENTS =192.168.0.10
SIMULTANEOUS_SESSIONS =1
WEB_SERVER =192.168.0.3
WEB_PORT =80
BESIM_SERVER =192.168.0.2
BESIM_PORT = "80“
BESIM_INIT_SCRIPT = "/fcgi-bin/besim_fcgi.fcgi" # FCGI
SMARTY_DIR = "/var/www/html/Smarty/"
SMARTY_BANK_DIR = "/var/www/html/bank/"
SMARTY_ECOMMERCE_DIR = "/var/www/html/ecommerce/"
SMARTY_SUPPORT_DIR =
"/var/www/html/support/
5.配置完成运行测试
运行效果如图,下例模拟600 Session 同时访问 ,测试需要根据系统配置,修改Test.Config
里面的SIMULTANEOUS_SESSIONS 值,使得跑出来的结果 Qos Time_Good
>95% Time_Tolerable >99%。
http://img.my.csdn.net/uploads/201301/13/1358067061_4894.jpgWeb
后一篇:(转)Web服务器性能估算