Build WAMP local development environment
-
PC -
Windows -
httpd-2.4.26-x64-vc14.zip -
php-7.1.6-Win32-VC14-x64.zip -
mysql-installer-web-community-5.7.18.1.msi
-
Installation dependency VC_redist.x64.exe -
Create a folder in the disk root directory wamp -
decompression httpd-2.4.26-x64-vc14.zip -
copy Apache24 Directory to wamp Contents -
modify wamp/Apache24/conf/httpd.conf configuration file -
Find line 38 and set Define SRVROOT "/Apache24" Change to the full path of your Apache 24 -
example Define SRVROOT "D:/wamp/Apache24" -
take wamp/Apache24/bin Add system PATH variable in full path -
Open cmd input httpd -t Test whether the configuration is correct and output Syntax OK Then the configuration is correct (right click on some operating systems to run cmd as administrator) -
Enter in cmd httpd -k install Install Apache to system service -
Here Apache has been configured. You can enter httpd -k start Start Apache service -
Open browser to access after service startup http://localhost/ perhaps http://127.0.0.1/
-
Stop Apache httpd - k stop -
Restart Apache httpd - k restart -
Uninstall the Apache system service httpd - k uninstall -
Test configuration syntax httpd - t -
Display version information httpd - V -
Command line option list httpd - h
Tips wamp/Apache24/htdocs As the default site root directory, you can copy static files to this directory for access
Create a new folder php716 under the wamp directory
decompression
php-7.1.6-Win32-VC14-x64.zip reach
wamp/php716 Contents
take
wamp/php716 Full path joining system PATH variable
copy
wamp/php716/php.ini-development And renamed to
php.ini
Delete line 738; No. and modify
extension_dir ="D:/wamp/php716/ext" (Note, please modify according to your actual drive letter)
Delete line 939; No. and modify
date.timezone = PRC
Open common extension
search
php_gd2.dll And remove the preceding semicolon
search
php_mbstring.dll And remove the preceding semicolon
search
php_mysqli.dll And remove the preceding semicolon
search
php_pdo_mysql.dll And remove the preceding semicolon
search
php_openssl.dll And remove the preceding semicolon
edit
wamp/Apache24/conf/httpd.conf
Add Line
LoadModule php7_module "D:/wamp/php716/php7apache2_4.dll"
Add Line
AddType application/x-httpd-php .php
Add Line
PHPIniDir "D:/wamp/php716"
Open cmd input
httpd -t Test whether the configuration is correct and output
Syntax OK The configuration is correct
Restart Apache. At this time, Apache can coordinate the work of PHP. It will send the file with the suffix. php to the PHP interpreter for processing
You can configure
AddType application/x-httpd-php .php To set other suffix files
So far, Apache and PHP have been configured. You can create a file containing
phpinfo() Function to test whether PHP is successfully configured under Apache.
Example phpinfo.php
<? php phpinfo(); ?>
Click Execute to develop and install (the installation speed depends on the network environment because it needs to download files from the CDN site)
After installation, click Next
All the way to the configuration page
The rest of the way
Next Finish Complete installation
take
Mysql/bin Full path joining system PATH variable
Open cmd input
mysql -uroot -p Press Enter and enter the password to log in to MySql
Here the WAMP local development environment has been completed. If you encounter problems during the installation process, please comment below or contact me by email
All the resources used in this article can be downloaded by visiting owl's Baidu online disk
Link: https://pan.baidu.com/s/1jHZYSy6 Password: kzcr
Statement: This technical post is transferred from owl The blog of children's shoes, reprinting has been authorized, and the original author reserves all rights.