How to configure PHP website running environment under Win7

  

First, Apache installation Version explanation: openssl means to have openssl module, use openssl to configure SSL secure link for Apache, that is, use https://way to access. Nossl means no OpenSSL module, can't be used for SSL secure link, here we download with OpenSSL.

Select version: apache_2.2.14-win32-x86-openssl-0.9.8k.msi (here 32-bit example) Download address: http://www.apache.org/dist/httpd/binaries /win32/

First we create a new directory on the D drive (the drive letter is selected according to the actual situation), and named it "WAMP"; its meaning is "Wdindows Apache Mysql PhpMyAdmin"; They will all be installed in this directory. 1. Installation instructions:

Run the apache installer, the method is very simple, after the installation interface has been "next";

Then there will be an interface, you need to fill in 3 contents, respectively: Network Domain, Server Name, Administrator’s Email Address Just fill it out and it does not affect the content.

There are 2 options below, the default is 80 ports, the second is 8080 ports, according to personal needs, generally the default 80 ports. We continue to install, select Custom (custom installation) - & ldquo; next & rdquo;

which has a red X component, we click on this component, select “This feature, and all subfeatures, will be Installed on local hard drive.”, that is, this part, and subordinate subsections, all installed on the local hard disk ”. -“next” Then select "lower" in the lower right corner to change the installation path and install it to the directory you just created. "D:\\WAMP\\Apache\\”-“next” After the installation is complete, the computer will be in the lower right corner. Add an icon, double-click to open, select start or restart, it can run normally, and the installation is completed. 2. Modify the configuration:

Open the installation and record the D:\\WAMP\\Apache\\conf\\httpd.conf file. (It is not recommended to use Notepad when modifying the configuration file. It may affect it. It is recommended to use Notepad++. Or other editing software to open the modification) After opening Ctrl+F to find the content to be modified is added under #LoadModule vhost_alias_module modules/mod_vhost_alias.so: LoadModule php5_module “D:/WAMP/PHP/php5apache2_2.dll” PHPIniDir “D:/WAMP/PHP” AddType application/x-httpd-php .php AddType application/x-httpd-php .htm AddType application/x-httpd-php .html DocumentRoot “E:/WAMP/Apache/htdocs” Modified to (here The path is the same as the wwwroot directory in IIS, used to store web pages, custom or not modified by default): DocumentRoot “D:/WAMP/www” Modified to (custom or not modified default): DirectoryIndex index.html Modified Cheng: DirectoryIndex index.php default.php index.html index.htm default.html default.htm 3. Test

Create an index.html page in the D:/WAMP/www directory and enter it in the browser. http: //localhost /If the normal display, Apache is configured, has been operating normally. Second, MySql installation Version explanation: The Essentials Package: does not include embedded server and benchmark suite, there are automatic installers and configuration wizards, no MySQL Documentation. The Complete Package: Includes embedded server and benchmark suite, automatic installer and configuration wizard, MySQL Documentation. The Noinstall Archive: Contains embedded server and benchmark suite, no automatic installer and configuration wizard, MySQL Documentation. Select version: mysql-essential-5.1.44-win32.msi Download: http://www.mysql.com/downloads/mysql/1. Installation instructions: Open the installer, click “next” select custom, component For the default selection, we don't make changes - “next” The path is set to “D:\\WAMP\\Mysql”-“next” Click “ finish" after installation, a configuration wizard will appear-“next” “Detailed Configuration”-“next” There are 3 options:

Developer Machine, which will use as little memory as possible; Server Machine, which will use a moderate amount of memory; Dedicated MySQL Server Machine, this server only runs the mysql database, it will take up all the memory. You can choose according to your own needs, here we choose the second "Server Machine" - select "database", there are three options:

Mutltifunctional Database multi-purpose use, will optimize the database to very Good innodb storage type and efficient myisam storage type; Transactional Database Only is only used for transaction type, best optimized innodb, but also supports myisam; Non-Transactional Databse Only non-transaction type, suitable for simple applications Only myisam types that do not support transactions are supported. Generally choose the first multi-functional, and we are also the same. -“next” Select the data storage location of InnodDB, generally the default is OK, in order to unify I filled out "WAMP/MySQL Datafiles"----ldquo;next” choose the maximum number of connections allowed by mysql, the first is the maximum of 20 connections concurrent Number, the second is the maximum number of 500 concurrent connections, the last one is custom, you can choose according to your needs, I choose the second - "next"; The following is the port to select the database listener, the default is 3306, if Change to other ports, you must remember to modify the port when you connect to the database later, otherwise you can not connect to the mysql database, it is more troublesome, do not modify here, use the default port of mysq: 3306-“next” This step sets the default of mysql Coding, we choose the third, and in the Character Set menu, select “gbk”encoding-“next” (Note: If you want to use the original database data, it is best to determine what encoding the original database uses, if The encoding set here is inconsistent with the encoding of the original database data, and garbled characters may appear during use. )

Copyright © Windows knowledge All Rights Reserved