Install apache2.4+mysql5.7+php5.6 under Windows environment

Source: Internet
Author: User
Tags phpinfo phpmyadmin

Prior to learning PHP is consistent with phpstudy integrated development environment, which is undoubtedly very helpful for beginners, because the installation and use of the fool to reduce our many unnecessary trouble. However, as a qualified PHP developer, mastering the installation and configuration of Php+mysql+apache is a must-have capability. I will now introduce a new version of PHP, Apache,mysql installation and configuration methods.

The following articles refer to the 3 sources, in addition to the problems that I encountered during the construction of the repair of perfect notes:

Building and discuz! installation of the PHP environment

Http://www.myxzy.com/post-386.html

Http://www.discuz.net/thread-3258186-1-1.html

Now most of the one-button installation package is 32-bit, does not support 64-bit, directly on the 64-bit system use will error, so I would like to say here how Windows 64-bit system to establish the APACHE+PHP+MYSQL environment!

I am here to demonstrate the use of Windows 2008 64-bit Simplified Chinese version, Apache,php,mysql Multi-use is the 64-bit version. The local environment is built, so I'm using the default settings.

1, download PHP, Apache and MySQL software and VC Library.

The following are the website addresses of PHP, Apache and MySQL, respectively.

php:http://windows.php.net/qa/

mysql:http://www.mysql.com/downloads/mysql/

apache:http://www.apachelounge.com/download/win64/

This tutorial to use the Php,apache,mysql and VC Library,: Baidu network disk

2, pre-installation precautions.

You notice the download of the Php,apache Web site, which is prompted to install the Visual C + + library.

Apache2.4.4 requires VC10 library support, Microsoft Visual C + + SP1 Redistributable Package (x64)

PHP5.6 requires VC11 library support, Visual C + + redistributable for visual Studio Update 1

Note 1: If Apache2.4.4 does not have the VC10 library installed, the following error will appear.

Error: "Cannot start this program because MSVCR100.dll is missing from the computer. Try reinstalling the program to resolve this issue. ”

NOTE 2: If PHP5.5.0BETA2 does not have the VC11 library installed, the following error will appear.

3, install Apache (d packing directory)

(1) Open D:\discuz\Apache24\conf under the httpd.conf file, open the editor with Notepad to modify and save the following.

The 37th line ServerRoot "C:/apache24" to ServerRoot "D:/discus/apache24";//apache the location of the program.

The No. 204 line of the serveradmin change does not matter;

Line NO. 213 servername The "#" in front of the number to remove;

No. 237 line DocumentRoot "C:/apache24/htdocs" to DocumentRoot "D:/discus/apache24/htdocs";//web site root directory

Line No. 238 <directory "C:/apache24/htdocs" > Changed to <directory "D:/discus/apache24/htdocs" >;

Line No. 271 DirectoryIndex index.html Change to DirectoryIndex index.html index.php index.htm//Support more default pages

Line No. 354 scriptalias/cgi-bin/"c:/apache24/cgi-bin/" instead of scriptalias/cgi-bin/"d:/discus/apache24cgi-bin/"

Line No. 370 <directory "C:/apache24/cgi-bin" > Changed to <directory "d:/discuz/apache24cgi-bin/" >

(2) Launch Apache.

Start---Run, enter cmd, and open a command prompt. Enter the following commands separately (return per line)

D:

CD Apache24\bin

httpd

If the httpd.conf is configured correctly, there is no prompt after entering httpd carriage return. Do not close the command window (Close command window is off Apache), local browser access. The advent of "It works" means that Apache is properly installed.

(3) Adding Apache to System services

Close the httpd command window, or you will get an error.

Start---Run, enter cmd, and then open a command prompt. Enter the following commands separately (return per line)

D:

CD Apache24\bin

Httpd.exe-k install-n "ServiceName" \ \ Join the service. ServiceName is the name of the service and can be customized.

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

4, install PHP (d packing directory)

Here PHP5.5.0 is configured with Php5apache2_4.dll. Also need not php.ini file, with PHP default.

(1) Open apache24\conf under Httpd.conf, at last add

# PHP5 Support

LoadModule php5_module "D:/discuz/php/php5apache2_4.dll"

AddHandler application/x-httpd-php. php

# Configure the path to PHP.ini

Phpinidir "D:/discuz/php"

(2) Restart the Apache server.

Site Folder D:/discuz/apache24/htdocs Create a new index.php, <?php phpinfo (),?> Save, access to the information that appears in PHP indicates that PHP has been successfully installed. Such as.

5. mysql Installation

MySQL installation I simply said the following is the cmd command. (return per line)

D:

CD Mysql\bin

MySQLd--install MySQL

net start MySQL

Under the PHP directory

