ApachephpMysql deployment (1) Download and install apachemysql. ApachephpMysql deployment (1) Download and install apachemysql preface recently, the company needs to develop a website, but it has special requirements: java cannot be used and can only be deployed on Windows platforms. No Apache php Mysql deployment (I) 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.
Http://www.bkjia.com/PHPjc/1139955.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1139955.htmlTechArticleApache php Mysql deployment (a) download and installation, apachemysql preface recently the company needs to develop a website, but there are special requirements: can not use java, can only be deployed on the Windows platform. No...