The Easiest Guide To Apache 2.2, PHP 5.3 and MySQL 5.1 Server Installation On Windows 7

May 23, 2012 – 11:00 pm

Yeah, you read the title right. I am going to show you step by step, screenshots-laden guide to install Apache 2.2, PHP 5.3 and MySQL 5.1 on Windows 7. This is probably one of the easiest guides to follow, although it will take a bit of your time. Some may argue that you can always use XAMMP or WAMP , but installing these components piece by piece has its own satisfaction (and makes you a smarter person).

apache-logophp-mysql

 

Prerequisites

You need to download these components first, and I suggest you download the exact version such as mine (remember that you want the EASIEST guide, right?)

1- Apache Web Server version 2.2.22 (httpd-2.2.22-win32-x86-openssl-0.9.8t.msi)

2- PHP version 5.3.12 (php-5.3.12-Win32-VC9-x86.msi)

3- MySQL 5.1.62 (mysql-essential-5.1.62-win32.msi)

 

And to make the installation hassle-free,

4- Setup your firewall to allow access to port 80 and port 3306. If you don’t know how to do this, disable your firewall temporarily.

 

Phase 1 – Server Network Setup on Windows 7

If you want to use 127.0.0.1 as your web server address, you can skip to step 5. Choosing 127.0.0.1 will not allow other people from the same LAN to connect to your server.

Pick an imaginary Fully Qualified Domain Name (FQDN) for your server, in my case: www.testdomain.com

 

1- Make sure your computer is physically connected to the network.

 

2- Check your computer IP address. Write down your IP address, for example: 10.1.1.2

 

3- Run and open Notepad as Administrator.

run notepad as admin

 

4- Using Notepad, open the hosts file located in C:\Windows\System32\drivers\etc\hosts

web-server-host-setup-windows-014

 

5- Insert a new line your server’s IP address followed by your web server’s FQDN. Save the hosts file.

web-server-host-setup-windows-016

 

6- Open the Windows command prompt. Make sure you can ping your server using the IP address AND the domain name.

web-server-host-setup-windows-019

web-server-host-setup-windows-021

 

Phase 2 – Apache Web Server 2.2.2 Installation

1- Run the Apache Web Server installer.

 

2- Click Next on the Welcome screen.

apache-server-2-setup-windows-023

 

3- Accept the terms in the License Agreement. Proceed with Next.

apache-server-2-setup-windows-024

 

4- Read the details if you want to and click Next.

apache-server-2-setup-windows-025

 

5- Make sure the settings in the Server Information screen is the same as you have configured in Phase 1 (check out the example below). Click Next to proceed.

apache-server-2-setup-windows-026

 

6- Select Typical for Setup Type. Next.

apache-server-2-setup-windows-027

 

7- Accept the default Destination Folder. If you change this setting, make sure you remember the folder. Next please.

apache-server-2-setup-windows-028

 

8- Press Install to start the Apache installation! Wait a few seconds and press Finish.

apache-server-2-setup-windows-029

apache-server-2-setup-windows-030

 

9- On your system tray, right click the Apache tray icon to open the Apache Server Monitor console. If the Service Status icon is green, you are doing just fine.

apache-server-2-setup-windows-032

 

10- Open your favorite web browser. Type in your server’s FQDN. The “It works!” screen shows that Apache web server 2.2.22 is running successfully.

apache-server-2-setup-windows-033

apache-server-2-setup-windows-034

 

Phase 3 – PHP 5.3.12 Installation

1- Run the PHP installer. Press “Next” to proceed with PHP installation.

php-setup-windows-047

 

2- Accept the “License Agreement”.

php-setup-windows-048

 

3- Change the PHP installation directory to C:\PHP .

php-setup-windows-049

 

4- Select “Apache 2.2.x Module”.

php-setup-windows-051

 

5- Browse and select your Apache 2.2.22 configuration directory as shown below.

php-setup-windows-052

 

6- Accept the default configuration on the “Choose Items to Install” screen. Move on with Next.

php-setup-windows-055

 

7- Click “Install” to complete the PHP installation.

php-setup-windows-056

 

8- Press “Finish”.

php-setup-windows-057

 

9- Using the Apache Server Monitor on the System Tray, restart your Apache server.

php-setup-windows-058

 

10- You should see the changes on the Apache Server Monitor status bar, showing the success integration of Apache 2.2.22 and PHP/5.3.12.

php-setup-windows-060

 

11- You are halfway through. Take a deep breath.

 

Phase 4 – Making Sure PHP Behaves Well With Apache

1- Open Notepad. Type the words shown below, exactly as it is.

php-setup-windows-061

 

2- Save the file as info.php. Place it exactly in the htdocs directory, as shown in the picture.

php-setup-windows-062

 

3- Open your favorite browser. Type http:\\localhost\info.php (or you can type your FQDN followed with info.php)

php-setup-windows-063

 

4- If you can see the purple PHP info screen, you are doing an excellent job following instructions :) .

 

Phase 5 – MySQL Installation and Configuration

1- Run the MySQL 5.1.62 installer.

mysql-setup-windows-7-001

 

2- Accept the terms and conditions.

mysql-setup-windows-7-002

 

3- Choose “Typical” for Setup Type.

mysql-setup-windows-7-003

 

4- Press “Install” to install MySQL (wow!)

mysql-setup-windows-7-004

 

5- Wait and press Next two times to get to the last MySQL installation screen.

mysql-setup-windows-7-006

mysql-setup-windows-7-007

 

