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).
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.
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.
4- Using Notepad, open the hosts file located in C:\Windows\System32\drivers\etc\hosts
5- Insert a new line your server’s IP address followed by your web server’s FQDN. Save the hosts file.
6- Open the Windows command prompt. Make sure you can ping your server using the IP address AND the domain name.
Phase 2 – Apache Web Server 2.2.2 Installation
1- Run the Apache Web Server installer.
2- Click Next on the Welcome screen.
3- Accept the terms in the License Agreement. Proceed with Next.
4- Read the details if you want to and click Next.
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.
6- Select Typical for Setup Type. Next.
7- Accept the default Destination Folder. If you change this setting, make sure you remember the folder. Next please.
8- Press Install to start the Apache installation! Wait a few seconds and press Finish.
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.
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.
Phase 3 – PHP 5.3.12 Installation
1- Run the PHP installer. Press “Next” to proceed with PHP installation.
2- Accept the “License Agreement”.
3- Change the PHP installation directory to C:\PHP .
4- Select “Apache 2.2.x Module”.
5- Browse and select your Apache 2.2.22 configuration directory as shown below.
6- Accept the default configuration on the “Choose Items to Install” screen. Move on with Next.
7- Click “Install” to complete the PHP installation.
8- Press “Finish”.
9- Using the Apache Server Monitor on the System Tray, restart your Apache server.
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.
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.
2- Save the file as info.php. Place it exactly in the htdocs directory, as shown in the picture.
3- Open your favorite browser. Type http:\\localhost\info.php (or you can type your FQDN followed with info.php)
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.
2- Accept the terms and conditions.
3- Choose “Typical” for Setup Type.
4- Press “Install” to install MySQL (wow!)
5- Wait and press Next two times to get to the last MySQL installation screen.
6- Make sure “Configure the MySQL server now” is selected and press “Finish”.
7- Press “Next” on the first screen of MySQL Instance Configuration Wizard.
8- Choose “Detailed Configuration”.
9- Choose “Developer Machine”.
10- Choose “Multifunctional Database”.
11- Press “Next” on the InnoDB Tablespace Settings screen.
12- Choose “Decision Support (DSS)/OLAP”.
13- Make sure “Enable TCP/IP Networking” and “Enable Strict Mode” are selected. Leave the port number to the default 3306.
14- Choose “Standard Character Set”.
15- Make sure “Install as a Windows service” and “Include Bin Directory in Windows Path” are selected.
16- Select “Modify Security Settings” and enter your password two times. DO NOT FORGET this password. You may need it in the future!
17- Press “Execute” to install MySQL 5.1.62.
18- On the last screen, make sure everything is okay and press “Finish” to complete the installation.
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.
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!)