APACHE,PHP,MYSQL,PMA Manual Configuration Considerations

Source: Internet
Author: User
Tags mysql query phpinfo vc runtime vc9 win32 mysql command line phpmyadmin

Note: This article before the release in their own QQ space, copied over the time, the color information is lost, back to the color re-marked on!

TheLAMP(linux+apache+mysql+php) environment is the most active development and running platform of the open source community at present, and there are a lot of website programs built on this platform, In order to learn that we may need to build this environment, there are some integrated installation packages such as WAMP and XAMPP, all can be installed in one click All the program, why do you need to install it manually?

integrated installation package, the biggest advantage is convenient and fast, and even have a unified control program to manage the individual components, but if there is a problem, still need to manually to troubleshoot and modify the various parts of the problem, and I myself encountered the problem is, sometimes in order to debug from the Internet back from the website package, The development environment for these Web packages is not written with the latest version of AMP ( For example, XAMPP is a good AMP package, the interface and functions are very good, but its database is MariaDB, MariaDB Database management system is a branch of MySQL,the GPL -licensed MariaDB is designed to be fully compatible with MySQL, including API and command line make it easy to be a replacement for MySQL, fully syntactically compatibleMySQL[ since MySQL was acquired by Sun ,Sun was later acquired by Oracle and is already a commercial software ]), if used to learn,MariaDB can replace MySQLcompletely, but these source programs that come back online are not even able to run at all in a new environment, and there are a variety of errors, so there is no way to install the AMP environment completely manually. Nonsense not to say, directly on the dry.

1. "Install PHP separately"
First installed is PHP, there are currently PHP5 and PHP7 two versions, have tried to install a bit, PHP5 installation is relatively smooth, installed in the Win7 built-in iis7.5 (after the article How to install PHP in Apache steps), refer to the article:/http user.qzone.qq.com/475213823/blog/1452652341
Simply note the following steps:

A) IIS must be installed on the computer, the CGI module should be selected when installing;
b) In order to reduce the trouble of configuration, with the help of the PHP Manager tool, can be easily configured;
c) Rename php.ini-development to php.ini D) modify php.ini find Data.timezone Modify to Date.timezone = "Asia/shanghai" (must be changed here, or it will be a warning) e Find Windows extensions to open the required modules, such as: Php_curl.dll php_mysql.dll php_mysqli.dll php_xmlrpc.dll php_curl.dll Just remove the front semicolon It can be saved;
f) Go back to the IIS interface, double click on the PHP manager, click "Register new PHP Version", then select the good C:\php5.3.5\php-cgi.exe, OK. And then the quiet php.ini will give you the right configuration for the IIS7.5 to be built by default.
g) Finally check it out, still on this interface, you can click "Check Phpinfo ()", and then no surprises will pop up the exciting phpinfo page!

PS1. Installation PHP7 Note that if the compiled version of the download, if it is the VC14 version, to install the vcredist2015_x86_14.0.23026.0 runtime, otherwise it will not run, at first do not know, in IIS Tinker long time also did not find, Although know is vc14, but think oneself of Win7 again installed vs2013, should have all kinds of run library have, but actually did not, need to install separately, in command line directly run Php.exe, pop up the VC version of the hint, just know.

PS2. Two points forgot to say, Windows\Temp directory to set the user's read and write permissions, PHP installation directory should also set the user read and write permissions, or IIS will error!

,,,,,,,,,,,,,,,,,,,,,,,,,,,,

above is how to install phpon IIS, install php in Apache and configure PMA even on MySQL There are also some things to be aware of ,

Some of the content here overlaps with the following separate MySQL and Apache sections, But here's a highlight of Apache The following installation steps:

"PHP"
Modify the configuration file as follows:
Extension_dir = "C:\PHP5\ext\" error_log = "C:\Windows\Temp\php-5.6.11_errors.log" Upload_tmp_dir = "C:\Windows\Te Mp\ "

Sometimes you have to write a slash to the left.
Extension=php_gd2.dll upload images, login Verification code Many times need this extension! Extension_dir = "C:/php5/ext" Extension=php_curl.dll
Extension=php_mysql.dll Extension=php_mysqli.dll
Extension=php_openssl.dll
Extension=php_xmlrpc.dll
Date.timezone = "Asia/shanghai"

Some versions of PHP DLL is not complete, no php_mysql.dll, no Php5apache2_2.dll also have to re-PHP, do not separate the next DLL file, sometimes do not know the next DLL is what version, so choose PHP version is also very important, I download the php-5.3.5-win32-vc6-x86.zip, this version of the content of the full, php.ini files to be copied to the Windows directory, or the Apache set PMA access to MySQL Error!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The compiler used by php5.5 is VC11,
php5.4 and php5.3 are VC9,
php5.2 is VC6. Also pay attention to the x86 version, or the x64 version.
Currently only php5.5 offers x64 versions, others are only x86 versions.

