Installation: Win7 (64-bit) php5.5-apache2.4-mysql5.6 environment installation

Source: Internet
Author: User
Tags phpinfo

First, installation configuration Apache2.4.7 (Httpd-2.4.7-win64-vc11.zip)

1. Unzip the downloaded installation package: Httpd-2.4.7-win64-vc11.zip put it in its own installation directory (my directory D:\Apache\Apache24)


2. Then modify the http.conf (D:\Apache\Apache24\conf\http.conf) configuration file-use Notepad to open the line

(1) Modify the root path of the ServerRoot Apache:

(37 lines) ServerRoot "C:/apache24"

change to ServerRoot "D:\Apache\Apache24"

(2) modify servername your host name:

(217 lines) Servernamewww.example.com:80

Remove the previous #, which is required when launching Apache from the command line.

(3) modify DocumentRoot Apache access to the home folder directory, is the location of PHP, HTML code files. Apache default path is under Htdocs (D:\Apache\Apache24 \htdocs), there will be a simple import file index.html. This path can be modified on its own, and I will configure it under my own new folder Phpweb (D:\servers\phpweb).

(247 lines) DocumentRoot "C:/apache24/htdocs"

<directory "C:/apache24/htdocs" >

Change to =

DocumentRoot "D: \servers\phpweb"

<directory "D: \servers\phpweb" >

(4) Modify the Portal file configuration: DirectoryIndex generally we are index.php, index.html, index.htm as the portal for Web projects. Apache Default portal only index.html need to add the other two support, of course, the settings of this portal file can be increased or decreased according to their own needs, if the requirements are more stringent can only write a index.php, so that the entry in the project can only be index.php

(274 lines) <IfModuledir_module>

Directoryindexindex.html

</IfModule>

Change to =

<IfModuledir_module>

DirectoryIndex index.php index.htm index.html

</IfModule>

(5) set the Serverscript directory:

(358 lines) scriptalias/cgi-bin/"c:/apache24/cgi-bin/"

Change to = scriptalias/cgi-bin/"d:/apache/apache24/cgi-bin"

(6) (380 lines)

<directory "C:/apache24/cgi-bin" >

AllowOverride None

Options None

Require all granted

</Directory>

Change to =

<directory "d:/apache/apache24/cgi-bin" >

AllowOverride None

Options None

Require all granted

</Directory>

3. You can start Apache next.

Start---Run, enter cmd, and open a command prompt. Then enter the D:\Apache\apache24\bin directory under Enter httpd enter.


You can test without an error (Keep the command window open).

Put the index.html in the Apache24\htdocs directory in the D:\servers\phpweb directory, access to the browser will appear "It works" that the Apache has been properly installed and started. You can also write a simple index.html file or open it yourself.

4. Add Apache to the Window service startup item

The command to add the HTTP service is: httpd.exe-k install-n "ServiceName" ServiceName is the name of the service, I added: Httpd.exe-k install-n "Apache24" The c1> command succeeds with a successful prompt, and you can see the Apache24 Service in the Window service startup item .

Then click on to start, if you do not want to set up the boot, you can also modify the startup type to Manual.

If you want to uninstall this service, first stop the service and then enter Httpd.exe-k uninstall-n "Apache24" to uninstall the service.

Of course, you can also start Apache by D:\Apache\Apache24\bin the ApacheMonitor.exe below.

  Second, installation configuration php5.5.10 (Php-5.5.10-win32-vc11-x64.zip)

  • 1, unzip the downloaded Php-5.5.10-win32-vc11-x64.zip to the installation directory my Yes (D:\phpEnv\php)

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

    3. Add PHP support for Apache service

    Open Apache configuration file http.conf at the end of the add

    # PHP5 Support

    LoadModule Php5_module D:/servers/php/php5apache2_4.dll

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

    # Configure Thepath to PHP.ini

    Phpinidir "d:/servers/php"

    Here I add below the LoadModule

    Add the time to ensure that your Php5apache2_4.dll file does exist php5.5 earlier version of the file does not have this, but the high-point version is already available, you can open the PHP installation directory to find this file

    Phpinidir "d:/servers/php" This is your PHP root directory.


  • 4. Restart the Apache server.

    5. Test. Delete other files in Phpweb, create a new index.php, <?php phpinfo (),?> Save, access to the information that appears in PHP indicates that PHP has been successfully installed.

    Note:

    Some common configuration changes in PHP: (D:\servers\php\php.ini)

    Settings for time zone: Date.timezone = Asia/shanghai

    Error Reporting level: Error_reporting = E_all This can all be opened in development mode.


    Three, installation configuration mysql5.6.16 (Mysql-5.6.16-winx64.zip)

    1. Install MySQL

    64-bit MySQL temporarily did not find the MSI installation package, so directly extracted to the installation directory, and then configure the relevant environment variables, modify the configuration file, Add window service on the line, here is not detailed. Here put my configuration file for everyone to refer to the following:

    [Mysqld]

    Loose-default-character-set = UTF8

    Basedir = d:/program/mysql-5.6

    DataDir = D:/program/mysql-5.6/data

    Port = 3306

    Sql_mode=no_engine_substitution,strict_trans_tables

    Character_set_server = UTF8

    [Client]

    Loose-default-character-set = UTF8

    Note: Basedir is the root directory of MySQL and DataDir is the data storage directory for MySQL. I'm not going to explain anything else.

    After installing MySQL, there is no graphical user interface, you can install a navicat for MySQL and other software, this will look more convenient.

    2, after the installation of MySQL, add MySQL support for PHP

    Open PHP configuration file php.ini (D:\servers\php\php.ini)

    (1)(721 lines), Extension_dir = "ext", remove the front ";",

    and change to Extension_dir = "D:\servers\php\ext"

    (2) then the MySQL extension that opens PHP

    (875, 876 lines) remove the front ";"

    Extension=php_mysql.dll

    Extension=php_mysqli.dll

    You can also open 881 rows of Php_pdo_mysql.dll enable PHP for PDO support

    Note: There are many expansion options in lines No. 863 through No. 888, what you need to use, and remove the previous ";" You can do it. Of course if you want to add additional extension support such as Redis support, PHP itself may not provide the corresponding DLL files, you need to find the appropriate version of the DLL to add to the Ext folder, and then add a extension= in the configuration file ...

    When you are finished, restart Apache

    You can see it when you visit phpinfo.


    Errors that may occur during installation: When you start Apache from the command line, you need to run the command line as an administrator, and in case of an error, you need to see the details, you can start the Apache version by httpd.exe it must match the PHP version or it will go wrong. Start Apache Command net start Apachename (my is Apache24) stop Apache command net stop Apachename
  •    



    From for notes (Wiz)

    Installation: Win7 (64-bit) php5.5-apache2.4-mysql5.6 environment installation

    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.