A wamp build process and a wamp Build Process

Source: Internet
Author: User
Tags mysql login

A wamp build process and a wamp Build Process

The environment has not been set up for a long time, and this time is still quite smooth.

Let's review how the website runs.

OK. Go to the topic. The wamp version of the environment is as follows:

Apache24: httpd-2.4.26-x64-vc11
Php: php-5.6.30-Win32-VC11-x64
Mysql: mysql-installer-community-5.5.56

1. the folder path is as follows:

(Because the default path in the configuration file httpd. conf is Apache24, the folder name will not be changed for convenience)

2. install Apache

  • Download and decompress the package to Apache24.
  • Prepare the Apache runtime environment Visual C ++ 2012
  • Enter the command prompt cmd Run Command to check whether the command can be run

 

  • Keep the cmd cursor flashing, that is, running. Http: // localhost in the test address bar. The default homepage is displayed, indicating that the server can run.
  • In most cases, Apache must be installed as a Windows server.
  • In cmd, httpd-k install httpd-k start
  • The service is added to the computer service.
  • To make the service run anywhere through httpd.exe, you need to add environment variables. System --- advanced system settings --- environment variables.

3. install PHP

  • Download and decompress the file to the php folder. The default version does not include the php5apache2_4.dll file and cannot be loaded by Apache. Select the ts version here.
  • To run php.exe In the cmd root directory, set the environment variable first.
  • After setting the environment variables, you can run the php.exe-f PHP file path in the cmd root directory to run the PHP file, as shown in figure
    <?php for($i=1;$i<=10;$i++){    echo "$i";        }?>

    In cmd mode

    12345678910

    * Php can run independently.

4. Configure httpd. conf,EnableApachePhp

  • In the cmd root directory, view the modules loaded by Apache.
    httpd.exe -M
  • Add the following to the httpd. conf file:
    LoadModule php5_module D:/wamp/php/php5apache2_4.dllPHPIniDir "D:/wamp/php"AddType application/x-httpd-php .php .html .htm 

5. Configure php. ini to load other modules 

  • Copy php. ini-development and rename it as php. ini.
    Modify the time zone date. timezone = PRC modify the path of the loading module extension_dir = "D:/wamp/php/ext" select the module to be loaded and remove the semicolon extension = php_mysql.dllextension = php_mysqli.dll and so on.
  • You can also view the php loaded modules in the cmd root directory.
    php.exe -M

      

6. Configure the VM

  • Modify httpd. conf and remove # To enable the settings.
    #Virtual hosts Include conf/extra/httpd-vhosts.conf
  • Modify httpd-vhost.conf
    Add:
    <VirtualHost *: 80> DocumentRoot "G:/color" ServerName color.com ErrorLog "logs/color. log" CustomLog "logs/color. log" common </VirtualHost>
  • Comment out the Require all denied of httpd. conf, that is
    <Directory/> AllowOverride none # Require all denied </Directory> is missing. 403 Forbidden is displayed.

      

7. Install mysql

  • Download(SelectMSI Installer)
  • Installation omitted.
  • Test availability
    C: \> net stop mysqlMySQL service is stopping. MySQL service has been stopped successfully. C: \> net start mysqlMySQL service is starting. MySQL service has been started successfully.
  • Log on to the mysql server
    C:\>mysql.exe -hlocalhost -uroot -prootWelcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 1Server version: 5.5.56 MySQL Community Server (GPL)Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>

    It indicates that the mysql login is successful.

Now, the environment has been basically set up. Restart apache command: httpd-k restart

 

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.