1, Apache2.0 corresponding PHP module for the Php5apache2.dll

2, Apache2.2 corresponding PHP module for the Php5apache2_2.dll
3, Apache2.4 corresponding PHP module for the Php5apache2_4.dll

apache.org downloaded Apache is the VC6 version, otherwise you can install different runtime libraries according to different file instructions.

VC11 Runtime x86/x64 version: http://www.microsoft.com/en-us/download/details.aspx?id=30679
VC10 Runtime x86 version: http://www.microsoft.com/en-us/download/details.aspx?id=5555
VC10 Runtime x64 version: http://www.microsoft.com/en-us/download/details.aspx?id=14632
VC9 Runtime x86 version: http://www.microsoft.com/en-us/download/details.aspx?id=5582
VC9 Runtime x64 version: http://www.microsoft.com/en-us/download/details.aspx?id=15336

If you do not know your situation, you can install all the runtime, no longer have to worry about this problem.

1, php5.2 support Apache2.0 and Apache2.2;

2, php5.3, php5.4 at the same time support Apache2.2 and Apache2.4;
3, php5.5 only support Apache2.4
Unless you manually compile the Php5_module module yourself, there are only 3 options available.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


"MySQL"
This step with the normal installation of MySQL is no different, can be installed with EXE, can also be installed with a ZIP package, see the following installation method;
But there is a trap: In some versions of the APACHE+PMA environment, to copy the LibmySQL.dll into the Windows/system32 directory, or there are strange errors!
LibmySQL.dll in different versions of MySQL location is not the same:

MySQL 5.6.24 D:\mysql-5.6.24-win32\lib\libmysql.dll
MySQL 5.0.96 mysql installation path \bin\libmysql.dll

Installed MySQL can temporarily not set the login password, after installing the APACHE+PMA, on the PMA to change the password!

"Apache"
To install PHP support on Apache, modify the conf/httpd.conf as follows
LoadModule php5_module "C:/php5/php7apache2_4.dll" Phpinidir "C:/PHP5" AddType application/x-httpd-php. php
Installing MySQL support on Apache does not need to be done, primarily by setting up a PMA "virtual host" or "virtual directory" path so that the browser can access the directory:
Modify Conf/httpd.conf as follows

< VirtualHost 127.0.0.2:80> DocumentRoot d:/phpmyadmi ServerName 127.0.0.2:80 </Vi rtualhost> alias/phpmyadmin "D:/PMA"

ALIAS/PMA "D:/phpmyadmin"
<directory "D:/phpmyadmin" > Order allow,deny allow from all DirectoryIndex index . PHP </Directory>
After restarting Apache, your virtual host is configured, the browser input 127.0.0.2/PMA, to access the PMA, if you do not use virtual host, remove the VirtualHost section, alias is to set a directory alias, so you can through the 127.0.0.2/ PMA to access, do not need to lose all 127.0.0.2/phpmyadmin.
"PHPMyAdmin"
Version of the selection, 3.5.6 and 4.6.3 (to the latest version of this article), some Web site source program with the PMA, so some times will encounter the old version of the PMA, the new version may have some errors, the old version may not be a bad choice;
Change the config.sample.inc.php under the PMA directory to config.inc.php
$cfg [' Servers '] [$i] [' allownopassword '] = True;

Just installed MySQL first do not set the password, here Open allow blank password login, and then enter the PMA, modify [email protected],[email protected],[email protected]::1 Password, seemingly these are to be modified, 127.0.0.1 is for website login, localhost is command line operation Sql,::1 is set for IPV6.

--------------------------------------------------------------------------------------------------

2. "Install MySQL separately"
First downloaded EXE installation package, Mysql-installer-community-5.7.13.0.msi, found that installation can not choose the installation path, the default can only be installed in the C drive, my C disk space is not too much, looked at the installation of the next online tutorial, plan to fully manual installation!

Download the zip package from the Internet, Mysql-5.6.24-win32.1432006610.zip, unzip, find the software root directory My-default.ini, modify the following lines:

Basedir = D:\mysql-5.6.24-win32 DataDir = D:\mysql-5.6.24-win32\data Port = 3306 server_id = my SQL Character-set-server=utf8 Default-storage-engine=innodb max_connections=200

