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:


Post a Comment