Apache2.4+PHP5.6+Mysql5.6

Apache2.4安装配置

  1. 解压Apache2.4
    找到 httpd.conf 文件,用记事本打开修改:
    ServerRoot "D:/Apache24"
           Listen 80                          //80端口
           ServerName localhost:80           //一般为localhost
           DocumentRoot "D:/PhpstormProjects" 
          <Directory "D:/PhpstormProjects">
          ScriptAlias /cgi-bin/ "D:/PhpstormProjects"
          <Directory "D:/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>
  1. 将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 D:/php5/php5apache2_4.dll
AddType application/x-httpd-php .php .html .htm
# configure thepath to php.ini
PHPIniDir “D:/php5”

Mysql安装配置

  1. 解压Mysql5.6
    复制 my-default.ini 重命名为 my.ini //my.ini 为mysql配置文件
    修改 my.ini
    basedir =D:\Mysql5.6
    datadir = D:\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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值