Apache2.4安装配置:
1.解压Apache2.4
找到 httpd.conf 文件,用记事本打开
修改:
ServerRoot "C:/ztaos/Apache24"
Listen 80 //80端口
ServerName localhost:80 //一般为localhost
DocumentRoot "c:/ztaos/www"
<Directory "c:/ztaos/www">
ScriptAlias /cgi-bin/ "c:/ztaos/www"
<Directory "c:/ztaos/Apache24/cgi-bin">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options FollowSymLinks //禁止列出目录
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
2.将Apache加入到window服务启动项里面
win+R->cmd 进入Apche\bin目录,执行
httpd.exe -k install -n "Apache24"
PHP安装配置:
1.解压PHP5.6
复制 php.ini-development 重命名为php.ini //php.ini为php的配置文件
为Apache服务添加php支持
在 httpd.conf 中添加
# php5 support
LoadModule php5_module C:/ztaos/php5/php5apache2_4.dll
AddType application/x-httpd-php .php .html .htm
# configure thepath to php.ini
PHPIniDir "C:/ztaos/php5"
Mysql安装配置:
1.解压Mysql5.6
复制 my-default.ini 重命名为 my.ini //my.ini 为mysql配置文件
修改 my.ini
basedir = C:\ztaos\Mysql5.6
datadir = C:\ztaos\Mysql5.6\data
修改mysql占用内存过大:
innodb_buffer_pool_size =1M
join_buffer_size = 1M
sort_buffer_size = 1M
read_rnd_buffer_size = 1M
performance_schema_max_table_instances=400
table_definition_cache=400
table_open_cache=256
2.以管理员身份运行cmd
进入mysql\bin目录下
启动: net start mysql
登录:mysql -u root -p
3.修改 php.ini 连接mysql
找到:
;On windows:
;extension_dir = "ext"
;extension=php_mysql.dll
;extension=php_mysqli.dll
去掉冒号重启Apache
http://pan.baidu.com/s/1nun1IlV xggc