WIN10 64-bit Apache 2.4+mysql 5.7+php 7 Environment construction

Source: Internet
Author: User
Tags phpinfo vc9 win32 mysql for visual studio

Control Panel---All Control Panel Item Management Tool Services

Software version and Access


Apache 2.4.25 Win64 | MySQL Server 5.7.17 Win64 | PHP 7.0 x64 Thread Safe



Apache 2.4.25 Win64
Apache HTTP Server (http://httpd.apache.org/Web server)

Picture. png
Click Download, and PAGE up

Picture. png
Site mirroring can be selected as needed
Click Files for Microsoft Windows under the Apache HTTP Server 2.4.25 Bar

Picture. png
Click Apache Lounge and go to https://www.apachelounge.com/download/

Picture. png
Apache 2.4 Binaries VC14
Apache 2.4.25 Win64
Click Httpd-2.4.25-win64-vc14.zip to download
*
Https://www.apachelounge.com/download/VC14/binaries/httpd-2.4.25-win64-VC14.zip


The httpd is the abbreviation for Apache HTTP Server, a Web server.



The Apache HTTP server ("httpd") was launched in 1995 and it had been the most popular Web server on the Internet since Ap Ril 1996. It has celebrated its 20th birthday as a project in February 2015.
from:http://httpd.apache.org/



The Apache HTTP Server project itself does not provide a binary release of the software, but only provides the source code. Independent submitter may provide a binary package to facilitate, but these packages are not released for the deliverable product.
If you cannot compile the Apache HTTP Server yourself, you can get binary packages through the Internet, from many available binary distributions (Web sites). One of the Apache lounges.



The Apache HTTP Server Project itself does not provide binary releases of software, only source code. Individual committers may provide binary packages as a convenience, but it's not a release deliverable.
If you cannot compile the Apache HTTP Server yourself, you can obtain a binary package from numerous binary distributions Available on the Internet.
From:http://httpd.apache.org/docs/current/platform/windows.html#down



Apache 2.4 VC14 Windows Binaries and modules build with VC14 and need to install Microsoft Visual C + + redistributable Update 3 (vc_redist_x64/ 86.exe).
Windows? Visual Studio C + + 2015 is also known as VC14.
Apache 2.4 VC14 Windows binaries cannot run on Windows XP and Windows 2003, can run on 7 SP1, Vista SP2, 8/8.1, ten, Server sp2/r2 SP 1, server 2012/R2, Server 2016.



Build with the latest Windows? Visual Studio C + + aka VC14.
The binaries below does not run on XP and 2003. Runs On:7 SP1, Vista SP2, 8/8.1, ten, server SP2/R2, server SP1, Server 2016.
Be sure so you have installed the latest C + + redistributable Visual Studio 2015:vc_redist_x64/86.exe.
from:https://www.apachelounge.com/download/

MySQL Server 5.7.17 Win64
Enter https://www.mysql.com/

Picture. png
Select the Download tab and click Windows

Picture. png
Click MySQL Installer

Paste_image.png
Select Mysql-installer-community-5.7.17.0.msi, and click Download

Picture. png
Click No thanks, just start my download.

Picture. png
Https://cdn.mysql.com//Downloads/MySQLInstaller/mysql-installer-community-5.7.17.0.msi


MySQL Installer provides a simple wizard-based installation experience for the required MySQL software.
See the MySQL product.



MySQL Installer provides an easy-to-use, wizard-based installation experience for all your MySQL software needs. Included in the product is the latest versions of:
MySQL Server
MySQL Connectors
MySQL Workbench and Sample models
Sample Databases
MySQL for Excel
MySQL Notifier
MySQL for Visual Studio
Documentation
from:https://dev.mysql.com/downloads/installer/



Mysql-installer-web-community is the MySQL online installation tool, Mysql-installer-community is an offline installation tool.



Choosing the right file:
If you have a online connection while running the MySQL Installer, choose the Mysql-installer-web-community file.
If you don't have a online connection while running the MySQL Installer, choose the Mysql-installer-community file.
from:https://dev.mysql.com/downloads/installer/



Although MySQL installer is 32-bit, you can install 32-bit and 64-bit MySQL files.



Note:mysql Installer is the + bit, but would install the both-bit and the-bit binaries.
from:https://dev.mysql.com/downloads/installer/

PHP 7.0.14 (updated to 7.0.15) Win64
Enter http://windows.php.net/, click Download

Picture. png
Page DOWN, select PHP7.0 VC14 x64 Thread Safe and click Zip to download.

Picture. png
Http://windows.php.net/downloads/releases/php-7.0.15-Win32-VC14-x64.zip


The non-thread-safe version applies to IIS, and the thread-safe version applies to Apache. It is recommended to use the Apache architecture provided by Apache Lounge, which is not recommended because the VC version is too old for apache.org.



Iis
If you is using PHP as FastCGI with IIS you should use the Non-thread Safe (NTS) versions of PHP.
Apache
The Apache builds provided by Apache Lounge. They provide VC9, VC11 and VC14 builds of Apache for x86 and x64. We use their binaries to build the Apache Sapis.
If you is using PHP as module with Apache builds from apache.org (not recommended) you need to use the older VC6 versions of PHP compiled with the legacy Visual Studio 6 compiler. vc9+ versions of PHP with the apache.org binaries.
With Apache versions of PHP that has the use of the Thread Safe (TS).
from:http://windows.php.net/download/



The x64 build of PHP 5 for Windows is experimental and does not provide 64-bit consolidation or large file support.
PHP 7 provides full-integer 64-bit support. PHP 7 x64 constructs the original 64-bit consolidation, LFS (logical file structure/system), 64-bit memory limit and more.



x86_64 Builds
The x64 builds of PHP 5 for Windows is experimental, and don't provide 64-bit integer or large file support.
PHP 7 provides full 64-bit support. The x64 builds of PHP 7 support native 64-bit integers, LFS, 64-bit memory_limit and much more.
from:http://windows.php.net/download/



Summary of required documents:




Paste_image.png Installation and Configuration


Apache and PHP decompression can, MySQL for the GUI installation. and the Apahce and PHP path are required. For convenience, it is recommended that you place the three (that is, folder A, folder P, and folder m below) on the same path as follows.




4490640-d1b839bd815cb667.pngapache Installation
Httpd-2.4.25-win64-vc14.zip extract, get folder Apache24, file-win64-2.4.25 VC14-and file ReadMe.txt.

4490640-44b800aa3a6ce8de.png


Called Folder Apache24 folder A, this folder can be renamed, it is recommended not to include Chinese and space.




paste_image.pngphp Installation
Php-7.0.14-win32-vc14-x64.zip unzip to the folder php7.0.14. Called Folder php7.0.14 folder p, this folder can be renamed, it is recommended not to include Chinese and space.

4490640-75a50529bfc62659.pngmysql Installation and Configuration
Create a new folder for MySQL, as the installation path for the MySQL family of products (such as the most critical MySQL Server 5.7). Called folder MySQL folder M, this folder can be renamed, it is recommended not to include Chinese and space.
Run Mysql-installer-community-5.7.17.0.msi, if not described below, click on the icon.

Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
For documents, click MySQL Server 5.7.17-x64 above the right column and click Advanced Options below to select the MySQL server component installation path and data storage path.

Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
Optional installation of other components.
Choose the 64-bit version first, only the 32-bit version (such as MySQL Notifier 1.1) can also be run.
MySQL for Excel requires that Visual Studio Tools for Office 2010 is already installed.
Connecter/python 2.1 for Python 3.4/3.3/2.7 requires Python 3.4/3.3/2.7 already installed.
Select Finish and click Next.

Paste_image.png
Paste_image.png
Paste_image.png
Installation is complete, click Next to configure MySQL Server.

Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
Configure MySQL server is complete, click Next to configure samples and Examples.

Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
Paste_image.png
MySQL installation and configuration are all complete.
Start the MySQL service
Control Panel---All Control Panel Item Management Tool ServicesstartMySQL57mysql service with MySQL notifier
Apache Configuration
Edit/apache24/conf/httpd.conf File
Replace the default path, searchc:/Apache24, and replace withC:/AMP_DE/Apache24. There are 6, respectively, in the 37th, 245, 246, 362, 375, 378 lines, where 375 is a comment, no need to replace. 5 other places, if any#, should be removed.

Paste_image.png

Paste_image.png
Paste_image.png
Paste_image.png
Increased load support for PHP7 modules. Add two rows to the next line in line 179.
LoadModule php7_module C:/AMP_DE/php7.0.14/php7apache2_4.dll
PHPIniDir C:/AMP_DE/php7.0.14
Where the last path and file of the first line depends on its own situation, open File Explorer, locate the folder p, locate thephp7apacheXXXXX.dllfile.

Paste_image.png
Click to select, HoldAltand double-click to open the file properties

Paste_image.png
Copy location:C:\AMP_DE\php7.0.14and file namephp7apache2_4.dll, connect to becomeC:\AMP_DE\php7.0.14\php7apache2_4.dll, and turn to/, and/finally getLoadModule php7_module C:/AMP_DE/php7.0.14/php7apache2_4.dll.
Where the last path of the second line is the path to the folder p, thephp.inipath specified by the row.

Paste_image.png
214 lineServerAdmin [email protected]to your own e-mail address.
221 Line#ServerName www.example.com:80toServerName localhost:80(local server).
279 linesDirectoryIndex index.htmlinsteadDirectoryIndex index.php index.htm index.html.
Add a row after 418 rows (originally 416 lines, 180 rows or so two rows)
AddType application/x-httpd-php .php .html
The APAHCE configuration is complete. Apache Service Installation and startup
Explorer entryC:\AMP_DE\Apache24\bin

Paste_image.png
Enterhttpd.exe -k install -n “localhost”the command to installlocalhostthe Apache service named

Paste_image.png
Errors reported here must be corrected before the service can be started.The row indicates that, if there is an error, it will be displayed below the line and the installation is successful without a display.
Launch Apache Service
command line inputhttpd.exe -k start -n "localhost", start successfully without output.
Stop Apache Servicehttpd.exe -k stop -n "localhost"
Uninstall Apache Service (stop service first)httpd.exe -k uninstall -n "localhost"
You can alsoC:\AMP_DE\Apache24\binApacheMonitor.exestart/Stop the service through theApache.
Try to run each program and command line as an administrator.
Open the browser, enter the address barhttp://localhostand return to displayIt works!, indicating that the Apache configuration was successful. PHP Configuration
The explorer entersC:\AMP_DE\php7.0.14,php.ini-productioncopies a copy, and renames itphp.ini.
Editphp.ini
723 lines; extension_dir = "ext"Remove the semicolon
881 lines;extension=php_gd2.dllRemove the semicolon
888 lines;extension=php_mbstring.dllRemove the semicolon
890 lines;extension=php_mysqli.dllRemove the semicolon
894 lines;extension=php_pdo_mysql.dllRemove the semicolon
Adding environment variables
Control Panel - All Control Panel Items - System - Advanced System Settings - Advanced - Environment Variables - System Variables - Path - Edit
New -C:\AMP_DE\php7.0.14
New -C:\AMP_DE\php7.0.14\ext
determine


Paste_image.png
File Explorer enters the local server file root directory (defaultC:\AMP_DE\Apache24\htdocs)
Newphpinfo.phpfile, text Editor open, input
<?php phpinfo();?>
and save
Browser Address bar inputhttp://localhost/phpinfo.php
Display PHP information, indicating that the PHP configuration is successful, the page is as follows.

Paste_image.png
Test MySQL connection to Apache and PHP
RunMySQL 5.7 Command Line Client, enter the root password

Paste_image.png
New Database TestDBCREATE DATABASE testDB;
Switch to database TestDBUSE testDB;
New data Table test_table
CREATE TABLE test_table (test_info varchar(30),test_time datetime);
File Explorer enters the local server file root directory (defaultC:\AMP_DE\Apache24\htdocs)
NewtestDB.phpfile, text Editor open, input

 <?php
   $connection = mysqli_connect(‘localhost‘,‘root‘,‘password‘,‘testDB‘)
                 or die(‘Error connecting to MySQL server.‘);
   $query = "INSERT INTO test_table (".
             "test_info,test_time)".
             "VALUES (".
             "‘It works!‘,NOW())";
   $result = mysqli_query($connection,$query)
              or die(‘Error querying database.‘);
   mysqli_close($connection);
 ?>
passwordchange it to your root account password, save and exit
Browser address bar inputhttp://localhost/testDB.phpand enter
Switch to MySQL window, enterSELECT * FROM test_table;and return
The results show that the data table test_table has a new line, displayIt works!and the current time, indicating that MySQL and Apache, PHP connection success, as follows.

Paste_image.png after the installation, configuration and testing of Apache, MySQL and PHP, the WAMP environment has been successfully built.








WIN10 64-bit Apache 2.4+mysql 5.7+php 7 Environment construction


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.