Purest Apache 2 && PHP 5 && Mysql 5 for WinXP configuration method

Source: Internet
Author: User
Keywords Purest Apache 2 && PHP 5 && Mysql 5 for WinXP configuration method
Tags win32 zip vbulletin

Pre-Preparation:

Windows XP SP2 (in fact, as long as the system is more than 98 can follow such a method I think)
Apache 2 In this case I chose 2.2.2 for Win32 ... )
http://archive.apache.org/dist/httpd/

PHP 5 (although the number of versions is a bit unlucky ...) But I decided to choose the 5.1.4 for Win32 Zip version ... )
http://www.php.net/downloads.php

MySQL 5 (5.1 not yet stable ...) Let's just choose MySQL 5.0.22 for Win32 Zip version ... )
http://www.mysql.com/

This scenario does not involve system folders ... So we can choose a folder of other partitions to facilitate future server maintenance ... This is taking X:\Server as an example ... Note: The folder name is best not to include spaces or other non-English characters ... Otherwise, it is easy to cause the server to crash in some cases ...

========================================
Install Apache:

Run Apache_2.2.2-win32-x86-no_ssl.msi ... All the way Next down ... To select the installation method, select Custom Mode ..... Then Next select the installation path ... Navigate to X:\Server\Apache (of course, you can choose a different path, or even choose the complete installation.) I'm just used to talking about all the server-related software being lumped together.
I was not prepared to write the coexistence configuration of IIS with Apache ... Think about it or bring a pen ... When prompted to fill out the Server information ... The bottom will let you choose Port ... If you have IIS server installed ... Here you select the second item "only for the current user, on Port 8080, when started manually." ...... This means that Apache will occupy 8080 ports ... If you do not have IIS installed ... Ignore it ...
Continue Next ... Pop up a few CMD windows after installing Windows services ... The installation is complete ... The Apache pink feather icon will appear in the lower right corner, which should show the green light on the unexpected icon (indicating that the HTTP servo has started properly) ... You can visit http://www.quchao.com/to try, if the screen appears "it Works" means the installation is successful ... (I remember the previous version was not like this, but a pretty fancy page ...) So as long as there is no prompt to find the page ... Apache Servo has been installed successfully) of course ... If the red light is on ... Configuration Positive Error ... Look back and find out ...
The Apache server is installed ...

=======================================
Install PHP:

Unzip Php-5.1.4-win32.zip ... and placed under the X:\Server\PHP ...
Next, add the environment variable for the PHP installation directory ... On the My Computer icon, click the right mouse button ... View ' Properties ' ... Then switch to the ' Advanced ' tab ... Click on the ' Environment Variables ' button (shortcut: alt+n) ... Find the ' Path ' variable in the ' System variable ' field that pops up ... Double-click Edit and add at the end of the variable value '; X:\Server\PHP ' (note there is a semicolon that separates the previous values) ...
Restart your computer ... Why? Let the environment variable take effect Bai ...
At this point, the PHP installation is complete ... Of course, it's not yet associated with Apache ... And without any setup ... Don't worry ... Later I will write ...

=======================================
Configure Apache:

