Installation and configuration of Apache 2.2.9, MySQL 5.0.67 and php-5.2.6 in Windows XP

Source: Internet
Author: User

The combination of Apache, MySQL, and PHP has a wide range of web applications. The main reason is free of charge, which is sufficient for Small and Medium web applications! In the past two days, I almost had to give up on the configuration. After a day and a half, I finally got some results. Now I want to make a conclusion as follows. I hope it will be helpful to my friends.

Prepare to download three installation files:

 

Apache 2.2.9 installation: http://apache.freelamp.com/httpd/binaries/win32/apache_2.2.9-win32-x86-no_ssl-r2.msi

MySQL 5.0.67 RAR decompress version: http://mirrors.dotsrc.org/mysql/Downloads/MySQL-5.0/mysql-noinstall-5.0.67-win32.zip

Php rar Version: http://hk.php.net/distributions/php-5.2.6-Win32.zip

Try to find the compressed version. The feature of the installed version is weakened, but the installation and configuration process of the compressed version is slightly complicated. The following describes how to install and configure the three versions.

The installation and configuration is based on the fable of csdnArticleMake: http://blog.csdn.net/fableking/archive/2008/06/19/2567216.aspx

The process is basically the same as what he described. The following is a reference:

 

Install apache2.2.8 and install apache2.2.8 on the homepage. You can simply double-click and press Enter. After the installation, open your browser and enter "localhost" or "127.0.0.1". If you can see the "It works !", The installation is successful.

To install and configure mysql5, first extract the downloaded MySQL file to the location where you want to install it, for example, D:/MySQL, and then enter the MySQL folder. You can see that there are several INI files in this folder, are: my-huge.ini my-innodb-heavy-4G.ini my-large.ini my-medium.ini my-small.ini this is the official given by the optimized configuration file, you can select a, copy to C:/windows and rename it to my. ini. Open my. ini and add the following configuration.Code:

# Set the installation directory of MySQL
Basedir = D:/MySQL
# Set the MySQL DATA DIRECTORY
Datadir = D:/MySQL/Data

This code must be added. Otherwise, MySQL cannot be started and the error "1067" is prompted. The following path must be flexibly processed. Next, go to the "dos" window and use the command line to enter the bin directory of MySQL. Enter the following command: mysqld -- install

This command is used to add MySQL to the Windows service. If the prompt "service successfully installed" is displayed after the command is run, the instance is successfully added. Do not believe that you go to the "service" of "Management Tools" to check whether there must be more MySQL services. Check if it has been started. If it has not been started, start it manually.

It is relatively simple to install and configure php5.2.6 PHP. Like MySQL, first extract the compressed file to the installation location and then to the PHP Directory. There are two files: "php. ini-Dist" and "php. ini-recommended ". These two files have different purposes. PHP. ini-Dist is suitable for development programs using PHP. ini-recommended with high security settings. It is suitable for product launch. Select one as needed, copy and rename it PHP. ini. Select the location. It will be used to configure Apache later. After the installation is complete, go to the Apache installation directory, open the httpd. conf file in the conf folder, and add the following settings. # Load the PHP Processing Module

Loadmodule php5_module D:/PHP/php5apache2_2.dll
# Set the php. ini file folder
Phpinidir D:/PHP
# Add a PHP file connection
Addtype application/X-httpd-PHP. php
Search for "directoryindex". The default document is added, and "index. php" is added later ".

I restarted Apache and wrote a PHP file to test it. <? PHP phpinfo ();?> . The installation is successful.

 

I installed Apache 2.2.9. Others are the same as those on this platform. What I want to emphasize here is my. the position where the configuration statements added to the INI file are placed is very important. They cannot be placed at the end of the file. They are simply added at the end of the file. As a result, an error occurs when the MySQL service is enabled, and put it under [mysqld]. Everything is OK. we can see that httpd is being configured. in Conf, the added configuration statement contains a path name. The path must be set correctly. You can use PHP flexibly Based on the location where you install PHP. the INI file does not need to be moved. It is configured. Of course, you need to configure it when using advanced services. that's all.

 

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.