PHP and MySQL are a powerful combination when it comes to providing dynamic content to your user base. Over the years, these two products have grown well beyond their initial niche and now power some of the world's busiest sites. While both products are open source and initially ran on UNIX/Linux, for quite some time, both have been available for the Windows platform. In this article, I will provide you with step-by-step instructions for installing and configuring these products in a Windows environment. For some of you, the information presented here will be simplistic, but this article is designed to be a complete step-by-step guide toward accomplishing the goal in the article title.

This particular software combination is often referred to as WIMP (Windows/IIS/MySQL/PHP), taking after the popularisation of the LAMP (Linux/Apache/MySQL/PHP) name for the Linux world.

My lab system for this article is running the 64-bit version of Windows Server 2003 Enterprise Edition.

Step 1: Install the Application Server role onto your Windows Server 2003 R2 system
For this example, I'm going to use IIS as my Web server. You can also opt to use PHP and MySQL with Apache in which case you don't need IIS, but I am not going this route in this example.

To install the Application Server role onto your system, from the Start menu, choose Manage Your Server. On the Manage Your Server main window, click the "Add or remove a role" option. (Figure A)

Figure A

Installing the Application Server role onto your server makes it possible to host Web sites.

Windows will search your server for existing roles and then provide you with a complete list of roles available for installation. (Figure B)

Figure B

The Application Server role includes both IIS and ASP.net.

During the server role installation process, you may be asked to insert your Windows Server CD. The files needed for this role are on CD 1.

When you're done, the Manage Your Server screen is updated to reflect the addition of the new role.

Step 2: Download PHP and MySQL
At this point, your server is ready to start serving up Web pages. But, since you haven't yet installed PHP or MySQL, the pages will be static. Before you can install PHP and MySQL, you need to download the Windows versions of the software from their respective Web sites.

MySQL
I'll start with the MySQL installation. As of this writing, MySQL 5.1 is in beta, with version 5.0 available for general use. Even though I'm installing MySQL onto a 64-bit edition of Windows, I'll download the 32-bit version of the product. After all, PHP, which will be on the same server, is not yet generally available for 64-bit hardware, which means that IIS needs to be kicked down to 32-bits on the server as well, so there's no way to stay fully 64-bit. MySQL is available in three editions: Essentials, Complete, or an edition sans installer.

  1. Essentials: The Essentials package is an MSI installation file intended to meet the needs of most users.
  2. Complete: The Complete package, as you might expect, includes more components than Essentials, including a suite of benchmarking tools.
  3. Noinstall: This package is the same as the Complete package, but does not include the Configuration Wizard or an installer and must be installed manually.

For the purposes of this article, the Essentials package is desirable. In this case, the file I'm downloading is named mysql-essential-5.0.24a-win32.msi and it's saved to my desktop.

PHP

To add dynamism to your site, using a language like PHP is a necessity, particularly if you want to pull information from a database such as MySQL. There are two different versions of PHP: a 4.x series version and a 5.x series version. If you're using scripts from an older site, you may need the 4.x series version of PHP since 5.x introduces a number of changes. Since I'm creating a brand new site, I'll stick with the latest edition of the product. As of this writing, that is version 5.1.6.

The name of the downloaded file is php-5.1.6-Win32.zip.

Windows Server 2003 R2's Setup 4-5(PHP5&MySQL)
Windows Server 2003 R2's Setup 3(Install MySQL)
Windows Server 2003 R2's Setup1-2(Install&Download PHP and MySQL)  

profile
여기에서 행복한 시간 되십시오.