1. http://www.apachelounge.com/download/ 下载 httpd-2.4.18-win64-VC14.zip 。
2.检查系统有没有 C++ Redistributable Visual Studio 2015 Update 1 ,没有就从 https://www.microsoft.com/zh-CN/download/details.aspx?id=49984 下载 VC_redist.x64.exe。
https://www.microsoft.com/zh-CN/download/details.aspx?id=30679 下载 Visual C++ Redistributable for Visual Studio 2012 Update 4
3.http://dev.mysql.com/downloads/mysql/ 下载 Windows (x86, 64-bit), ZIP Archive VC11 x64 Thread Safe (2016-Mar-03 05:51:47) http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.11-winx64.zip
4. http://windows.php.net/download/下载 PHP 5.6 (5.6.19) VC11 x64 Thread Safe (2016-Apr-28 06:19:29)
5. https://xcache.lighttpd.net/pub/Releases/3.2.0/ 下载 XCache-3.2.0-php-5.6.0-Win32-VC11-x64.zip
5.apache 配置:
DocumentRoot "e:/ai2root/Apache24/htdocs"
DirectoryIndex index.php index.html
LoadModule php7_module e:/ai2root/PHP/php5apache2_4.dll
AddType application/x-httpd-php .php
PHPIniDir "e:/ai2root/PHP"
6.php.ini-development改为php.ini
extension_dir = "e:/ai2root/PHP/ext"
date.timezone =PRC
将xcache的zip解压复制xcache.ini的内容到php.ini 末尾。
加载
extension = php_xcache.dll
extension=php_curl.dll
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_mysql.dll
将php_xcache.dll 复制到php的ext目录里面。
apache2.4\bin\httpd -t
看看配置文件有没有问题。
apache2.4\bin\httpd -k install 安装apache2.4服务
apach2.4\bin\httpd -k start 启动。
apach2.4\bin\httpd -k stop 停止。
apach2.4\bin\httpd -k restart 重启。
做几个快捷方式,管理员身份运行。
==========================win10 出错提示=======================================
Errors reported here must be corrected before the service can be started.
(OS 10013)以一种访问权限不允许的方式做了一个访问套接字的尝试。 : AH00072: make_sock: could not bind to address 192.168.4.128:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs
1.右键桌面“此电脑”,选--管理--服务和应用程序-服务
2.找到“World Wide Web Publishing Service” 服务,
3.右键“属性”,手动停止 ,启动类型改为手动。
4.启动自己的APACHE。
--------------------------------------------------------------------------------
-
启动cmd输入regedit,打开注册表;
-
找到:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP;
-
在右侧找到Start项,将其值修改为0;
-
再重启系统,System进程不会占用80端口;
===================================================================================
==========================PHP_CURL出错=======================================
从PHP目录拷贝libssh2.dll, ssleay32.dll, libeay32.dll 到apache2.4 下bin目录,再重启apache2.4
===================================================================================
7.mysql:
mysqld --initialize --console
mysqld -install 安装服务
net start mysql
卸载服务 mysqld -remove
注意看屏幕上的root临时密码。好像err文件里面也会有。
mysql -u root -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.11Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SET PASSWORD = PASSWORD('12345678');
Query OK, 0 rows affected, 1 warning (0.00 sec)mysql> quit
Bye