In this tutorial I will teach you how to manually install Apache, PHP, MySQL, and PHPMyAdmin on Windows (XP). The benefit of manually installing/configuring your webserver is that it is much more secure. Pre-configured WAMP's (like XAMPP, AppServ, etc) are made for development and not for actually running a website. You can use what you learn in this tutorial to actually run a website (though that is not this tutorial's purpose...this tutorial is simply for installing and configuring WAMP).
To get started, you will need to download the install files for each program.
APACHE --
1. Go to Download - The Apache HTTP Server Project.
2. Find the latest version (currently 2.2.11).
3. Download the "Win32 Binary without crypto (no mod_ssl) (MSI Installer): apache_2.2.11-win32-x86-no_ssl.msi".
MYSQL --
1. Go to MySQL :: MySQL 5.0 Downloads.
2. Download the Windows ZIP/Setup.EXE (x86) file.
PHP --
1. Go to PHP: Downloads.
2. Under Windows Binaries, download the latest ZIP package (currently 5.2.8)
PHPMYADMIN --
1. Go to phpMyAdmin - Download
2. Download the latest version (currently 3.1.2) english.zip.
INSTALLING APACHE--
Once you have the above four files, you may start installing Apache. Double click the apache_2.2.11-win32-x86-no_ssl.msi.
Click Next.
Accept the license agreement and press Next.
Type localhost for Network Domain and Server Domain. Type admin@localhost for Administrator's Email Address. Press Next.
Choose Custom and press Next.
Click Change and type C:\WEB\APACHE\. Press Next.
Press Install.
Press Finish.
Open your internet browser and type http://localhost into the address bar. If Apache was installed properly, you will see "It Works!" in large font.
If this is the case, move on to installing PHP.
INSTALLING PHP --
Navigate to C:\WEB in Explorer. Create a new folder called PHP. Open php-5.2.8-Win32.zip and extract all of its contents to C:\WEB\PHP.
Rename php.ini-dist to php.ini.
Navigate to C:\WEB\APACHE\Conf. Open httpd.conf with a text editor. Scroll to the very bottom and add the following lines:
Find DirectoryIndex and add index.php to the end.
Save and close httpd.conf.
Restart Apache (click the tray icon and choose restart).
Navigate to C:\WEB\APACHE\htdocs. Create a new text document called phpinfo.php. Open phpinfo.php with a text editor. Type the following code:
Save phpinfo.php.
In your internet browser, navigate to http://localhost/phpinfo.php.
If your screen looks similar to the above picture, you are ready to install MySQL!
INSTALLING MYSQL--
Open mysql-5.0.77-win32.zip. Open setup.exe.
Press Next.
Select Custom, and press Next.
Press Change and type C:\WEB\MYSQL\. Press Next.
Press Install.
Press Next.
Press Next.
Make sure Configure the MySQL Server now box is ticked, and press Finish.
Press Next.
Make sure Detailed Configuration is checked. Press next.
Make sure Developer Machine is checked. Press Next.
Make sure Multifunctional Database is checked, press Next.
Press Next.
Make sure Decision Support (DSS)/OLAP is checked and press Next.
Make sure Enable TCP/IP Networking and Enable Strict Mode are checked. Use port 3306. Press Next.
Press Next.
Make sure Install As Windows Service is checked. Make sure Include Bin Directory in Windows PATH is unchecked. Press Next.
Make sure Modify Security Settings is checked. For this tutorial, I'm going to be using root as the password. If you are using this webserver publicly, I advise you choose a stronger password.
Make sure Create An Anonymous Account and Enable root access from remote machines are unchecked. Press Next.
Press Execute.
Press Finish.
Now we need to configure PHP to load MySQL. Navigate to C:\WEB\PHP. Open php.ini with a text editor.
Find:
Remove the ; from the beginning.
Find:
Replace ./ with ./ext/
Save and close php.ini
We must add the PHP path to the Environment Variables, so let's do that now.
Open System Properties (right click My Computer and select Properties). Press the Advanced tab, and press Environment Variables.
Under System variables, find Path and click Edit. Go to the end of the line and add:
Press Ok, Ok, Ok.
Now, restart your computer to save the Environment Variable changes.
Once your computer has been restarted, navigate to http://localhost/phpinfo.php in your internet browser. Scroll down until you find "mysql".
If your screen looks like the above picture, you may move onto installing PHPMyAdmin.
INSTALLING PHPMYADMIN--
Open phpMyAdmin-3.1.2-english.zip. Navigate to C:\WEB\APACHE\htdocs. Extract the contents of phpMyAdmin-3.2.1-english.zip to the htdocs folder.
Once the transfer is complete, rename phpMyAdmin-3.1.2-english to phpmyadmin.
Navigate to C:\WEB\APACHE\htdocs\phpmyadmin. Rename config.sample.inc.php to config.inc.php. Open config.inc.php with a text editor.
Find:
Change cookie to config.
Find:
Add Above:
Change pma to root.
Change pmapass to the password that you used when you installed MySQL.
Change MYSQL_PASSWORD to the password that you used when you installed MySQL.
Navigate to http://localhost/phpmyadmin with your web browser. You should be automatically logged in and able to use PHPMyAdmin. If this is the case, congratulations, you are done my tutorial and now have a fully functional web server!
To get started, you will need to download the install files for each program.
APACHE --
1. Go to Download - The Apache HTTP Server Project.
2. Find the latest version (currently 2.2.11).
3. Download the "Win32 Binary without crypto (no mod_ssl) (MSI Installer): apache_2.2.11-win32-x86-no_ssl.msi".
MYSQL --
1. Go to MySQL :: MySQL 5.0 Downloads.
2. Download the Windows ZIP/Setup.EXE (x86) file.
PHP --
1. Go to PHP: Downloads.
2. Under Windows Binaries, download the latest ZIP package (currently 5.2.8)
PHPMYADMIN --
1. Go to phpMyAdmin - Download
2. Download the latest version (currently 3.1.2) english.zip.
INSTALLING APACHE--
Once you have the above four files, you may start installing Apache. Double click the apache_2.2.11-win32-x86-no_ssl.msi.
Click Next.
Accept the license agreement and press Next.
Type localhost for Network Domain and Server Domain. Type admin@localhost for Administrator's Email Address. Press Next.
Choose Custom and press Next.
Click Change and type C:\WEB\APACHE\. Press Next.
Press Install.
Press Finish.
Open your internet browser and type http://localhost into the address bar. If Apache was installed properly, you will see "It Works!" in large font.
If this is the case, move on to installing PHP.
INSTALLING PHP --
Navigate to C:\WEB in Explorer. Create a new folder called PHP. Open php-5.2.8-Win32.zip and extract all of its contents to C:\WEB\PHP.
Rename php.ini-dist to php.ini.
Navigate to C:\WEB\APACHE\Conf. Open httpd.conf with a text editor. Scroll to the very bottom and add the following lines:
Code:
LoadModule php5_module "C:/WEB/PHP/php5apache2_2.dll" AddHandler application/x-httpd-php .php PHPIniDir "C:/WEB/PHP"
Find DirectoryIndex and add index.php to the end.
Save and close httpd.conf.
Restart Apache (click the tray icon and choose restart).
Navigate to C:\WEB\APACHE\htdocs. Create a new text document called phpinfo.php. Open phpinfo.php with a text editor. Type the following code:
Code:
<? phpinfo(); ?>
Save phpinfo.php.
In your internet browser, navigate to http://localhost/phpinfo.php.
If your screen looks similar to the above picture, you are ready to install MySQL!
INSTALLING MYSQL--
Open mysql-5.0.77-win32.zip. Open setup.exe.
Press Next.
Select Custom, and press Next.
Press Change and type C:\WEB\MYSQL\. Press Next.
Press Install.
Press Next.
Press Next.
Make sure Configure the MySQL Server now box is ticked, and press Finish.
Press Next.
Make sure Detailed Configuration is checked. Press next.
Make sure Developer Machine is checked. Press Next.
Make sure Multifunctional Database is checked, press Next.
Press Next.
Make sure Decision Support (DSS)/OLAP is checked and press Next.
Make sure Enable TCP/IP Networking and Enable Strict Mode are checked. Use port 3306. Press Next.
Press Next.
Make sure Install As Windows Service is checked. Make sure Include Bin Directory in Windows PATH is unchecked. Press Next.
Make sure Modify Security Settings is checked. For this tutorial, I'm going to be using root as the password. If you are using this webserver publicly, I advise you choose a stronger password.
Make sure Create An Anonymous Account and Enable root access from remote machines are unchecked. Press Next.
Press Execute.
Press Finish.
Now we need to configure PHP to load MySQL. Navigate to C:\WEB\PHP. Open php.ini with a text editor.
Find:
Code:
;extension=php_mysql.dll
Find:
Code:
extension_dir = "./"
Save and close php.ini
We must add the PHP path to the Environment Variables, so let's do that now.
Open System Properties (right click My Computer and select Properties). Press the Advanced tab, and press Environment Variables.
Under System variables, find Path and click Edit. Go to the end of the line and add:
Code:
;C:\WEB\PHP
Press Ok, Ok, Ok.
Now, restart your computer to save the Environment Variable changes.
Once your computer has been restarted, navigate to http://localhost/phpinfo.php in your internet browser. Scroll down until you find "mysql".
If your screen looks like the above picture, you may move onto installing PHPMyAdmin.
INSTALLING PHPMYADMIN--
Open phpMyAdmin-3.1.2-english.zip. Navigate to C:\WEB\APACHE\htdocs. Extract the contents of phpMyAdmin-3.2.1-english.zip to the htdocs folder.
Once the transfer is complete, rename phpMyAdmin-3.1.2-english to phpmyadmin.
Navigate to C:\WEB\APACHE\htdocs\phpmyadmin. Rename config.sample.inc.php to config.inc.php. Open config.inc.php with a text editor.
Find:
Code:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
Find:
Code:
// $cfg['Servers'][$i]['controluser'] = 'pma'; // $cfg['Servers'][$i]['controlpass'] = 'pmapass';
Code:
$cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'MYSQL_PASSWORD';
Change pmapass to the password that you used when you installed MySQL.
Change MYSQL_PASSWORD to the password that you used when you installed MySQL.
Navigate to http://localhost/phpmyadmin with your web browser. You should be automatically logged in and able to use PHPMyAdmin. If this is the case, congratulations, you are done my tutorial and now have a fully functional web server!