WIN7 X64 apache2+php5+mysql5成功安装

1.APACHE

http://www.blackdot.be/?inc=apache/binaries
下载APACHE并解压到某个地方,如C:盘 C:/apache64

然后修改conf目录下的配置文件 如C:/apache64/conf/httpd.conf

修改

ServerRoot "C:/apache64"
ServerName localhost:80
DocumentRoot "C:/apache64/htdocs"
<Directory "C:/apache64/htdocs">
DirectoryIndex index.html index.htm index.php
ScriptAlias /cgi-bin/ "C:/apache64/cgi-bin/"

 

然后以管理员身份运行CMD,进入bin目录运行

bin/httpd.exe -k install
bin/httpd.exe -k start

这样便安装并启动apache了

2.PHP   X64版本的网上多

Create a folder inside your C drive and named it "php". Unzip the contents of the PHP zip package you previously downloaded and copy the contents of the "php-5.2.5 (x64)" (or what ever version you downloaded) to folder: C:/php. We will install PHP as an Apache module. Open your Apache configuration file (C:/apache64/conf/httpd.conf) to tell apache to load the PHP module. Under the existing LoadModule directives add the following:
LoadModule php5_module "C:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php


Also add these lines to tell Apache where PHP is located:
# configure the path to php.ini
PHPIniDir "C:/php"


Copy the following files to your Widnows system folder (C:/Windows/system32):
C:/php/php5ts.dll
C:/php/php5isapi.dll  **注意:这里有个PHP版本没这个文件,得运行PHP根目录下相应的注册表文件就好了
C:/php/php5apache2_2.dll
C:/php/ext/php_mysql.dll

还要把PHP根目录下的libmysql.dll也考到系统目录下,要不然有的版本在连接MYSQL时会无反应。

Copy php.ini-dist to the same folder and rename it as php.ini. Open this file to edit PHP configuration parameters.
extension_dir = "C:/php/ext/"
allow_url_fopen = Off

Load at least the following PHP extesnions by removing the "#" symbol in front of each line:
extension=php_gd2.dll
extension=php_mysql.dll
extension=php_oci8.dll
(if you have Oracle database installed)
extension=php_pgsql.dll (if you have postgre database installed)
extension=php_zip.dll

Set sendmail from e-mail address:
sendmail_from = me@example.com

Some settings for MySQL:
mysql.default_port = 3306
mysql.default_host = localhost


Set the session save path to a writable (by anyone) folder in your computer. You can set this to any existing path you wish (For example C:/tmp).
session.save_path = "C:/tmp"

Restart Apache to test if your PHP is working properly.

3.MYSQL X64的官方上就有,下下来安装就好了

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值