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目錄下

     輸入:mysqld -install 安裝mysql

     啟動: 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

.