CrazeD
Member
+368|6670|Maine
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.

https://crazedizzled.com/images/wamptutorial/apache_next-1.jpg

Accept the license agreement and press Next.

https://crazedizzled.com/images/wamptutorial/apache_next-2.jpg

Type localhost for Network Domain and Server Domain. Type admin@localhost for Administrator's Email Address. Press Next.

https://crazedizzled.com/images/wamptutorial/apache_next-3.jpg

Choose Custom and press Next.

https://crazedizzled.com/images/wamptutorial/apache_next-4.jpg

Click Change and type C:\WEB\APACHE\. Press Next.

https://crazedizzled.com/images/wamptutorial/apache_next-5.jpg

Press Install.

https://crazedizzled.com/images/wamptutorial/apache_next-6.jpg

Press Finish.

https://crazedizzled.com/images/wamptutorial/apache_next-7.jpg

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.

https://crazedizzled.com/images/wamptutorial/apache_next-8.jpg

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.

https://crazedizzled.com/images/wamptutorial/php_copy.jpg

Rename php.ini-dist to php.ini.

https://crazedizzled.com/images/wamptutorial/php_renameini.jpg

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"
https://crazedizzled.com/images/wamptutorial/php_httpdconf.jpg

Find DirectoryIndex and add index.php to the end.

https://crazedizzled.com/images/wamptutorial/php_httpdconf-2.jpg

Save and close httpd.conf.

Restart Apache (click the tray icon and choose restart).

https://crazedizzled.com/images/wamptutorial/php_apacherestart.jpg

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();

?>
https://crazedizzled.com/images/wamptutorial/php_phpinfo.jpg

Save phpinfo.php.

In your internet browser, navigate to http://localhost/phpinfo.php.

https://crazedizzled.com/images/wamptutorial/php_phpinfo-2.jpg

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.

https://crazedizzled.com/images/wamptutorial/mysql_setup.jpg

Press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-1.jpg

Select Custom, and press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-2.jpg

Press Change and type C:\WEB\MYSQL\. Press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-3.jpg

Press Install.

https://crazedizzled.com/images/wamptutorial/mysql_next-4.jpg

Press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-5.jpg

Press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-6.jpg

Make sure Configure the MySQL Server now box is ticked, and press Finish.

https://crazedizzled.com/images/wamptutorial/mysql_next-7.jpg

Press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-9.jpg

Make sure Detailed Configuration is checked. Press next.

https://crazedizzled.com/images/wamptutorial/mysql_next-10.jpg

Make sure Developer Machine is checked. Press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-11.jpg

Make sure Multifunctional Database is checked, press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-12.jpg

Press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-13.jpg

Make sure Decision Support (DSS)/OLAP is checked and press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-14.jpg

Make sure Enable TCP/IP Networking and Enable Strict Mode are checked. Use port 3306. Press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-15.jpg

Press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-16.jpg

Make sure Install As Windows Service is checked. Make sure Include Bin Directory in Windows PATH is unchecked. Press Next.

https://crazedizzled.com/images/wamptutorial/mysql_next-17.jpg

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.

https://crazedizzled.com/images/wamptutorial/mysql_next-18.jpg

Press Execute.

https://crazedizzled.com/images/wamptutorial/mysql_next-19.jpg

Press Finish.

https://crazedizzled.com/images/wamptutorial/mysql_next-20.jpg

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
Remove the ; from the beginning.

https://crazedizzled.com/images/wamptutorial/php_ini.jpg

Find:

Code:

extension_dir = "./"
Replace ./ with ./ext/

https://crazedizzled.com/images/wamptutorial/php_ini-2.jpg

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.

https://crazedizzled.com/images/wamptutorial/php_envvar.jpg

Under System variables, find Path and click Edit. Go to the end of the line and add:

Code:

;C:\WEB\PHP
https://crazedizzled.com/images/wamptutorial/php_envvar-2.jpg

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".

https://crazedizzled.com/images/wamptutorial/php_phpinfo-3.jpg

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.

https://crazedizzled.com/images/wamptutorial/phpmyadmin_copy.jpg

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';
Change cookie to config.

https://crazedizzled.com/images/wamptutorial/phpmyadmin_config-2.jpg

Find:

Code:

// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
Add Above:

Code:

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'MYSQL_PASSWORD';
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.

https://crazedizzled.com/images/wamptutorial/phpmyadmin_config.jpg

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!
AussieReaper
( ͡° ͜ʖ ͡°)
+5,761|6150|what

I thought you could do most of that through the myphpadmin installer package, that gives you mySQL, Apache etc to save on install times. I'll see if I can find it when I get home.

Good guide though.
https://i.imgur.com/maVpUMN.png
CrazeD
Member
+368|6670|Maine
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.
Plus, you're way leeter if you do it this way.
AussieReaper
( ͡° ͜ʖ ͡°)
+5,761|6150|what

That's what I've been brought up on, XAMPP.

Yeah your way is much more configurable. Re: security, never use the default 'root' log in. It's the first thing a hacker will try. lol
https://i.imgur.com/maVpUMN.png
CrazeD
Member
+368|6670|Maine

AussieReaper wrote:

That's what I've been brought up on, XAMPP.

Yeah your way is much more configurable. Re: security, never use the default 'root' log in. It's the first thing a hacker will try. lol
Trust me, my real passwords are next to impossible to crack.

This is just an example. My development server only has root as the password, because it's only a local server... IE: I'm the only one accessing it.
Mr.Dooomed
Find your center.
+752|6325

i've been needing to do this so i can work on my drupal site locally/offline. Will be nice to follow ur guide. Maybe tomorrow when I got time. Thnx +1
Nature is a powerful force. Those who seek to subdue nature, never do so permanently.
Cheez
Herman is a warmaphrodite
+1,027|6436|King Of The Islands

I dream of a future, where people have enough upstream to serve webpages, and not have it count towards their download limit.
My state was founded by Batman. Your opinion is invalid.
CrazeD
Member
+368|6670|Maine

Cheez wrote:

I dream of a future, where people have enough upstream to serve webpages, and not have it count towards their download limit.
You can get hosting for <$5 a month, is it really that big of a deal?
chuyskywalker
Admin
+2,439|6845|"Frisco"

I use XAMPP, personally, for local development. Because it's not the above 5 billion steps ;D



More to the point, however, why go to all this trouble to install a secure A/M/P system on top of ... windows? (xp or otherwise...)

Code:

(aptitude|yum) install apache2 php5 mysql phpmyadmin ; echo 'AMP Server setup done!' ;
I mean ... really. Especially when you get get virtual servers for something like .... 10-20 $ per month.
CrazeD
Member
+368|6670|Maine

chuyskywalker wrote:

I use XAMPP, personally, for local development. Because it's not the above 5 billion steps ;D



More to the point, however, why go to all this trouble to install a secure A/M/P system on top of ... windows? (xp or otherwise...)

Code:

(aptitude|yum) install apache2 php5 mysql phpmyadmin ; echo 'AMP Server setup done!' ;
I mean ... really. Especially when you get get virtual servers for something like .... 10-20 $ per month.
For development purposes. I have a local web server running on Windows that I use for development. I could use Linux, sure, but ... why bother? It's much easier to just use Windows for such a simple purpose. I don't care if it's not as secure as Linux, it's on a restricted home network...

And the reason for this over XAMPP or any other pre-packaged server is that I know how it was setup, and thus I know exactly how to modify it.

Board footer

Privacy Policy - © 2024 Jeff Minard