Install Apache2.4 + MySql5.7 + PHP5.6-Old Testament yzy in windows

Source: Internet
Author: User
Installing Apache2.4 + MySql5.7 + PHP5.6 in windows-learning PHP consistency before yzy in the Old Testament is to only use phpStudy to integrate the development environment, which is undoubtedly of great help to new users, the installation and use of the installation method reduces a lot of unnecessary troubles. However, as a qualified PHP developer, it is essential to master the installation and configuration of PHP + MySQL + Apache. Next I will introduce the installation and configuration methods of the latest versions of PHP, Apache, and MySQL.

The following articles refer to the three sources and complete notes for fixing the problems encountered during my setup:

PHP environment setup and Discuz! Install

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

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

Currently, most of the one-click installation packages are 32-bit and do not support 64-bit packages. if you use them directly on a 64-bit system, an error is returned, so here I will talk about how to build an Apache + PHP + MySQL environment in a windows 64-bit system!

The windows 2008 64-bit simplified Chinese version, apache, php, and mysql I used here are 64-bit versions. The local environment is created, so I use the default settings.

1. download the PHP, Apache, Mysql software, and VC Library.

The following are the official addresses of PHP, Apache, and Mysql.

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

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

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

Php, apache, mysql, and vc libraries used in this tutorial: Baidu online storage

2. precautions before installation.

Pay attention to the download of PHP and Apache websites, which have prompts you to install the Visual C ++ library.

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

PHP5.6 requires support from the VC11 Library, Visual C ++ Redistributable for Visual Studio 2012 Update 1

Note 1: If the VC10 library is not installed in Apache2.4.4, the following error is prompted.

Error message: "unable to start this program because MSVCR100.dll is lost in the computer. Try to reinstall the program to solve this problem ."

Note 2: If the VC11 library is not installed in PHP5.5.0beta2, the following error occurs.

3. install Apache (under the root directory of the D drive)

(1) open the httpd. conf file under D: \ discuz \ Apache24 \ conf and use notepad to open and edit the file as follows and save it.

Change ServerRoot "c:/Apache24" to ServerRoot "D:/discus/Apache24"; // The location of the Apache program.

It doesn't matter if the ServerAdmin of row 3 is changed;

Remove the "#" before the ServerName in line 3;

Line 3: DocumentRoot "c:/Apache24/htdocs" changed to DocumentRoot "D:/discus/Apache24/htdocs"; // the root directory of the website

238th rows Change ;

Change DirectoryIndex index.html to DirectoryIndex index.html index. php index.htm in row 3. // support more response pages

Line 2 ScriptAlias/cgi-bin/"c:/Apache24/cgi-bin/" changed to ScriptAlias/cgi-bin/"D:/discus/Apache24cgi-bin /"

370th rows Change

(2) start Apache.

Start --- run, enter cmd, and open the command prompt. Enter the following commands respectively (press enter on each line)

D:

Cd Apache24 \ bin

Httpd

If httpd. conf is correctly configured, enter httpd and press enter. Do not close the command window (close the command window is close Apache), visit the local browser. If "It works" appears, It means that apache has been correctly installed.

(3) Add Apache to the system service

Close the httpd command window. Otherwise, an error will be reported.

Start --- run, enter cmd, and then open a command prompt. Enter the following commands respectively (press enter on each line)

D:

Cd Apache24 \ bin

Httpd.exe-k install-n "servicename" \ to join the service. Servicename is the name in the service and can be customized.

If you want to uninstall the service, stop the service first, and then enter httpd.exe-k uninstall-n "servicename" to uninstall the service.

4. install PHP (under the root directory of the D drive)

PHP5.5.0 is configured with php5apache2_4.dll. You don't need the PHP. ini file. you can use the default PHP file.

(1) open httpd. conf under Apache24 \ conf and 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.

Website folder D:/discuz/Apache24/htdocs create an index. php with the content Save. accessing the php information indicates that php has been successfully installed. For example.

5. install MySQL

To install MySQL, simply run the cmd command. (Press enter on each line)

D:

Cd mysql \ bin

MySQLd -- install MySQL

Net start MySQL

Under the php Directory

