Learn how to Install Apache, PHP, MySQL and phpMyAdmin

This tutorial will show you step-by-step how to install:

  • Apache 2
  • PHP 5
  • MySQL 5
  • phpMyAdmin


Installing Apache:

Today we will be installing Apache version 2.2.11. Follow the steps carefully.
  1. Go to web site and download "apache_2.2.11-win32-x86-openssl-0.9.8i.msi" to your desktop.

  2. Double click "apache_2.2.11-win32-x86-openssl-0.9.8i.msi", and if prompted, click "run".

  3. An installation wizard will appear:

    Start the Apache Server Installation

    Click "Next".

  4. The next page contains the terms of agreement. Select "I accept", and click "Next".

  5. Read about the Apache Server, and click "Next"

  6. The next screen will ask you for specific server information. Enter the values seen below:

    Configure Apache

    Click "Next".

  7. On the next screen, select "Typical Installation" and click "Next".

  8. Click "Next".

  9. Click "Install".

  10. Open up Internet Explorer and type in "http://localhost". If you see a page that says "It works!" then the Apache server has been installed successfully.

    Apache Server Success Page

NOTE: Apache is installed by default in your "C:\Program Files\Apache Software Foundation\Apache2.2" directory. Please change path as "C:\Apache2.2"

Installing PHP:

  1. Go to web site and download the "php-5.3.0-Win32-VC9-x86.msi"
  2. Double click php-5.3.0-Win32-VC9-x86.msi", and if prompted, click "run". Change install directory "C:\PHP5", Select web server apache 2.2x Module, 
  3. After complete installation Open up your Apache configuration file ("C:\Apache2.2\conf\httpd.conf") in notepad and add these seven lines below to the bottom of the "LoadModule" section:
  #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
ScriptAlias /php/ "C:/php5/"
Action application/x-httpd-php "C:/php5/php-cgi.exe"
PHPIniDir "C:/php5/"
LoadModule php5_module "C:/php5/php5apache2_2.dll"
AddType application/x-httpd-php .php
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

4. Restart your Apache Server for the changes to take effect: Start > All Programs > Apache HTTP Server 2.2 > Control Apache Server > Restart

5. Open up Internet Explorer and type in: http://localhost/info.php. If your browser takes you to a page that looks like this, then PHP has been installed successfully!

PHP Info Page

 

Installing MYSQL:

Next we will be installing MySQL version 5. Follow the steps carefully.
  1. Go to website and download the "mysql-5.0.45-win32.exe" to your desktop.

  2. Once "972_mysql-essential-5.0.45-win32.zip" has finished downloading, you can extract it using WinZIP or a similiar program.

  3. Once extracted, double click on the "Setup.exe" file. An installation wizard will appear.

    Start the MySQL Server Installation

    Click "Next".

  4. Select "Typical" Installation and click "Next".

  5. Click "Install". (Be patient, this can take up to several minutes).

  6. The next screen will ask you to "Sign Up". Select "Skip Sign-Up" for now.

  7. The next screen will tell you that the installation wizard is complete. Make sure that the "Configure the MySQL Server now" field is checked before clicking "Finish".

    Create a MySQL Server Instance

  8. The MySQL Server Instance Configuration Wizard should appear. Click "Next".

  9. Select "Detailed Configuration" and click "Next".

  10. Select "Developer Machine" and click "Next".

  11. Select "Multifunctional Database" and click "Next".

  12. Click "Next".

  13. Select "Decision Support (DSS)/OLAP" and click "Next".

  14. Select "Multifunctional Database" and click "Next".

  15. Make sure "Enable TCP/IP Networking" is checked, the Port Number is set to "3306", and "Enable Strict Mode" is checked. Click "Next".

  16. Select "Standard Character Set" and click "Next".

  17. Check "Install As Windows Service", set the Service Name to "MySQL", and check "Launch the MySQL Server automatically". Make sure that the "Include Bin Directory in Windows Path" is NOT checked. Click "Next".

  18. On the next screen, check the box that says "Modify Security Settings". Enter a password for the default "root" account, and confirm the password in the box below. Do NOT check the boxes "Enable root access from remote machines" or "Create An Anonymous Account". Click "Next".

  19. Click "Execute". (This may take a few minutes. Be patient).

  20. Click "Finish".

 

  1. To test if MySQL was installed correct, go to: Start > All Programs > MySQL > MySQL Server 5.0 > MySQL Command Line Client. The MySQL Command Line Client will appear:

    MySQL Command Line

  2. It will ask you for a password. Enter the password you created in step 18. (If you enter an incorrect password MySQL will automatically close the command line)

  3. Next, type in the commands shown below: (shown in blue)

    Test MySQL

    If you don't get any errors, and it returns the information shown above, then MySQL has been successfully installed! Next we will need to configure PHP to work with MySQL. 

Installing phpMyAdmin:

 

  1. Go to website and download "english.zip" under the phpMyAdmin 3.2.1  section to your desktop.
  2. Create a new folder called "phpmyadmin" in your "htdocs" directory. Extract the contents of the "phpMyAdmin-3.2.1-english.zip" ZIP file here. Your C:\Apache2.2\htdocs\phpmyadmin".
  3. then edit Config.sample.inc.php as config.inc.php
  4. Now Change DirectoryIndex module at httpd.conf
          (DirectoryIndex index.html  as  DirectoryIndex index.php index.html)
         
     4. phpMyAdmin has now been successfully installed! To use it, open up Internet Explorer and type in  "http://localhost/phpmyadmin". This will bring you to the main phpMyAdmin page. If you have any questions, refer to the phpMyAdmin website or the "Documentation.html" file in the /phpMyAdmin/ directory.





      0 comments: