windows+apache+mysql+php Installation

Source: Internet
Author: User
Tags mysql host phpinfo custom name phpmyadmin

WAMP
Windows Apache+mysql/mariadb+perl/php/python, a group of open-source software used to build dynamic Web sites or servers, are themselves separate programs, but because they are often used together, they have a higher degree of compatibility, Together make up a powerful Web application platform.

        本次搭建使用的软件分别为:Apache24 + mysql 5.6 + php-5.6 + phpMyadmin        Apache 下载链接地址:https://www.apachehaus.com/cgi-bin/download.plx        mysql    下载链接地址:https://downloads.mysql.com/archives/community/        php        下载链接地址:https://windows.php.net/download        phpMyadmin  下载链接地址:https://www.phpmyadmin.net/downloads/

Note: The previous installation steps, the subsequent append during the installation process problems and solutions.

Installation

Apache Installation:

    Apache HTTP Server是Apache软件基金会的一个开放源码的网页服务器,可以在大多数计算机操作系统中运行,由于其多平台和安全性被广泛使用,是最流行的Web服务器端软件之一。它快速、可靠并且可通过简单的API扩展,将Perl/Python等解释器编译到服务器中。    一、下载

: HTTP://WWW.APACHEHAUS.COM/CGI-BIN/DOWNLOAD.PLX

Second, the configuration

2.1 Download down the zip suffix of the package, extracted, and then the custom name in the corresponding location, I was in the server's D packing directory, named: Apache, that is D:\Apache\, the directory contains bin, conf, Htdocs, LIB and other directories and files;

2.2 Configure the environment variable, add at the end of the system variable path:;D: \apache\bin (note is append, not overwrite)

2.3 Configuring httpd.conf

Edit the contents of the conf/httpd.conf file under the root program directory:

Define srvroot "D:\Apache24"

Revision changed to

Define ServerRoot "D:\Apache"

<directory/>
Options FollowSymLinks
AllowOverride None
Order Deny,allow
Allow from all
</Directory>

Note: I simply change two of them, in the production environment, it is necessary to adjust the configuration file according to the actual situation;

Third, installation

Run as Administrator start-run-input cmd, after entering the DOS window, first switch to the Apache program directory:

C:\users\administrator>d:

D:\>CD Apache\bin

D:\apache\bin>httpd-k Install

D:\apache\bin>httpd-k start

Other Command Line options:

Stop Apache httpd-k Stop
Restart Apache httpd-k Restart
Uninstall Apache Service httpd-k Uninstall
Test Config Syntax httpd-t
Version Details Httpd-v
Command Line Options List httpd-h

Iv. Verification

Open the browser, enter in the Address bar: http://localhost/, if you can open the site information normally, that is, the deployment has been successfully deployed.
Reference Link: http://blog.51cto.com/westkk/1884740

PHP Installation:

First, download

        :https://windows.php.net/download

Second, installation

   2.1 PHP extracted after the copy to the installation location, I chose here is d:/php-5.6 (php-5.6.36-nts-win32-vc11-x64 duplicate name).        Then copy the php.ini-development and rename it to PHP.ini, and if it is a deployment, copy the Php.ini-production.                    2.2 Edit Apache Httpd.conf find LoadModule, add the following configuration after it, if your PHP in the C drive, please change D: to C:, also note the path use/. LoadModule php5_module d:/php-5.6/php5apache2_4.dll #没有php5apache2_4. dll is a PHP version that is not downloaded, https://windows.php.net/ Download Download Phpinidir d:/php-5.6 find AddType in this link, add the following configuration: AddType a                    pplication/x-httpd-php. PHP finds DirectoryIndex, joins index.php, and if you want index.php to take precedence over index.html, put it in front. <ifmodule dir_module> directoryindex index.html index.php &L            T;/ifmodule> Save the configuration, run the Httpd.exe-t check configuration on the command line, and if there is no problem, run Httpd.exe-k restart restart the Apache service. 2.3 Create a new phpinfo.php file in the Apache\htdocs directory, enter the following PHP code: <?php phpinfo ()                 ;       ?> then accesses the http://127.0.0.1/phpinfo.php in the browser, and the following interface shows that the installation was successful. 

Reference Link: https://www.cnblogs.com/freefalcon/p/3888459.html

MYSQL Installation
First, download
MySQL Server official: https://downloads.mysql.com/archives/community/

Second, installation

