First, download Apache, PHP, mariadb
Apache:http://www.apachehaus.com/cgi-bin/download.plx
The VC9 version is divided into 32-bit and 64-bit editions. The computer needs to have visual Studio 2008 installed.
The VC11 version is divided into 32-bit and 64-bit editions. The computer needs to have visual Studio 2012 installed.
php:http://windows.php.net/download#php-7.0
Currently the latest version of PHP is PHP7, my personal download is php5.6
Because php5.6 only vc1132 bit and 64 bit version, so my Apache download is also VC11 version.
mariadb:https://downloads.mariadb.org/
Second, configure Apache
My Apache is compressed and I unzip it on the D:/php/apache24.
Configuration process:
1. Locate the D:\Apache24\conf\httpd.conf file, open it with Notepad,
Found: Define srvroot This item, change the value on the right to
The directory address where you are currently installing Apache, as follows:
Define srvroot "D:/php/apache24"
ServerRoot "${srvroot}"/span>
Found: Listen, this is a modified port, modified to
Listen 80
Found: Doucumentroot This entry, change the value on the right and the following directory to the address of your Web root directory as follows:
DocumentRoot "D:/webroot"
<directory "D:/webroot" >
Add PHP5 support:
# PHP5 Surport
LoadModule Php5_module D:/php/php561/php5apache2_4.dll
AddType application/x-httpd-php. php. html. htm
# Configure the path to PHP.ini
Phpinidir "d:/php/php561"
Default home: Find Directoryidex, add later: index.php index.html login.html
2, configure the virtual site, similar to IIS under the construction of multiple sites. Find the D:\php\Apache24\conf\extra\httpd-vhosts.conf file, open it with Notepad,
Pull to the bottom and see
#<virtualhost *:80>
# ServerAdmin [email protected]
# documentroot "${srvroot}/docs/dummy-host.example.com"
# ServerName Dummy-host.example.com
# Serveralias Www.dummy-host.example.com
# errorlog "Logs/dummy-host.example.com-error.log"
# customlog "Logs/dummy-host.example.com-access.log" common
#</virtualhost>
#<virtualhost *:80>
# ServerAdmin [email protected]
# documentroot "${srvroot}/docs/dummy-host2.example.com"
# ServerName Dummy-host2.example.com
# errorlog "Logs/dummy-host2.example.com-error.log"
# customlog "Logs/dummy-host2.example.com-access.log" common
#</virtualhost>
Noun Explanation:
ServerAdmin: When the website is out of trouble, you can improve your email by following the email.
DocumentRoot: The path to a site in the root directory of the Web site, such as "D:/webroot/ci"
ServerName: Website URL.
Serveralias: The alias of the website.
errorlog, Customlog: Log path.
3. Registering Apache Service
Open the cmd window, enter: "D:\application_software\Apache\bin\httpd.exe"-K install-n Apache
Remember to include quotation marks. The command means installing the Apache service and naming the service name Apache (you can also change to another), enter.
During this process my computer reported me a mistake because my 80 port was occupied.
80 Port View: Netstat-ano. Depending on the PID shown, see in the Task Manager which process is consuming 80 and kill. My 80 is occupied by the system, the workaround is as follows:
Win+r, and then enter Regedit to open the registry. Find Hkey_local_machine\system\currentcontrolset\services\http, click on the HTTP to the right can find "start", double-click Start and then change the value data to 0, save, restart the computer.
4, the last step
In the installation directory, locate the D:\application_software\Apache\bin\ApacheMonitor.exe executable file, double-click Run, the desktop icon appears in the bottom right corner, start on the line.
Ok,apache configuration is done.
Third, PHP configuration:
1. Unzip the downloaded files and put them in a directory on your computer. Like mine: d:/php/php561
2, add;D in the System environment variable path: \php\php561;d:\php\php561\ext, after reboot takes effect
Ok!
PHP Learning Note Wamp installation configuration