Installing Apache, PHP, and MySQL integrated environments under Windows

Source: Internet
Author: User

First, the preparatory work

The versions of this installation are: apache2.4, php5.6, mysql5.7

is: http://pan.baidu.com/s/1boQNIOn Password: Zarx

Second, installation steps

Install APAHCE First, then install PHP and finally install MySQL.

As a Web integration environment, it is necessary to install Apache first, and apche response by PHP to feedback, PHP data to be obtained from the MySQL, so the entire process is installed, is the first Apache, then PHP, and finally MySQL.

Third, installation Apahce

   installation due to the download of the installation package is free of installation, so directly unzip the package, put in the appropriate directory. Enter the Apache configuration file.

  Configure Enter the Conf directory to locate the httpd.conf file.

    1. Modify the ServerRoot root path to an absolute path: For example: Define srvroot "E:/dev/apache24"

  

2. Portal file configuration: Find DirectoryIndex, add index.php in front of index.html. Note the space. This ensures that the PHP file takes precedence over the HTML file read.

  

3. Modify the Site configuration directory. Remove the # in front of the include conf/extra/httpd-vhosts.conf. This allows us to configure the virtual site directory to be configured under extra httpd-vhosts.conf.

4. Modify the project directory Htodcs. Because Apche default home folder directory is Htdocs, and is in the Apche program root directory, so that once the apche need to reinstall, you have to move the project out, more trouble. So we move the project directory first and put it in the e-packing directory. Therefore, the revision of the DocumentRoot directory should be repaired.

  

Copy the Htdocs to the e-packing directory and modify the directory name to www.

5. Add the Apche process to the Windows service. cmd into the DOS box. Go to Apache Bin directory to execute command httpd.exe–k install-n "Apache", open Apache Monitor to start service, enter localhost test in browser.

Iv. PHP

install the same, the PHP installation package is also free of installation, directly decompression.  

Configuration

1. Copy the Php.ini-development file in the directory and rename it to php.ini. He is a PHP configuration file.

2. Add PHP support for Apache services. Open the Apache configuration file http.conf at the end with the following paragraph:

# PHP5 Support LoadModule php5_module E:/dev/php56/php5apache2_4. DLL AddType application/x-httpd-php. php. html. htm # Configure the path to PHP.ini  "E:/dev/php56"

3. Open PHP extensions in php.ini. Change Extension_dir = "/ext" to an absolute path, such as Extension_dir = "E:/dev/php56/ext", and remove the preceding colon.

and open the other corresponding modules. ;

4. Modify php.ini Inside Time configuration to remove the front; Change to asian time Date.timezone = Asia/shanghai

Five, MySQL

  installation Ibid.

  Configuration

    1. Copy My-default.ini to My.ini to overwrite the following code. Change the configuration as follows:
             [mysqld]Loose-default-character-Set =UTF8 Basedir=E:/Dev/mysql57 DataDir=E:/Mysqldata Port= 3306Sql_mode=' No_engine_substitution,strict_trans_tables ' character_set_server=UTF8[Client]Loose-default-character-Set =Utf8

This time the MySQL data is set to the MySQL installation directory.

2. Create a new Mysqldata folder and initialize the Mysqldata directory. The Cd enters the MySQL bin directory to execute the command mysqld--initialize-insecure--user=mysql executes successfully, enters the Mysqldata directory, discovers the directory to have the data.

3. Register the MySQL process with the winndows service. Execute command in MySQL Bin directory: Myslqd--install. After successful execution, net start MySQL starts the MySQL service.

4. Enter MySQL and set the password. Execute the command in the MySQL bin directory:

Mysql-uroot-p without password, enter directly. Execute command to set password to root:

SET PASSWORD = PASSWORD (' root ');

Four, check the Apache configuration, whether the module has been opened.

  1. Rewrite module ...

Installing Apache, PHP, and MySQL integrated environments under Windows

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.