2.1  修改配置文件,复制安装目录下的my-default.ini改名为my.ini。打开my.ini文件配置basedir 与            datadir,以我的目录为例:basedir = C:\mysql-5.6            datadir = C:\mysql-5.62.2 以管理员身份运行cmd命令,进入安装目录的bin层:cd C:\mysql-5.6

Enter after run: Mysqld-install, Command succeeds before running: net start MySQL start service.

2.3 Log in: CMD into the installation directory bin layer, run Mysql-u root-p Enter the password prompt for a return login success (after the initial installation, the root user password is empty).

Third, change the root password
Run the cmd command as Administrator and go to the bin layer CD of the installation directory C:\mysql-5.6
After entry run: mysqladmin-uroot-p password Redhat
Set a new password successfully!

PhpMyadmin Installation

First, download
Download link Address: https://www.phpmyadmin.net/downloads/

Second, installation
2.1 Put the extracted phpMyAdmin into the accessible web directory (if it is virtual space, you can unzip and upload to the Web directory via FTP, etc.), of course, you can modify the name of the file after decompression.

        2.2 Configure the config file to open the config.default.php file under libraries, locate the following items, and then follow the instructions to configure it: A. Access URL Reference:        $cfg [' pmaabsoluteuri '] = '; Fill in phpMyAdmin's access URL for example: $cfg [' pmaabsoluteuri '] = '//localhost/phpmyadmin '; B.mysql host Information reference: $cfg [' Servers '] [$i] [' host '] = ' localhost '; MySQL hostname or IPaddress fill in the IP address of localhost or MySQL server, and if MySQL and the phpMyAdmin are on the same server, press default localhost $cfg [' Ser Vers ' [$i] [' port '] = '; MySQL port-leave blank fordefault port MySQL ports, if default 3306, leave blank to c.mysql username and password reference: $cfg [' S Ervers ' [$i] [' user '] = ' root '; MySQL user access phpMyAdmin uses the MySQL username fg[' Servers ' [$i] [' password '] = ';        MySQL password (onlyneeded corresponds to the password for the above MySQL user name D. Authentication method Reference: $cfg [' Servers '] [$i] [' auth_type '] = ' http ';        There are four modes to choose from, Cookie,http,http,config config means that input phpmyadmin access URL can be entered directly, no need to enter the user name and password, is not safe, is not recommended to use. When the key is set to Cookie,http or HTTP, the login phpMyAdmin requires a data user name and password to authenticate, as follows: PHP installation mode is aPache, you can use HTTP and cookies, PHP installation mode is CGI, you can use the settings of the cookie E. Phrase password (blowfish_secret) reference: $cfg [' Blowfish_se        Cret '] = '; If the authentication method is set to a cookie, you need to set the phrase password, set the password for why, it is up to you to decide, but you can not leave it blank, otherwise you will be prompted for error when logging in to phpMyAdmin, so far, you have successfully installed phpMyAdmin

Reference Link: 79244200

At this point, the Apache + mysql + php + phpmyadmin All installation completed, the browser access Http://localhost/phpmyadmin appears below the following interface to complete the successful completion.

Problems and Solutions:

1. Issue: Install Apache under Windows 2008 Execute d:\apache\bin>httpd-k Install "cannot start this program because the computer is missing VCRUNTIME140.dll".
Workaround: Download vc++2015 and install; Link: https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=48145

2. Problem: After installing PHP under Windows 2008, configuring LoadModule php5_module D:/php-5.5.15/php5apache2_4.dll, the cmd interface httpd.exe-t check for syntax errors and "SYN Tax error cannot load Php5apache2_4.dll ";
Workaround: Error Reason: The VC11 runtime is missing from the computer because all 5.6 environments are now generated under the VC11-based compilation script and need to install the relevant components Msvcr110.dll

     这里分享两个64位版本的运行库,一个是VC2012,用于PHP5.6;一个是VC2015,用于PHP7。建议无论安装那个PHP版本,两个都装上!     VC2015  ->  http://pan.baidu.com/s/1gfIaLgR   VC2012 ->  http://pan.baidu.com/s/1pKXJrVd     安装完成之后,重启apache即可!

3. Problem: Install phpMyAdmin, the "missing mysqli" extension appears through browser access. Please check the PHP configuration information. Refer to this link file: http://www.jb51.net/article/36459.htm

windows+apache+mysql+php Installation

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.