Then execute it in the command line of the software's Bin folder: Mysqld Install installation Service
net start MySQL startup service
>mysql-uroot-p to enter the MySQL command line interface;
> How to set Password: mysqladmin-u root-p password Password

After installing MySQL can install a MySQL Query Browser GUI tool, compared to SQL Server Enterprise Manager, this tool is too simple, so the majority of the choice is to install a phpmyadmin.

PS. The full path to MySQL is added to the Windows environment variable path, so you can easily enter the MySQL command directly
Ways to uninstall the MySQL service: &GT;SC delete MySQL
--------------------------------------------------------------------------------------------------

3. "Installing phpMyAdmin in an IIS environment"
PMA is a web-browser-based MySQL Web interface program written in PHP, which facilitates the configuration and management of MySQL's functions, following the steps to install the PMA on the IIS virtual directory (later Apache section has steps on how to install the PMA on Apache):
Also do not use EXE installation files, the net back only zip compressed package, decompression and placed in any disk root directory, such as D:\phpMyAdmin
At present the latest version is 4.6.2, my luck is poor, under a 4.6.1 version, this version of Chinese support is not good, although the interface can be opened, but there are many places have errors, the latest 4.6.2 has been fixed error;

To install the PMA steps in the IIS environment:
A) d:\phpmyadmin, set user's read and write permission;
b) Create a new Web site under IIS phpMyAdmin, using 8080 ports, 80 ports already occupied by IIS, physical paths pointing to D:\phpmyadmin
c) If PHP is already installed on IIS, then open the 127.0.0.1:8080 directly, you can open the Web program;

--------------------------------------------------------------------------------------------------

4. "Install Apache separately"
Apache is an open source Web server, is a widely run on the various platforms of the Web server, we are here to install the Windows version of Apache, the official website Zip installation package, the official website now no longer provide EXE installation program, Find Apachehaus is the Apache HTTP server, Httpd-2.4.20-x86-vc14-r2.zip (currently the latest version is 2.4), if there is a vc11,vc14 typeface, the same version of the VC runtime should be installed first.
Installation steps:
A) unzip the apache2.4 to D:\Apache24, if the root directory is not required to modify the path, otherwise you need to modify the path
b) D:\Apache24\conf\httpd.conf, is the configuration file, after opening, modify the following three lines of configuration information, because 80 port has been occupied by IIS, so I changed to 6666;
---------------the "Original configuration Information"-----------------
Define srvroot "Apache24"
Listen 127.0.0.1:80
ServerName localhost:80

---------------"Modify to your own configuration"------------------
Define srvroot "/myhttp/apache24"
Listen 127.0.0.1:6666 ServerName localhost:6666



c) in the Bin folder command line, >httpd-k installed, you can install Apache server, to uninstall, the command changed to uninstall can be;
D) If all goes well, then open http://127.0.0.1:6666/in the browser to see the main page of Apache installation success;

PS. Of course, everything is not so smooth, I encountered a problem, entered the Httpd-k install, reported 443 port error, should this port is occupied;
Workaround: Through >netstat-ano, you can see the PID number of the process that occupies port 443, and then through the "Task Manager" [Service], find the relevant server name, through > Services.msc find the relevant process, shut down or deactivate or change to manual operation, on my Computer 443 is the VMware Workstation service, manually let it boot.
PS. Modify the Apache 443 port:
1. Change the conf/extra/httpd-ssl.conf file in 443 to 442, if it is xampp, change this one is enough;
2. Change the conf/extra/httpd-ahssl.conf file in 443 to 442, if it is a separate download Apache, but also to change here!
3. Httpd-k Uninstall
4. Httpd-k Install
5. Apache Monitor, Start, OK

or modify the VMware ports


Add PHP module to Apache: D:\MyHTTP\Apache24\conf\httpd.conf

################# PHP support ##################### #LoadModule php7_module "C:/php7/php7apache2_4.dll" Phpinidir "c:/ PHP7 "AddType application/x-httpd-php. php################# PHP Support ######################

Virtual directory for Apache plus phpMyAdmin: D:\MyHTTP\Apache24\conf\httpd.conf
################# PMA Support ######################
Alias/phpmyadmin "C:/phpmyadmin" <directory "C:/phpmyadmin" >order Allow,denyallow from AllDirectoryIndex index.php</directory>################# PMA Support ######################
Append: To be aware of the Apache version and PHP version issues, I started to install the Apache2.4 is the x64 version, PHP is Win32 version, so after configuring HTTPD.CONF, launch Apache will report function errors, replaced by Win32 version of the Apache problem resolution, or find the relevant module of PHP Win64!

APACHE,PHP,MYSQL,PMA Manual Configuration Considerations

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.