www Server build Note: a wamp,windows7+apache2.4+mysql5.6+php5.5

Source: Internet
Author: User
Tags configuration php install php

Lamp Build Note Portal http://www.cnblogs.com/jianming348/p/3952650.html software version:

Win7 64-bit (requires 64-bit system to support higher memory due to memory configuration improvements now)

Apache 2.4.10 Win64 version (download 64 Apache on official website, note 64-bit, corresponding to the system)

MySQL 5.6.19 (Download the latest in the website)

PHP 5.5.15 (Download the latest website)

(because it is a virtual machine, there is no partition, only a C drive, so can only be created in the C-drive, there are conditions recommended to operate under other disks, security, not affected by the system disk)

First install all the software under the same folder, I think this convenient management, I created a C drive called Wamp folder, inside of the following folder

Apache24: Installation location of server Software httpd

Data:mysql Database storage location, conditional can be independent of an inventory data

Htdocs:http document abbreviation, store website file, html,php etc.

Installation location of Mysql:mysql

Installation location of php:php

Apache steps:

1. Download Apache, not in Apache Orthodox official website download, but a branch http://www.apachelounge.com

The official website of Apache support Windows very little, so someone opened a branch support windows, landing above the website can be downloaded to 64-bit Apache.

2. Install Apache to the location mentioned above Wamp/apache24

3. Open Apache, in the bin directory has apachemonitor, open and click the interface start can start the server, at this time has started successfully, open the browser, the address bar type "localhost" can browse the local site server provided by the default website.

But pure Apache can only support simple Web pages, to support PHP, you need to modify the configuration, extended support. Extension support requires PHP to be installed before it can be done.

4. Modify the location of the site, the default Apache Web site files are stored in the installation directory htdocs, need to modify the location, you will find in the installation directory conf/httpd.conf with a text editor open, find DocumentRoot Change the back path to the path you need to store, my path is DocumentRoot "C:/wamp/htdocs", after modification, use Apachemonitor, click Restart Restart Apache Service

5. Add PHP extension, this step is implemented on the basis of PHP installation, please install PHP and then perform this step.

After PHP is installed, open the installation directory under Conf/httpd.conf, and after a series of loadmodule statements, add

#php Module

LoadModule php5_module "C:/wamp/php/php5apache2_4.dll"

Phpinidir c:/wamp/php

AddType application/x-httpd-php. php. html. htm

The "#" number is in front, followed by a comment

LoadModule load module, Php5_module is the module name, followed by the corresponding address

Phpinidir is the installation address of the configuration PHP, which is used to compile PHP

AddType adds a type that means as long as the. php. html. htm ends with PHP parsing

Save the file conf/httpd.conf and restart the Apache service.

php Steps:

1. Download php,http://php.net directly to the official website to download the PHP compression package, extracted under wamp/php

2. Configure PHP, in the installation directory has php.ini-development this file, copy and change the name bit php.ini.

(This is the PHP configuration file, the first read php.ini, this file does not exist to read php.ini-development, in case php.ini change the wrong, there are php.ini-development to do backup.) )

Open PHP.ini Find a series of text such as EXTENSION=XXX, add the following

;p hp5.5 ext not use MySQL

Extension=php_mysqli.dll

In fact, there is already a extension=php_mysqli.dll, remove the semicolon, the new addition is for the convenience of viewing, the front semicolon ";" is a comment, php5.5 This version is not recommended with MySQL, but instead of using mysqli,i is improve meaning.

MySQL is the need to use the database for storage needs to be configured, is generally required.

3. Go back to the Apache step and perform step 5th

4. Apache can now execute PHP script and create a new PHP test file under Htdocs.

New File test.php

The contents are as follows

<?php

echo "Output PHP Info:"

Phpinfo ();

?>

Save, open the browser, enter localhost/test.php to see the effect

MySQL steps:

(If you are using the installation version, the direct installation is good, the following steps do not have to look, but the non-installed version of the people feel pure, can control strong)

1. Download the non-installed version of MySQL, which has the commercial and Community editions, we use the community version of MySQL Community Downloads

In the Web page select Windows (x86, 64-bit), ZIP archive This download, MSI installer is the installation version.

2. Configure MYSQL, extract to the relevant directory wamp/mysql, check the installation directory for My.ini, if not, copy My-backup.ini, and renamed to My.ini. Open My.ini, find Basedir and DataDir, respectively, modify the following

Basedir = C:/wamp/mysql

DataDir = C:/wamp/data

Basedir is the MySQL installation directory

DataDir is the storage directory for the database

C:/wamp/mysql/data the following data to the new DataDir directory, because the source data under some MySQL must use the database, such as MySQL user account information, so the new data storage address can not be empty.

At the end of the file, add

[Client]

Default-character-set=utf8

The UTF8 format is used by default when the client executes the statement

Configure environment variables, under Path of Windows environment variable, plus MYSQL bin directory for civilian, mine is C:\WAMP\MYSQL\\bin;

3. Start MySQL, go to cmd command line mode, execute

Mysqld-install

Installing MySQL, install the front two dashes

net start MySQL

Start MySQL replication

PS: If startup fails, stop the service, uninstall after you restart the installation

Mysqld-remove

Uninstall MySQL

net stop MySQL

Stop MySQL Service

At this point, the WAMP environment is well equipped. If you have a variety of problems, please first check whether the installation package is the appropriate version, the configuration is wrong to write, followed by the Internet to find the answer, there is always a reason for the problem.

The whole construction process does appear various reasons, each machine environment is different, the problem is different, but the general construction method is the same.

www Server build Note: a wamp,windows7+apache2.4+mysql5.6+php5.5

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.