Apache php Mysql deployment (1) download and install apachemysql

Source: Internet
Author: User
Tags apache php mysql download php download php mysql

Apache php Mysql deployment (1) download and install apachemysql
Preface

Recently, the company needs to develop a website with Special Requirements: it cannot use java and can only be deployed on Windows platforms. No way. You can only select the Apache + php + Mysql solution.

I don't know if there are any better ones. It's good to hear about golang, but our project has been in use for nearly three months, and only two people have done it, so it's slow (⊙ ﹏ ⊙) B

Well, before development, we should first have a development environment. At the beginning, I chose the xammp synthesis package fuse.

But what I need is my own installation package. I need to understand the configuration clearly.

Server Composition

  1. Apache: Http://www.apachelounge.com/download/VC11/

2. PHP: Http://windows.php.net/download#php-5.6-ts-VC11-x86

3. Mysql: Http://dev.mysql.com/downloads/windows/installer/5.7.html

 

Install Apache

  Step 1:Open the apacheto for pull, find httpd-2.4.20-win32-vc11.zip, and click Download. The latest version is Apache 2.4.20. Because the downloaded Apache is compiled by visual studio 2012 (VC11), the corresponding vs runtime environment is required. If the corresponding running environment has not been installed, you can find it on this pageVcredist_x64/86.exe,Click Download and install. You can also download les-2.4-win32-vc11.zip from the page. For more information about how to add a module, see Add a description for the corresponding module.

 

  Step 2: Create the My Server folder on drive C (you can name it by yourself) and decompress the Apache installation package to this directory. Name Apache24 as Apache (for future version upgrade and replacement convenience)

  Step 3: Apache installation is complete in this way, but it cannot be started. You need to configure it to start it. The configuration will be discussed later.

PHP installation

  Step 1:Open the above php download page, select VC11 x86 Thread Safe (21:49:59) download zip: php-5.6.23-Win32-VC11-x86.zip, because our Apache chose 32-bit VC11, so php also select the corresponding version.

  Step 2: Decompress the installation package to C: \ My Server \ php ,:

Step 1:Open the mysql download page and selectWindows (x86, 32-bit), MSI Installer, Click mysql-installer-community-5.7.13.0.msi, download.

  Step 2:Click exe to install. You only need to modify one configuration. Others are installed by default,

Step 3:After the installation is complete, use services. msc to open the service window. The MySQL57 service is displayed, indicating that the installation is successful and the service is stopped.

  Step 4:Copy a folderC: \ ProgramData \ MySQL Server 5.7ToC: \ My ServerAnd rename itMySQL_Data. (Database data folder)

  Step 5:Copy a folderC: \ Program Files (x86) \ MySQL Server 5.7ToC: \ My Server and rename it to MySQL. (Mysql installation path)

  Step 6:CopyC: \ My Server \ MySQL_DataInMy. iniToC: \ My Server \ MySQLDirectory

  Step 7:Open my. ini and add default-character-set = utf8 in the [client]. In [mysqld], find datadir and change its value:"C:/My Server/MySQL_Data/Data ",That isDatadir = "C:/My Server/MySQL_Data/Data"

Similarly, change secure-file-privSecure-file-priv = "C:/My Server/MySQL_Data/Uploads"

Step 8:In the folderC: \ My Server \ MySQLCreate a text document and rename itMysql install. bat, Use text to open and edit, and insert the following content:

      

"%~dp0\bin\mysqld.exe" --installreg add HKLM\SYSTEM\CurrentControlSet\services\MYSQL /v DisplayName /t REG_SZ /d MYSQL /freg add HKLM\SYSTEM\CurrentControlSet\services\MYSQL /v Description /t REG_SZ /d "mysql database service register" /freg add HKLM\SYSTEM\CurrentControlSet\services\MYSQL /v ErrorControl /t REG_DWORD /d 1 /freg add HKLM\SYSTEM\CurrentControlSet\services\MYSQL /v ImagePath /t REG_SZ /d "\"%~dp0\bin\mysqld.exe\" --defaults-file=\"%~dp0\my.ini\" MYSQL" /freg add HKLM\SYSTEM\CurrentControlSet\services\MYSQL /v ObjectName /t REG_SZ /d LocalSystem /freg add HKLM\SYSTEM\CurrentControlSet\services\MYSQL /v Start /t REG_DWORD /d 2 /freg add HKLM\SYSTEM\CurrentControlSet\services\MYSQL /v Type /t REG_DWORD /d 16 /fnet start mysql

 

  Step 9:Uninstall mysql.

  Step 10:RunMysql install. batRun the script to install mysql. Use services. msc to open the service window. You can see that the MySQL service is successfully installed.

 

Now all the software has been installed successfully, but the network server has not been started. The next section describes how to configure it.

 

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.