How to install apache2.2 + PHP5.2 + MySql5.0 in Windows 7

Source: Internet
Author: User


Step 1: Prepare apache2.2, PHP5.2, and MySql5.0 Software
1. The downloaded version is a apache_2.2.4-win32-x86-no_ssl.msi file located in the/binaries/win32 Directory, http://httpd.apache.org/download.cgi
PHP 5.2.4 (Windows Binaries PHP 5.2.4 zip package): http://www.php.net/downloads.php
Iii. MySQL 5.0.45 Windows: http://dev.mysql.com/downloads/ software above did not download the latest version. In order to facilitate maintenance and reinstall the system without secondary installation, it is installed on the D disk.
Step 2 install the installation program of apache 2.2.4 on apache2.2, and click Next as prompted. Note: Fill in localhost in the Network Domain and Server Name fields of Server Information, select Custom in the installation type, and then change the installation path (directory: D:/php/apache2.2 ), then follow the prompts to complete the Next step. Www.2cto.com
Step 3: unzip the php-5.2
Unzip the downloaded php-5.2.13-win32.zip package to the d: phpphp directory.

2. Go to the php installation directory in the resource manager and set php. ini-recommended: copy the file and name it php. ini, open php. ini, find:; extension = php_mysql.dll, remove the previous; number, and change it to: extension = php_mysql.dll. MySQL extensions are not enabled by default. Similar to the above script, it is a selectable php extension module. If you need to load it, simply remove the previous; number. Find extension_dir = "./" and change it to the absolute path of the ext subdirectory in your php installation directory. For example, my: extension_dir = "d:/php/ext/" is very important in this step. Otherwise, the php_mysql.dll module cannot be found in php and cannot be loaded.
3. In Windows 7 system settings, add the php Directory to the Path environment variable.
Practice: Right-click my computer> Properties> Advanced System Properties> environment variables> system variables> Path> edit, and add "d: phpphp; separate multiple directories.
Step 4: Configure Apache and PHP
Open the httpd. conf file in the conf subdirectory under the Apache installation directory and modify the content of the httpd. conf file. 1. Find DocumentRoot "xxxxxxx" and change it to DocumentRoot "D:/www" 2. Find the directory of your local website content 3. Find DirectoryIndex index.html to DirectoryIndex index. php index.html 4, in httpd. add LoadModule php5_module "d:/php/php5apache2_2.dll" PHPIniDir "D:/php" AddType application/x-httpd-php in the blank space at the end of the conf file. php AddType application/x-httpd-php. html Action application/x-httpd-php "d:/php/php-cgi.exe"
Run the DOS Command line as an administrator (click menu: Start> program> Accessories), right-click the Command Prompt (Command Prompt, run as adminstrator as the administrator and start the apache service in the dos window. If the apache service is started before, stop the apache service. D: phpapache2.2bin> httpd-k stop, restart the apahce service: D: phpapache2.2bin> httpd-k start or click the Apache icon in the lower-right corner of the desktop taskbar to perform the restart operation. Www.2cto.com
Step 5: Test PHP to create an index. php file with the content stored in the Directory d: www. Open the browser and enter http: // localhost to check whether the file works properly.
Step 6: Install the setup_mysql.exe installation file that will be downloaded by mysql. install it all the way as prompted. Select Custom in the installation type and specify the installation directory as d:/php/mysql/MySQL Server 5.0. Then, I will ask whether to Configure the MySQL Server now, select and continue, and set the character set utf8 and root administrator password 123456 as prompted. Step 7: Install phpmyadmin. Download and unzip phpmyadmin to d:/php/phpmyadmin/, and create another phpmyadmin. conf configuration file: Alias/phpmyadmin "D:/php/phpMyAdmin/" Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny, Allow Deny from all Allow from 127.0.0.1 to phpmyadmin. save the conf file to the d:/php/apache2.2/conf folder. Set phpmyadmin. the conf file is created by httpd. conf reference, in httpd. conf write: Include "D:/php/Apache2.2/conf/phpmyadmin. conf "www.2cto.com Step 8: Test mysql by entering http: // localhost/phpmyadmin/index in the browser. php

Through the above steps, the WAMP environment under window7 is set up. Author: ywt

Related Article

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.