Easy to learn Php--wamp environment construction

Source: Internet
Author: User
Tags learn php dedicated server phpmyadmin

Pre-Installation Preparation
    • View the type of the machine (x86/x64, 32-bit or 64-bit)
    • Install the VC9/VC11/VC14 runtime (you need to select the installation according to the type of the machine)
    • Create a good one installation path to install the entire AMP environment (I'm using "D:/tools/lamp")
Installing Apache

If you use the official Apache associated PHP components, PHP version will limit the version of Apache, so you need to choose the version of PHP to be configured to download Apache version, I am using version apache2.4+php5.6

Apache is now officially provided by the green version of Apache, it means that can not be simple Next to complete the installation, the environment variables and configuration files need to be modified.

  1. After downloading it, unzip it to the D:/tools/lamp/apache24 directory (the directory can be changed at will, but remember where)
  2. Right button My Computer--Properties--Advanced settings--environment variables, the system variable to find the Path variable, edit, at the end of the add ";D:/tools/lamp/apache24/bin", it is recommended to copy it, modify it in TXT, edit it and save it.
  3. Open "d:/tools/lamp/apache24/conf/httpd.conf" file, this is the Apache configuration file, search "ServerRoot", this is the path of Apache, need to change to your Apache location
  4. In just the file to find "DocumentRoot", this is the root of the site settings, the default is "C:/apache24/htdocs", I changed to "D:/wwwroot", you can also choose to use the Apache directory Htdocs folder as the root directory , personal more accustomed to use wwwroot, the following line of "<directory" C:/apache24/htdocs ">" also want to make corresponding changes, my is "<directory" D:/wwwroot ">"
  5. Find "#ServerName www.example.com:80" and remove the previous comment symbol "#".
  6. Find "DirectoryIndex" and change it to "DirectoryIndex index.php index.html index.html". In this way, the default home page of your site directory is index.php, if no index.php system will automatically look for index.html, HTML as the default home page. You should pay attention to the space when modifying!
  7. Open Run (win+r) input "cmd", enter, input: Httpd-k install-n Apache24, you can give Apache registration service, let its boot automatically start, where Apache24 can be arbitrarily changed, as long as it is legal on the line
  8. Open Run (win+r), enter "CMD", return, enter "httpd-k start" to open the Apache service (text in "" is entered)
  9. Open the browser, enter 127.0.0.1, if the "It work" is displayed, the Apache installation is successful
PHP Installation

Now PHP is also the green version, but also need to modify the configuration file, I use the PHP5.6 version, first extracted in the installation path, I chose to extract the" d:/tools/lamp/php5.6 "

    1. Find the" d:/tools/lamp/php5.6/php.ini-development "file, copy one and rename it to" PHP.ini "
    2. Open" php.ini ", find"; Extension_dir = "ext" ", here"; "is a comment, directly removed, on behalf of the Open PHP Extension library
    3. Open Apache config file, at any location (suggested head or tail, I added at the end of the file) add the following statement:
#***********php与Apache关联***********#让apache载入php处理模块LoadModule php7_module D:/tools/LAMP/php5.6/php7apache2_4.dll#指定php的ini文件,该文件是对php的一些配置,千万不要给路径加"",很多文章说要加,结果一直报错,取消了就好了PHPIniDir D:/tools/LAMP/php5.6/php.iniAddType application/x-httpd-php .php .phtml#************************************

5. Open Run (win+r), enter "cmd", enter "httpd-k restart" to restart the Apache service (enter the text in "") 4. Create a new file "index.php" in the root directory of the web, enter

<?php    phpinfo();?>

If information about PHP is displayed, the installation is successful

Installation of MySQL

MySQL version 5.5 has the MSI installation package for Windows, which is the format of Microsoft's previous installation package, which can be directly double-clicked to run the Setup program.

  1. Double-click the MySQL installation package and click Next.
  2. Select "I accept the terms in the License agreement" and click Next. Choose Setup Type (choose installation option), there are three kinds: typical (typical), custom (customized), complete (full). Here we choose Custom, then click Next.
  3. Custom Setup (customized installation settings), here still click the inverted triangle Select "Entire feature will is installed on the local hard drive" to install all of them, then click on the Change button below, After selecting the installation location, click Next. Note: Be sure to check all option installation locations, preferably in the same location. There are 6 entries in total, but only the 1th and 6th installation locations are changed, and the other entries are automatically adjusted to the previous one. --suggested novice can not make changes
  4. Ready to install the program (prepare the installer), observe the middle settings, confirm the error, click Next, otherwise, click Back and modify.
  5. During the installation, a new window will appear, which is for MySQL Enterprise (MySQL Business Edition) to advertise, ignore, keep next, point slowly until the finish interface appears. PS: At this point first look at the next one, do not mess.
  6. Wizard complete (Setup Wizard completed), click the check box in front of launch the MySQL Instance Configuration Wizard (start the MySQL config guide) (the default is tick, do not shut it down), then click Finish, This will enter the MySQL configuration interface.
  7. Needless to say, click Next.
  8. Select the Configuration method (please select a configuration type). There are two options, one is detailed configuration (verbose), one is Stardard configuration (standard), here we select detailed configuration, and click Next.
  9. Select the server type (please select a server). There are three options: Developer machine (for development testing), Server machine (for servers), dedicated MySQL server machine (dedicated server), because I was used to develop, so I chose the first item, Then click Next.
  10. Select the database usage (please select a DB usage). There are three kinds: the first is multifuctional database, the second is transactional database only, the third is non-transactional database only, I don't understand the difference between the three options here, but I chose the first multifuctional Database according to the English comments and other posts on the Web, then click Next.
  11. Select the InnoDB database file storage location (please select the drive for the InnoDB datafile), the default is the MySQL location installed. Leave the default and click Next directly.
  12. Select the exact amount of traffic that is connected to the server at the same time (please set the approximate number of concurrent connections to the server). Three options: The first is decision Support (DSS)/olap (approximately 20), the second is Online Transaction processing (OLTP) (approximately 500), and the third is manual Settings ( Manual setting), because I am developing the test, so choose the first one, then click Next.
  13. Network Options (Please select the networking options). The first is whether to enable TCP/IP connection, select the second is to enable strict mode (enable Strict mode), I chose, recommend the Novice to choose, so the code more standard, and then click Next.
  14. Select the default character set (please select the character set). The first is the Stardard Character set (standard character set), the default is Latin1, which is suitable for storing English; the second is best support for multilingualism (most suitable for multiple languages), the default is UTF8, which is suitable for storing multi-language character sets The third one is manual selection. Here we choose UTF8 encoding, that is, select the second or third UTF8, then click Next.
  15. Set the Windows option (please set the Windows options). The first item is whether it is installed as Windows service (install as Windows services), it is recommended to tick on, the following Service name is the server identity name, default, there is a random start MySQL option, if not selected, After starting MySQL, you need to enter the net start MySQL on cmd. The second item is whether to add the Bin folder path to the path in the environment variable (Include bin Directory in Windows path), it is recommended to tick, so you can then directly on the cmd on the Bin folder to enter any file on the use, and then click Next.
  16. Safety option (please set the security options). The first is to modify the security settings (Modify Settings), two of which are the new root password and the confirmation input password (that is, re-enter it again), the bottom is to create an anonymous account (created an Anonymous accounts), Select First, go back to the installation and remember to remove, then click Next.
  17. Prepare to execute the settings you just made, and when you're sure, click Execute. After the execution completes, click Finish to finish the setup.
  18. Open the MySQL installation folder, locate the Libmysql.dll in the Bin folder, and copy it to the system's System32 folder. If you don't find it, the installer has copied it for you.
  19. In the PHP configuration file, search for "; extension=phpGd2.dll", "extension=phpmysql.dll", "Extension=php_mysqli.dll", and the previous ";" Get rid of all, open the extension
PhpMyAdmin Configuration

Because the version of PhpMyAdmin is related to the version of PHP, so it is recommended not to download too old version, error, I use PhpMyAdmin 4.0.10.17, can be compatible with PHP5.6

    1. Download finished directly extracted in the root directory of the site, I extracted in the" d:/wwwroot/phpmyadmin "directory
    2. find" d:/wwwroot/phpmyadmin/libraries/config.default.php ", open and configure $cfg [' Servers '] [$i] [' password '] = ' new password ';
    3. Open run ( WIN+R), enter "CMD", return, enter "httpd-k restart" to restart the Apache service (text entered in "")
    4. Open browser, enter: 127.0.0.1/phpmyadmin, according to the account password just configured login (account default is root) can

Easy to learn php--wamp environment construction

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.