New Version apache_2.0.54 php-5.0.4 mysql-4.1.12a Assembly Installation Wizard (original)

Source: Internet
Author: User

Latest ConfigurationAPMSome problems occur during installation, mainly because some configuration changes after the version is updated. Refer to some installation instructions on the network, but the content is scattered. So here we will repeat the configuration methods of the latest versions.

First, download the installation package. I will not repeat it here. I have downloaded the latest stable version.

ApacheInstall

1.The installation directory should not contain spaces; otherwise, it will be configured later.PHPProblems may occur. I installed it onC: \ apachegroup \ apache2.

2.The Host Name and network name can be used.LocalhostIf you want to change it after installation, you can modify it.C: \ apachegroup \ apache2 \ conf \ httpd. confFileServernameContent.

PHPInstall

1.DownloadPhp- 5.0.4 -Win32.zipInsteadPhp-5.0.4-installer.exeThe former contains some extension modules, while the latter only contains the most basic things.

2.DownloadPECL- 5.0.4 -Win32.zipThis package contains many other extensions that you may need.

3.I putPhp- 5.0.4 -Win32.zipDecompressed inC: \ apachegroup \ PHPDirectoryPecl-5.0.4-Win32.zipDecompressedC: \ apachegroup \ PHP \ extDirectory.

MySQLInstall

1.I installed it onC: \ apachegroup \ mysqlDirectory.

 

Configuration methodHere we will focus on how to configure the three software.

1.ApacheConfiguration
EditC: \ apachegroup \ apache2 \ conf \ httpd. confFile, which contains some settings that you may not need to change.

A)Note thatApacheThe directory delimiter in is/InsteadWindowsOf\After all, this is fromUNIXSomeUNIX.

B)Serverroot "C:/apachegroup/apache2"This is your installationApache.

C)Listen 80This isApacheThe default listening port of the service.IISAndApache, Then both services listen80A port conflict occurs. Need to modifyIISOrApacheIf you want to modifyApacheTo modify the service port.

D)Servername localhost: 80This is your host name. If you modify the listening port above, you need to change it here.

E)DocumentRoot "C:/apachegroup/apache2/htdocs"This is the root directory of your website. What I set isDDiskWWWDirectory. Therefore, I changedDocumentRoot "D:/www"

F)<Directory "C:/apachegroup/apache2/htdocs">Change the directory to the frontDocumentRootDirectory, I changed<Directory "D:/www">

G)At the end of the file, we addPHPSettings
# PHP setup
Phpinidir C:/apachegroup/PHP/
LoadFile C:/apachegroup/PHP/php5ts. dll
Loadmodule php5_module C:/apachegroup/PHP/php5apache2. dll
ScriptAlias/PHP/"C:/apachegroup/PHP /"
Addtype application/X-httpd-PHP. php
Action application/X-httpd-PHP "/PHP/php-cgi.exe"

Note:ActionYesPhp-cgi.exeFile insteadPhp.exe.
During the installation process, I used to setPhp.exeAs a result, the cannot load MySQL extension and please check PHP configuration errors occur when MySQL is called.Php_mysqlThe module cannot be properly transferred in.

2.PHPConfiguration

A)SetC: \ apachegroup \ PHPDirectoryPHP. ini-recommendedCopy one copy and rename itPHP. ini. Because weApacheThePhpinidirPoint to this directory, so you do not needPhP4Copy the file to the system directory. Edit FilePHP. ini.

B)Doc_root =This isPHPThe root directory of the website. I set itApacheThe same directory. This is what it looks like after settingDoc_root = D: \ www \

C)Extension_dir =This isPHPExtension modulePHP _ *. dllDirectory, allPHP _StartingDLLAll files should be in this directory. If you have installedPHPThe installation package, which should be setExtension_dir = C:/apachegroup/PHP/EXT/

D); CGI. force_redirect = 1Note that the semicolon above indicates that this line is commented out. The default value of this option is applicablePhP4Or earlier versions,PhP5Should be set0. Remember to remove the semicolon. After modificationCGI. force_redirect = 0

E)FindWindows extensionsIn this section, there are many rows starting with a semicolon, such
; Extension = php_bz2.dll
Here, we need to specify the extensions to be loaded. To load an extension, we only need to delete the semicolon.
I loadedPhp_dbase.dll php_gd2.dll php_mbstring.dll php_mysql.dllFour extensions. Note that loading the last extension isPHPCallMySQLRequired.

F)Locate[MySQL]In this section, SetMySQLThe default value of the connection. Generally, no modification is required. But suppose you installMySQLWhen you modify the port number, you need to modifyMySQL. default_port. Others are connected.MySQLWhen no value is specified for the connection stringPHPThe default value.

3. , we recommend that you install MySQL Control Center and phpMyAdmin as the management mysql and php tools. It is still very useful.

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.