Line 2; extension_dir = "ext", remove the previous ";" and change it to extension_dir = "d: \ discuz \ php \ ext"

Find extension and add the following two lines

Extension = php_mysql.dll

Extension = php_mysqli.dll

Extension = php_mbstring.dll (here it is mainly used for phpMyAdmin to support Chinese)

Restart httpd to test

; D: \ discuz \ php \ ext

PhpMyAdmin4.1.2Install

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

Decompress it to your website and directory and rename phpMyAdmin (my website root directory is: D: \ discuz \ Apache24 \ htdocs)

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

Find the password and enter the mysql User and password.

$ Cfg ['servers'] [$ I] ['password'] = '*****';

$ Cfg ['servers'] [$ I] ['user'] = 'root ';

Set $ cfg ['pmaabsoluteuri '] = ''to The phpMyAdmin directory path (for example, http: // localhost/phpMyAdmin /)

$ Cfg ['defaultlang '] = 'en'; you can set the encoding zh here.

$ Cfg ['ultconnectioncollation'] = 'utf8 _ general_ci '; sets the database encoding.

Test (apache and mysql have been started) open http: // localhost/phpMyAdmin/and the following page appears, the installation is successful

Enter the user name and password you set before, and log on to the system.

Discuz Forum construction

Create a new website and directory folder web under drive D,

Copy phpMyAdmin under D: \ discuz \ Apache24 \ htdocs to the web.

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

Change

Restart apache

Edit the test file web. php in the D:/web file.

You can open http: // localhost/web. php in the browser and the video is displayed successfully.

Discuz! X3 installation graphic tutorial

Download x3.1

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

2. decompress and upload Discuz! X3 program to the server and modify the corresponding directory permissions
1. Upload Discuz! X3 program to the server
Extract the following three files:

All the files under the upload directory are available program files that need to be uploaded to the server;
The readme Directory describes the product introduction, authorization, installation, upgrade, conversion, and version update logs;
The utility directory is a tool attached to the forum, including the upgrade program.

Two separate methods are described here: local and space

(1) copy all files in upload to the web.
(2) If the file is uploaded to a space, use the FTP software in binary mode to upload all files in the upload directory.

(Common methods for setting FTP software binary: Click to view details) upload to space. As shown in:

(1) enter http: // localhost/install/to display the installation directory.

(2) after the upload is complete, start to install Discuz in the browser! X3, run http://www.domain.com/bbs/install/ in a browser

Start a fresh installation (where the http://www.domain.com/bbs is your site access address)

After reading the authorization agreement, click "I agree". The system will automatically check the Environment and file directory permissions, as shown in:

After the detection is successful, click "next" to go to the detection server environment and the UCenter settings page, as shown in:

1. select "install Discuz! X (including UCenter Server )"
If you have not installed our products before and need to install them all, select this option.
2. select "install Discuz only! X (manually specify the UCenter Server that has been installed )"
If you have installed our product before and only want to upgrade it, select this option and ensure that the previous UCenter version is UCenter 1.6.0. if the previously installed UCenter Server is not upgraded, generally, the version is 1.5.1 or 1.5.2. you must first upgrade Ucenter to version 1.6.0. Otherwise, the installer will prompt an error and cannot continue. Here we will install Discuz! X is used as an example.

Create database

Enter password

Create a database

Mysql> create database discus;

Discus (database name, which can be specified by yourself)

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

Exit mysql

Exit;

Click "next" to go to the database installation page, as shown in:

Enter Discuz! X database information and administrator information.
Click "next", and the system will automatically install the database until it is complete, as shown in:

After the installation is successful, you are welcome to activate Discuz! Cloud Platform and Discuz! Application Center installation interface:

If you want to enable the cloud platform immediately, click "activate Discuz! As shown in:

Activate Discuz! On the cloud platform, you can select "do not activate now". you only need to log on to the background to activate it when you need to activate it.
If you want to install Discuz now! Click "Install application now", and the founder logs on to the site background, as shown in:

Select the application to install.
After installation, enter Discuz! X homepage:

So far, Discuz! X3 has been successfully installed! You can log on to Discuz! Site X is configured.

Related Article

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.