最近在研究Jmeter做性能测试,看书上有个web项目(viooma的一个web进销存管理系统,),自己试着搭了一下,中间还是遇到不少坑,在此记录一下,以便以后参照,也希望能帮网上遇到同样的问题的同学做一个引导,废话不多说,开干...
一、环境准备
1、Apache http服务器(我用的2.4)
2、Mysql(我用的是5.7的)
3、PHP(我用的5.6)
二、环境配置
1、安装好mysql,记得记录mysql的root用户账号的密码!(重要!我就是以为这个项目是自己的数据库,没太在意,以为是PHP项目自带的数据库,结果通过抓包、看源码折腾好久才发现是数据库连接不上。。。数据库连接这一块还是值得注意啊)
2、安装Apache,这个过程比较简单,直接把下载下来的安装包解压就好了,记得默认情况下Apache的htdoc目录是存放web站点的,把PHP项目放进去就行了配置apche这边有两个点需要注意
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 8989
#
# When we also provide SSL we have to listen to the
# standard HTTP port (see above) and to the HTTPS port
#
# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
# Listen directives: "Listen [::]:444" and "Listen 0.0.0.0:444"
#
Listen 444
##
## SSL Virtual Host Context
##
# General setup for the virtual host
DocumentRoot "${SRVROOT}/htdocs"
ServerName www.example.com:444
ServerAdmin [email protected]
ErrorLog "${SRVROOT}/logs/error.log"
TransferLog "${SRVROOT}/logs/access.log"
Define SRVROOT "D:\Apache\Apache24"
ServerRoot "${SRVROOT}"
# php5 support
LoadModule php5_module D:\php-5.6.32\php5apache2_4.dll
AddType application/x-httpd-php .php .html .htm
# configure the path to php.ini
PHPIniDir "D:\php-5.6.32"