<php.ini-production Copy the file as Php.ini>

Line No. 730; Extension_dir = "ext", remove the front ";" and change to Extension_dir = "D:\discuz\php\ext"

Find extension Add the following two lines

Extension=php_mysql.dll

Extension=php_mysqli.dll

Extension=php_mbstring.dll (here mainly for phpMyAdmin support Chinese)

Restart httpd to test

;D: \discuz\php\ext

PhpMyAdmin 4.1.2 installation

http://www.phpmyadmin.net/home_page/downloads.php official website Download

Unzip to your site and directory and rename phpMyAdmin (My site root directory: D:\discuz\Apache24\htdocs)

Locate the libraries/config.default.php file in the phpMyAdmin directory

Find password find two lines, fill in MySQL User and password

$cfg [' Servers '] [$i] [' password '] = ' * * * *;

$cfg [' Servers '] [$i] [' user '] = ' root ';

Set $cfg[' pmaabsoluteuri ' = '; Directory path for PhpMyAdmin (for example: http://localhost/phpMyAdmin/)

$cfg [' defaultlang '] = ' en '; Here you can set the code en

$cfg [' defaultconnectioncollation '] = ' utf8_general_ci '; Set Database encoding

Test (both Apache and MySQL have started) Open http://localhost/phpMyAdmin/The following page appears to install successfully

Enter the user name and password that you set before logging in

Discuz Forum Building

Create a new Web site with the Directory folder Web under the D drive,

Copy the phpMyAdmin from the original D:\discuz\Apache24\htdocs to the Web.

Change DocumentRoot in Apache conf/httpd.conf file to DocumentRoot "D:/web"

<directory "D:/discuz/apache24/htdocs" > Changed to <directory "D:/web" >

Restart Apache

Edit the test file under the D:/web file web.php, edit

<?php phpinfo ();?>

In the browser opens the http://localhost/web.php successfully appears in slices

discuz! X3 Installation Graphics Tutorial

Download x3.1

Http://www.comsenz.com/downloads/install/discuzx

second, unzip and upload discuz! X3 the program to the server and modify the appropriate directory permissions
1, Upload discuz! X3 the program to the server
Unzip to get the three files as shown:

Upload all files under this directory are the available program files that we need to upload to the server;
Readme directory for product introduction, authorization, installation, upgrade, conversion and version update log description;
The utility directory comes with tools for the forum, including the upgrade program.

Here are two ways to explain: the first local, the second type of space

(1) Copy all the files inside the upload to the web
(2) If it is uploaded to the space then all the files in the upload directory will be used in binary mode using FTP software

(Common FTP Software Binary Setup method: Click to view detailed instructions) upload to space. As shown in the following:

(1) Input http://localhost/install/will appear the installation directory

(2) After uploading, start installing discuz! in the browser X3, running http://www.domain.com/bbs/install/in the browser

Start a new installation (where Http://www.domain.com/bbs is your site access address)

After reading the license agreement, click "I Agree", the system will automatically check the environment and file directory permissions, as shown in:

Detect success, click "Next", that is, enter the detection server environment and set the Ucenter interface as shown in:

1. Select "New Installation discuz! X (with Ucenter Server) "
If you have not installed our product before and need a new installation, please select this option.
2. Select Install discuz! only X (manually specify the Ucenter Server that is already installed) "
If you have previously installed our products, and now only upgrade, please select this and ensure that the previous ucenter is Ucenter 1.6.0, if the previously installed Ucenter Server is not in the upgrade operation, generally 1.5.1 or 1.5.2, you need to first Upgrade Ucenter to version 1.6.0, or the installer will prompt for errors and cannot continue. This is a new installation discuz! X for example.

New Database

Enter password

Create a database

Mysql> CREATE database discus;

Discus (database name, you can specify it yourself)

Query OK appears, 1 row affected (0.02 sec) (indicates success)

Quit MySQL

Exit

Click "Next" to enter the installation database interface as shown in:

Fill in the discuz!. X Database information and administrator information.
Click "Next", the system will automatically install the database until finished, as shown in:

After successful installation, welcome to open discuz! Cloud platform and discuz! Installation interface of the Application Center:

If you want to open the cloud platform immediately, you can click "Open discuz! Cloud Platform", the founder login site backstage, as shown:

Open can, if temporarily do not want to open discuz! cloud platform can choose "temporarily not open" need to open when the login background to open.
If you want to install discuz! immediately Application, you can click "Install app now", the founder login site backstage, as shown:

Select the app you want to install and install it
Enter discuz! after installation X Home View site:

So far, discuz! The X3 has been successfully installed and finished! You can log in to discuz! X site and start setting up.

Install apache2.4+mysql5.7+php5.6 under Windows environment

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.