Switch: win7 (32/64) + apache2.4 + php5.5 + mysql5.6 environment setup Configuration

Source: Internet
Author: User
Tags apache php
First, read the full text carefully, especially the comments in parentheses. Environment: win732. (64-bit likewise, the software to be downloaded must be the corresponding 64-bit version). Select the English version as much as possible (because I am in the company's 64-bit win7

First, read the full text carefully, especially the comments in parentheses. Environment: win7 32. (64-bit likewise, download related software must be the corresponding 64-bit version) Required Software: small), select the English version as much as possible (because I am in the company's 64-bit win7

First, read the full text carefully, especially the comments in parentheses.

Environment: win7 32. (The 64-bit version must be the corresponding 64-bit version for the software to be downloaded)

Required software:
0. before installing Apache, you must install VC11 vcredist_x86.exe (64bdownload vcredist_x64.exe) and select the English version whenever possible (because I started to install the Chinese version of vc11 on the company's 64-bit win7, Apache startup exception after installation, it is normal to reinstall the English version of vc11 .)
1.Apache2.4.9(httpd-2.4.9-win32-VC11.zip) http://www.apachelounge.com/download/ (Note: Apache official website does not provide this version, in php win Version Download has this version)

2.php-5.5.10(php-5.5.10-Win32-VC11-x86.zip). Here we select the Thread security edition (VC11 x86 Thread Safe ). (For details about how to choose thread security and non-thread security, see Which version do I choose? Or select and download the PHP release package or the PHP thread-safe and non-thread-safe version)
3. MySQL 5.6.16 (MySQL Community Server 5.6.16) http://dev.mysql.com/downloads/mysql/

0. Install VC11 and click OK after several steps;
1. After Apache is downloaded, It is a zip package. After decompression, it can be placed in the appropriate location. Here we will put it in the apache24 directory of drive C;
2. After php is downloaded, it is also a zip package. We also extract the package to the appropriate location and place it in the php55 directory of drive C;
3. Install mysql is also very simple, several Next (official installation Tutorial: http://dev.mysql.com/doc/refman/5.6/en/mysql-installer-gui.html)

1. set C: \ php55 \ php. copy ini-production and rename it to php. ini; add C: \ php55 and C: \ php55 \ ext to the environment variable PATH;
2. use NotePad to Open C: \ apache24 \ conf \ httpd. conf
Modify row 37 ServerRoot "c:/Apache24" => ServerRoot "c:/Apache24 "(Here, we enter the location where you extract the apache installation package.)
Modify row 217 # ServerName www.example.com: 80 => ServerName www.example.com: 80 (Remove the previous #)
Modify line 1 DocumentRoot "c:/Apache24/htdocs" => DocumentRoot "c:/Apache24/htdocs" (this is the same as how I decompress the Apache directory. Do not change it)
Modify row 242 => (You do not need to change it again)
Modify 275 rows of DirectoryIndex index.html => DirectoryIndex index.html index. php index.htm (index. php index.htm is added)
Modify row 358 ScriptAlias/cgi-bin/"c:/Apache24/cgi-bin/" => ScriptAlias/cgi-bin/"c: /Apache24/cgi-bin/"(still No need to change)
Modify row 374 => (Still No need to change)
Note: although the preceding settings do not need to be changed, I set the folder installed in apache to the same as the default one. If you install apache on a drive D or another directory, these settings must match the installation path.

Add (add in the last line of C: \ apache24 \ conf \ httpd. conf)
A. make apache support php
Add LoadModule php5_module "c:/php55/php5apache2_4.dll" (Please confirmC:/php55/YesPhp5apache2_4.dll. If you download the connection provided by me, it must be available)

Add AddType application/x-httpd-php. php. html. htm

B. Tell apache php. ini location
Add PHPIniDir "c:/php55"

Now, httpd. conf is configured and httpd. conf is saved.
3. install apache into system services
Run: c: \ apache24 \ bin \ httpd-k install in cmd.
4. enable several common php extensions and use NotePad to open C: \ php55 \ php. ini
Modify row 721. extension_dir = "ext" => extension_dir = "ext" (remove the semicolon before extension)
Modify row 873. extension = php_mbstring.dll => extension = php_mbstring.dll (remove the semicolon before extension, which is a php multi-byte string extension)

Modify row 875. extension = php_mysql.dll => extension = php_mysql.dll (remove the semicolon before extension)
Modify row 876. extension = php_mysqli.dll => extension = php_mysqli.dll (remove the semicolon before extension)

Start apache in two ways: 1. Start apache in windows Service; 2. Double-click c: \ apache24 \ bin \ ApacheMonitor.exe to start apache;
Start mysql in two ways: 1. Start Mysql 56 in windows Service; 2. Start mysql Notifier.

Next let's test the environment. Let's install the most common mysql management tool phpmyadmin for testing.

If you understand and successfully set up this environment, you don't need to be so grateful to me. Remember my name is "Lei Feng (Samuel)". ^. ^.

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.