6- Make sure “Configure the MySQL server now” is selected and press “Finish”.

mysql-setup-windows-7-008

 

7- Press “Next” on the first screen of MySQL Instance Configuration Wizard.

mysql-setup-windows-7-009

 

8- Choose “Detailed Configuration”.

mysql-setup-windows-7-010

 

9- Choose “Developer Machine”.

mysql-setup-windows-7-011

 

10- Choose “Multifunctional Database”.

mysql-setup-windows-7-012

 

11- Press “Next” on the InnoDB Tablespace Settings screen.

mysql-setup-windows-7-013

 

12- Choose “Decision Support (DSS)/OLAP”.

mysql-setup-windows-7-014

 

13- Make sure “Enable TCP/IP Networking” and “Enable Strict Mode” are selected. Leave the port number to the default 3306.

mysql-setup-windows-7-015

 

14- Choose “Standard Character Set”.

mysql-setup-windows-7-016

 

15- Make sure “Install as a Windows service” and “Include Bin Directory in Windows Path” are selected.

mysql-setup-windows-7-017

 

16- Select “Modify Security Settings” and enter your password two times. DO NOT FORGET this password. You may need it in the future!

mysql-old (2)

 

17- Press “Execute” to install MySQL 5.1.62.

mysql-setup-windows-7-019

 

18- On the last screen, make sure everything is okay and press “Finish” to complete the installation.

mysql-setup-windows-7-020

 

Phase 6 – Making Sure MySQL 5.1.62 Works

1- Open the command prompt.

 

2- Type “netstat -na”. If you can see the line with the 3306 port number and its status is LISTENING, MySQL is working well in the background.

mysql-setup-windows-7-021

 

3- Say hooray!

 

If you managed to end up here, that means that you have successfully install Apache 2.2, PHP 5.3 and MySQL 5.1 Installation on Windows 7. If you think that this installation guide is the easiest around, leave a comment below. If not, thanks for reading the guide up and of course; you are welcome to throw in some critiques (hehe!)

Share!

Related Posts:


  1. 13 Responses to “The Easiest Guide To Apache 2.2, PHP 5.3 and MySQL 5.1 Server Installation On Windows 7”

  2. Hi!
    I’ve followed every step of the tutorial but yet at Phase-3 step-10, The apache server is not showing the integration of php. Can you kindly help.

    By Josyula on Jun 17, 2012

  3. should be no problem. make sure you are installing the exact version of software as instructed above.

    By Syahid A. on Jun 19, 2012

  4. I had this problem as well … restarting the computer seemed to be the solution. :)

    By MemorySeeker on Aug 13, 2012

  5. Worked perfectly, thank you! :) bookmarking for future reference. Although at this time the MySQL link isn’t working but I did manage to go through the mysql.com site and use the 5.1.62 MSI and it worked perfectly. your instructions worked exactly the same for that version. :)

    By ashe on Dec 29, 2012

  6. Sir,
    This tutorial is very easy to understand and easy to instal.
    Thank u very much sir.

    By kalyan kumar on Mar 20, 2013

  7. it’s indeed the easiest or simplest way.
    clear and informative.

    thanks.

    By ibrahim on Apr 6, 2013

  8. Thank you very much. Worked perfectly.

    By Saba on Apr 12, 2013

  9. Great Guide! I got a little stuck on the installation of MySQL because apparently I had previously installed it and must have forgotten it. Since there was another instance of MySQL, the wizard would not finish properly. To fix this, I uninstalled the previous instance of MySQL and Restarted the computer (The magic fix). Then I tried running the MySQL .exe file and chose “repair”. The wizard finished quickly and I moved on to the next step in the guide just to realize everything seemed in order. I can’t wait to start testing my new php knowledge! Thanks a lot for the guide!!

    I suggest you have some kind of link to FAQs or solutions to common problems in the installation. After all many people have many different things going on in their computer. But overall, this was an excellent and well-written guide! Cheers! :)

    By Art on Apr 20, 2013

  10. It was crystal clear and helped a lot to make it as easy as possible. Thanks much :) appreciate your help .

    By Raghu on May 26, 2013

  11. Very useful. I did exactly as stated and voila! It is so simple and system behaves exactly as shown in screen-shots! Thanks a tonne Author!

    By Saurabh on May 30, 2013

  12. My friend, thanks for this a million.

    Either I am a complete idiot (which would surprise the company that pays me vast sums to do what I do, succesfully, for a living) or there are lot of people out there who are talking rubbish, copying and pasting other peoples rubbish, or completely failing to communicate.

    After spending 3 hours determined to learn how to configure apache/php by hand I gave up, uninstalled and reinstalled as per the above, very well written, guide (except with mySQL 5.6). 10 minutes later my system is up and running. Yippeeee!

    Why was it so hard before? Because the edits to the httpd.conf file given on other guides (that I read, and that’s about 15 of them) are not only unclear/misleading but just plain WRONG!

    People we need a new rating method for websites/pages that are full of crap. Something that allows us to sticky tag when bullshit is spread. Hey! maybe that’s where we will all make our millions!

    This one, however gets the glory. Thanks again. Amillion gold stars.

    By Dean on Jul 14, 2013

  13. very useful,precise and accurate guide.ended uo after long hours of attempting ti install php.the best guide,which really helps..thank you verymuch

    By ajith sanjay on Jul 16, 2013

  14. Thanks for this tutorial. I followed the steps exactly and I managed to install it correctly.

    By Kieran on Jul 19, 2013

Post a Comment