Windows2003 Install Apache-mysql-php-phpmyadmin_win Server

Source: Internet
Author: User
Tags install php php script administrator password phpmyadmin
Download the latest official version of the official website (the version number in parentheses is the one I used to build the platform):
Apache (2.2.4): http://httpd.apache.org/download.cgi
PHP (5.2.3,zip package): http://www.php.net/downloads.php
MySQL (5.0.45): http://dev.mysql.com/downloads/mysql/5.0.html
phpMyAdmin (2.10.3): http://www.phpmyadmin.net/home_page/downloads.php
In order to reinstall the system later, it is recommended not to install in the system disk, which is installed in D disk. It can be a root directory, or it can be a different directory, but the best directory name should not have spaces, so that some errors can be avoided.
Install Apache 2.2.4
After the start, agree to the agreement, all the way next. To fill in the server information This step, in Network Domain, Server name to fill in the localhost, of course, you fill in the other does not have any effect; the option below selects the default first, Next. Installation type, select Custom,next. Install the function default; Install the address, I choose here is D:\apache2.2,next. After confirming the error, press install to start the installation.
Hint: Install Apache installation complete under xp/2000, Win2003sp2,vista still need step.
In Vista, when installed to the last, there will be two errors, mainly unable to register the service. In fact, does not affect (next solves this problem), ignores the error, completes installs. Locate the command prompt in the Start menu > All Programs > Attachments, or search for cmd at the beginning, and right-click to run as Administrator. Under the bin subdirectory of the Apache installation directory, execute the httpd-k install command to install Apache as a Windows service. Next, Httpd-k start, start Apache.
Install PHP 5.2.3
PHP does not need to install the program to extract the compressed package directly to the selected folder, for example, I D:\PHP5.2.3 here.
Configure Apache and PHP
Open the Apache configuration file httpd.conf (in the Apache folder under Conf subfolder) to find DocumentRoot "X:/xxx/htdocs" and <directory "X:/xxx/htdocs" > ( Quotation marks are different for individual installation addresses, and the quotation marks are changed to the folder where the Web site resides. For example, I change here to DocumentRoot "D:/apache2.2/httpdocs" and <directory "D:/apache2.2/httpdocs", just native debugging, So my basically is the default configuration of Apache.
Tip: In Windows, the address is written in D:\Apache2.2\httpdocs, httpd.conf in the D:/apache2.2/httpdocs, and the backslash "\" will be changed to slash "/"
Find LoadModule, add below
LoadModule php5_module "D:/php5.2.3/php5apache2_2.dll"
Phpinidir "d:/php5.2.3"

Two lines of code, change the address within quotation marks according to the location of your PHP installation.

Find DirectoryIndex index.html, modify to DirectoryIndex index.php index.html
Find AddType application/x-gzip gz. tgz, add the following separately
AddType application/x-httpd-php. php
AddType application/x-httpd-php. html

Save httpd.conf
Then, in the installation folder in PHP, rename the php.ini-recommended Backup to php.ini and open the php.ini
Find, Extension=php_bz2.dll, the following a long string of similar lists, are available to choose to load modules, you can load them according to their needs, by removing the front of the number. For example I have loaded here:
Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_mhash.dll
Extension=php_mime_magic.dll
Extension=php_ming.dll
Extension=php_mysql.dll
Extension=php_xmlrpc.dll

Find Memory_limit =, modify the following values to limit the maximum amount of memory the PHP script can occupy.
Save PHP.ini
Next, add the PHP installation folder location to the Windows system path. Specifically, the computer > Properties > Advanced System Properties > Environment variable > System variable >Path> Edit, add D:\php5.2.3;d:\php5.2.3\ext to the variable value, and the specific path changes according to your situation.
Tip: Vista Please cancel the boot automatically run Apache Web Server status Monitor (X:xxxapachebinapachemonitor.exe), this program is installed in Vista is not correct, and fully functional by the system from the " Service "implementation.
Reboot the computer.
Tip: After you change the system environment variable, you need to restart your computer to take effect!
Tip: xp/2000, open the System environment variable steps for, My Computer > Properties > Advanced tab > Environment variables
Test Apache and PHP for proper installation


Create a new text file in the folder where you store the site (for example, I'm D:\Apache2.2\httpdocs) and enter the code:
<?php
Phpinfo ();
?>

Save As test.php.

Then open the Web site in the browserhttp://localhost/test.php, how to display the following figure, the Apache and PHP installation was successful.
installing MySQL
Open the MySQL installer, select Custom in the installation type, then select the installation address for D:\MySQL, confirm after installation.
When the installation is complete, you will be asked whether to mysql.com sign-up, that is, to the official website registration account. If you want to register, like I skip directly, will have no effect.
Then ask if configure the MySQL Server now, check and continue, and start configuring MySQL.
Select Detailed Configuration, which is manual detail configuration.
Then choose Developer Machine, because we are doing desktop server, development debugging use, so choose this.
Then choose Multifunctional Database, the default is OK.
Set InnoDB tablespace, by default. If you adjust the settings, the next reload must be set to the same, otherwise the database will be damaged, of course, back up the database, there is no problem.
Set the number of concurrent connections to MySQL server, because it is a desktop server, the default is the first item on the line; Of course, you can choose the last one and enter the value you want.
Set ports and modes, by default.
Sets the default database language encoding and selects the second item UTF8.
Set up the service and whether to add the MySQL installation directory to the system path, all two are selected.
Set the administrator password, set the password on it. If you re installing the system again, do not check anything here.
After confirmation, the program is automatically configured, and MySQL is turned on.
Install phpMyAdmin
Unzip the phpMyAdmin to the folder you want, such as I D:\Apache2.2\httpdocs\phpmyadmin here, and then The config.default.php in the Libraries subfolder is copied to the phpMyAdmin folder and renamed to Config.inc.php.
Open config.inc.php and find
$cfg [' Servers '] [$i] [' auth_type '] = ' cookie ';
Amend it to
$cfg [' Servers '] [$i] [' auth_type '] = ' http ';

Open the Apache configuration file httpd.conf, find # Alias/webpath/full/filesystem/path, add the code below (specific path modified according to your circumstances):
Alias/phpmyadmin "D:/apache2.2/httpdocs/phpmyadmin"

<directory "D:/apache2.2/httpdocs/phpmyadmin" >
AllowOverride None
Options None
Order Allow,deny
Allow from all
</Directory>

Save httpd.conf. Perform httpd-k restart at the command prompt, or restart Apache in the service.
Test whether MySQL and phpMyAdmin are properly installed
In the browser, openHttp://localhost/phpmyadmin。 Enter the MySQL administrator account (root) and password in the dialog box that appears.
If you successfully log on and open the phpMyAdmin interface, MySQL and phpMyAdmin are installed.

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.