How to build the station environment under the WIN7 flagship edition
First, we need to prepare the necessary software
Apache Httpd-2.2.22-win32-x86-openssl-0.9.8t.msi
PHP Php-5.3.10-win32-vc9-x86.zip
MySQL Mysql-5.5.20-win32.msi
Second, the installation of software
1, the installation of Apache is very simple: double-click Installation, and installation of other Windows software is no different, in the filling server infomation, there is no special provisions, as long as the input of the information in line with the format can be;
2, after installation, in the browser input http://localhost, if the display of it works!, indicating the success of Apache installation;
3, install PHP: Php-5.3.10-win32-vc9-x86.zip to a directory can be extracted;
4, install MySQL: Double-click Installation, if you need to change the installation directory, then in Choose Setup Type Select Custom;
5, installed after the installation of MySQL, all keep the default option, but it is best to change the MySQL default encoding to UTF8, in the Modify security settings option to set the password, enter two times the password can be completed, the last point execute configuration completed;
Iii. Integration of Apache+php+mysql
Apache: First modify Apache configuration file, let Apache support parsing php file. The Apache configuration file is httpd.conf in the Conf directory of the Apache installation directory.
1. Allow Apache to parse the PHP file and find it in the config file
#LoadModule Vhost_alias_module modules/mod_vhost_alias.so
Add on the next line (the green position is based on the PHP directory)
LoadModule php5_module "D:/develop/php/php5apache2_2.dll"
Phpinidir "d:/develop/php"
AddType application/x-httpd-php. php. html. htm
2. Found in the configuration file
DirectoryIndex index.html
To
DirectoryIndex index.php index.html
3. Modify the Apache Site Directory, found in the configuration file (Apache installed directory is different, the value displayed is not the same)
DocumentRoot "D:/develop/apache2.2/htdocs"
To
DocumentRoot "d:/workspace/php"
and find
To
PHP: Rename php.ini-development as PHP.ini, PHP as the configuration file. Modify PHP.ini
1. Set up a specific directory of the PHP expansion pack to find
; On Windows:
; Extension_dir = "ext"
Change to (value is the directory of the Ext folder)
; On Windows:
Extension_dir = "D:/develop/php/ext"
2. Open the corresponding library function, find the library that need to open the row
; Extension=php_curl.dll
; Extension=php_gd2.dll
; Extension=php_mbstring.dll
; Extension=php_mysql.dll
; Extension=php_xmlrpc.dll
Remove the preceding semicolon (note), and change to
Extension=php_curl.dll
Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_mysql.dll
Extension=php_xmlrpc.dll
3. Set time zone, find
;d Ate.timezone =
To
Date.timezone = Asia/shanghai
The configuration is complete, and the configuration is checked for success. Restart Apache, new file index.php in the Site directory, enter:
Phpinfo ();
?>
When you open the browser input http://localhost and display the following, the installation succeeds and MySQL is successfully associated.