A particularly important step: if you are the same as me select the current latest PHP stable version 5.1.4 ... The official download of the source package in the modular support PHP5apache2.dll is not applicable to Apache 2.2.2 ... It is necessary to recompile PHP ... But the PHP5 Lab offers solutions:
Download this compression pack (Http://www.phpv.net/php5apache2.dll-php5.1.x.rar) ... After decompression will PHP5apache2.dll thrown into the X:\Server\PHP overwrite the original file ... Throw httpd.exe.manifest into the X:\Server\Apache\Bin folder ... Last Run Vcredist_x86.exe (if you have the. Net FrameWork installed, you do not need to install this file) ...
Of course, you can skip this step if you choose to compare older versions.
Start modifying the Apache configuration file below: x:/server/apache/conf/httpd.conf
Modify Document Publishing Path ...
Search:
DocumentRoot "X:/server/apache/htdocs"
Change the value to the publishing path you want, such as:
DocumentRoot "X:/server/www"
Then there is another place that needs to be modified ... Otherwise you will not have access to ...
Search:
Directory "X:/server/apache/htdocs"
Modified to:
Directory "X:/server/www"
To modify the default script:
Search:
DirectoryIndex index.html
Add the default script names that you want, separated by spaces, with a note of precedence before and after, such as:
DirectoryIndex index. PHP index.html index.htm
For PHP 5 configuration:
At the bottom of the document, add the following characters:
# Call PHP 5 module
LoadModule php5_module "X:/server/php/php5apache2.dll"
# Add Mime Type ... You can also modify the Mime.types file
AddType application/x-httpd-php. Php
AddType Application/x-httpd-php-source. Phps
# Add the default character set ... utf8 is the kingly ...
Adddefaultcharset UTF8
# set PHP.ini directory
Phpinidir "x:/server/php"
At this point, Apache has been able to support PHP ... Of course...... This article only describes how to perform a basic installation ... Will not involve detailed configuration and optimization ... You can refer to the manual for configuration ...
' Www.cncms.com
=======================================
Install MySQL:

Unzip Mysql-noinstall-5.0.22-win32.zip ... and placed under the X:\Server\MySQL ...
Next install the MySQL service ... Open cmd.exe ... Then go to the X:\Server\MySQL\bin directory ... Shrimp You're not? Then I'll write it clearly.
Start-run->cmd-> carriage return ...
Then go to the X:\Server\MySQL\bin directory:
>CD/D X:\Server\MySQL\bin Enter
(If your folder has spaces, don't forget to add double quotes outside the path)
Then run the MySQL Service installation script:
>mysqld-nt-install
Displays the MySQL service installed successfully, indicating that the installation was successful ...
Next, add an environment variable for the MySQL installation directory ... On the My Computer icon, click the right mouse button ... View ' Properties ' ... Then switch to the ' Advanced ' tab ... Click on the ' Environment Variables ' button (shortcut: alt+n) ... Find the ' Path ' variable in the ' System variable ' field that pops up ... Double-click Edit and add at the end of the variable value '; X:\Server\MySQL ' (note there is a semicolon that separates the previous values) ...
Restart your computer ... Why? or let the environment variable take effect ...
(I am ...) Why not say it together when you install PHP ... I have to restart it again ... )
This is ... I forgot......
Then configure MySQL ... Come to X:\Server\MySQL ... There should be a number of INI files ... We take one of our own needs (very similar ...). Only the default configuration is different ... You can also modify it yourself) ... Because I only for the local development debugging, so chose the My-small.ini ... Make a copy of it ... Named My.ini ... Open it with a text editor:
Search:
[Mysqld]
Add the following word lines below:
#MySQL installation directory
Basedir=x:/server/mysql
#MySQL Default Data Directory
Datadir=x:/server/mysql/data
# Default Character Set ... Set it to UTF8.
Default-character-set=utf8
# Default Storage Engine ... Go back to the MyISAM era ... InnoDB was bought by Oracle ... Although open source ... But......
Default-storage-engine=myisam
Then, at the bottom of the document, add:
[Winmysqladmin]
Server=x:/server/mysql/bin/mysqld-nt.exe
MySQL Configuration Complete ... The following can be started to try ... Open cmd.exe ... Input:
net start MySQL
If the ' MySQL service has started successfully ' ... It means ... That's the right thing to say ... Otherwise please check back ...
The server started ... We can log in and try it ...
>CD/D X:\Server\MySQL\bin Enter
Then log in.
>mysql-u root-p
Because the root initial state no password, prompt enter PassWord the direct carriage return can ...
Then the command line enters the MySQL Shell State which means ' invasion ' succeeds ...
If you do not want others to use a blank password to invade you, it is better to root a fork to set a password ...
Mysql>set password for ' root ' @ ' localhost ' = old_password (' password_for_root ');
(This is a new command for MySQL 5, please change old_password to password)
Replace the passwor_for_root with your own password ... Don't be too simple ...
Prompt ' Query Ok ' indicates that the modification was successful.
Don't believe me? You can exit; Go out and log in and try again ...
So far...... MySQL installation is complete ... Please refer to the manual for detailed optimization configuration ... As for MySQL's association with PHP, the following will be mentioned ...

=====================================
' Www.cncms.com
To configure PHP:

Enter X:\Server\PHP ... Rename Php.ini-recommend to php.ini and open with a text editor ...
To modify the error reporting level ... Run some programs that are not standard in writing ... You will find the full screen of the ' error ' ...
Search:
error_reporting = E_all
Modified to:
error_reporting = error_reporting = E_all & ~e_notice & ~e_strict
Because it is local debugging, I certainly hope that the error is output for me to debug ...
Search:
Display_errors = Off
Modified to:
Display_errors = On
For local developers, it doesn't seem necessary to log errors ...
Search:
Log_errors = On
Modified to:
Log_errors = Off
It is necessary to set the path of the extension library ...
Search:
Extension_dir = "./"
Modified to:
Extension_dir = "X:/server/php/ext"
PHP 5 does not turn on MySQL support by default ...
Search:
; Extension=php_mysql.dll
Remove the preceding semicolon:
Extension=php_mysql.dll
In addition, VBulletin has already enabled the support of mysqli ... So here we introduce MySQL extension library ...
Search:
Extension=php_mysql.dll
Add below:
Extension=php_mysqli.dll
Of course, in order to better use some of VBulletin's image-related functions, we need to enable the GD2 library ...
Search:
; Extension=php_gd2.dll
Remove the preceding semicolon:
Extension=php_gd2.dll
We also want to make calls to some of the more commonly used libraries, such as Php_mbstring.dll, Php_curl.dll, Php_sockets.dll, Php_xmlrpc.dll, etc... Open the same way as above ...
(only common extensions are enabled here ...). Other extensions please decide on your own needs ... )
Although VBulletin uses its built-in session mechanism, the session mechanism of PHP is necessary in many programs ...
Search:
; Session.save_path = "/tmp"
Modified to an existing path ...
or create a TMP directory under the Publish directory ...
Here we use the previous method ... First create such a directory X:\Session ...
Then modify to:
Session.save_path = "X:/session"
The basic setup is complete here ... PHP can also support MySQL as normal ... More detailed settings we still go through the manual ...

====================================
Conclusion:

The most basic WAMP environment is configured ... Next I also configured Zend Optimizer and Subversion ... Because it is not standard ... There is no introduction ...
In fact, Apache server can also not install ... Unfortunately I did not find the ZIP version of 2.2.2 ... And it's too tedious to compile with SRC files ... So simply execute the installer ... The next time I reload the system ... Apache has turned green ... Let's look forward to ... (About two years later?) )
Uh.................. Think of anything to add in ...

  • 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.