Most easy way is to use package software to automate whole process. Check the alternate method section for easiest way.
Do do this manually follow the below mentioned steps.
Getting Started :
- Download the Apache HTTPD Web Server from the Apache website (httpd.apache.org). Be sure to download the latest stable Win32 Binary version of Apache with the MSI Installer.
- Download the latest stable PHP Windows Binaries with installer. (Click Here )
- Download the latest stable Windows version, which includes a Windows Installer, of the MySQL Database Server. (Click Here )
- Download the phpMyAdmin Database Manager file. (Click Here )
How to Install the Apache Web Server on Windows.
- Double click the downloaded msi for Apache:
- Click "Next>" as require.
- Next, fill in all the text boxes with the following information:
- "Network Domain": localhost
- "Server Name": localhost
- "Administrator's Email Address": your email address
- Make sure the radio button "for all users, on port 80, as a service - recommended" is selected.
- On the next window, click the radio button "Custom", and then click "Next>".
- On the next window highlight "Apache HTTP Server" and click the "change" button.
- Weare going to install all the packages and scripts in the folderC:\Server (assuming C: is your main hard drive). So in the text box"Folder name:" type in "C:\Server\". The ending backslash is important.
- Click "Install" to begin the installation
- Click the "Finish" button.
How to Install MySQL Database Server on Windows :
Run the MSI file and use the following settings- Typical Setup
- Skip Sign-Up
- make sure "Configure the mySQL Server now" is checked.
- "Detailed Configuration"
- "Developer Machine"
- "Multifunctional Database"
- "InnoDB Tablespace Settings" - leave everything default
- "Decision Support (DSS)/OLAP"
- Makesure "Enable TCP/IP Networking" is checked and leave the port number at3306 (at this point, if you have a firewall, it will usually try toaccess itself on the localhost)
- "Standard Character Set"
- check "Install As Windows Service".
- I recommend leaving "Include Bin Directory in Windows PATH" checked
- enter your root password
- then hit "execute" and it´ll install and set it up.
Install the PHP Engine on Windows PC :
- Typical Setup.
- On the next window, click the radio button "Advanced", and click "Next>".
- We'regoing to install PHP in our server directory instead of the default PHPdirectory, so in the "Destination Folder" group, click "Browse".
- A browser window will open. Change the destination directory to "C:\Server\PHP". There is no need for a trailing backslash.
- On the following window, leave the SMTP defaults as they are, and click "Next>".
- If you want, you can enter an email address. This will be used as the "From:" email address when using PHP's mail function.
- Onthe next window, make sure that the radio button "Display all errorswarnings and notices" is clicked. Then click "Next>".
- Onthe next window is where you pick which web server software you areusing. Since you have installed Apache, pick "Apache" from the list.Then click "Next>".
- On the next window make sure that the check box ".php" is checked, and then click "Next>".
Now PHP is installed, but we need to change some of Apache's settings to get everything working the way it should.
Configure PHP with APACHE :
- Browse your way to the folder "C:\Server\Apache2\conf".
- Open the file "httpd.conf" for editing.
- Scroll to the very bottom of the page, and add these lines:
- ScriptAlias /php "c:/server/php/"
- AddType application/x-httpd-php .php
- Action application/x-httpd-php "/php/php-cgi.exe
- Hit "Enter" after the last line to ensure there is one blank line at the end of the file.
Configure PHP.INI
- Find the file "php.ini" in the windows directory.
- This moves the "php.ini" file from the Windows directory to the PHP directory ("C:\Server\php").
- Using Notepad, open the file "C:\Server\php\php.ini".
- Find that line that reads: extension_dir = "./" (or something similar, as long as its the line with "extension_dir".
- Change the line to: extension_dir = "c:\Server\php\ext"
Getting PHP5 to work with mySQL
Unfortunately PHP5 removed built-in support for mySQL. So you´ll needto copy some files by hand. open the folder you unzipped your PHP to.Copy the libmysql.dll file (should be located likeC:\Server\php\libmysql.dll ) into your Window´s System folder (usuallyC:\Windows\System32\ although might be c:\WinNT\System\ or something).Then open up your php.ini in a text editor and search for ;extension=php_mysql.dll and remove the ; in front of that line.
Do the same for ;extension=php_mbstring.dll. Without the mbstringextension phpMyAdmin is unable to split strings correctly and it mayresult in unexpected results.
Restart Apache and see if you get any errors. If it complains aboutphp_mysql.dll either your extention directory isn´t correct or windowscan´t find libmysql.dll
If you don´t want to move files outside your php5 directory, you may also add the php5 directory to the PATH on Windows.
Now you are done.
How to Install phpMyAdmin on Windows
phpMyAdmin lets you control you MySQL database from a web browser.To install PHPMyAdmin, you need to extract the .zip file to the C:\SimplePHP folder and rename the phpmyadmin folder as C:\SimplePHP\phpMyAdmin. After, open the config.inc.php file and find the line starting with $cfg['PmaAbsoluteUri'] and change it for :
$cfg['PmaAbsoluteUri'] = 'http://localhost/mysql/';
phpMyAdmincan also try to auto-detect the proper value if this directive is leftas it is (blank) and this line is changed to 'TRUE'...$cfg['PmaAbsoluteUri_DisableWarning'] = FALSE;
Next, you need to locate the series of lines starting with $cfg['Servers'][$i][] and make sure the four following lines are identical :
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
Since we installed PHPMyAdmin out of the C:\SimplePHP\root folder which is the web server's root folder, we will use a trick to make sure PHPMyAdmin is found by the web server.
To achieve this feat, you will once again need to open the httpd.conf file and insert the following code in the Aliases section (located at about two thirds of the beginning of the file) :
Alias /mysql/ "C:/SimplePHP/phpMyAdmin/" <folder "C:/SimplePHP/phpMyAdmin/">
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
</folder>
This enables us to access PHPMyAdmin by typing the below address in our browser (the "/" is very important) :AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
</folder>
http://localhost/mysql/
You are done!Alternate Method
Downloadthe full package of Xampp that contains everything. It also has acontrol panel, to admin everything. Xampp is the best and easiest wayto do all this. For novice users I highly recomand Xampp.http://www.apachefriends.org/en/xampp.html
Alternatively you can also install appserv. This program contains all you need to easily setup these programs in a Windows NT/2000/XP PC. Source: faq.programmerworld.net