Note: You are currently viewing documentation for Moodle 2.5. Up-to-date documentation for the latest stable version of Moodle may be available here: Manual install on Windows 7 with Apache and MySQL.

Manual install on Windows 7 with Apache and MySQL: Difference between revisions

From MoodleDocs
Line 23: Line 23:
==Step 2: Install Apache==
==Step 2: Install Apache==


* Install the Apache web server on your PC. Go to http://httpd.apache.org/download. Scroll down the page until you find the download for the 'Win32 Binary without crypto (MSI Installer) and download. At the time of writing this was a couple of versions old so you won't find it amongst the latest downloads.  
* Install the Apache web server on your PC. Go to http://www.apachelounge.com/download/. Scroll down the page until you find the download for the 'Apache 2.4 win32 binaries' and download. You need to be careful that the module dll in PHP matches the version of Apache you install. Apache won't load otherwise.  
* Start the installer
* Unzip the file into C:\. You should end up with a directory 'Apache24' (or whatever the latest version is).
** Hit Next and accept the license.  
* Find Start > All programs > Accessories > Command Prompt BUT, right click and select 'Run as administrator'.
** On the 'Server information' screen enter 'localhost' for both Network Domain and Server Name (you can use real values if you happen to have them for your PC). Whatever you like for email. Leave Port 80 as default. Hit Next.
* Enter the following commands
** Accept typical setup and hit Next, Next, Install.
 
** Apache will install. Hit Finish
    cd \Apache24\bin
    httpd -k install
    httpd -k start
 
...you may well get a warning about the server name. Don't worry about it.  
* To test it worked type 'http://localhost' into your browser. You should get a screen up to the effect that Apache is installed and working.
* To test it worked type 'http://localhost' into your browser. You should get a screen up to the effect that Apache is installed and working.



Revision as of 12:51, 14 February 2013

THIS IS WORK IN PROGRESS - PLEASE IGNORE FOR NOW

These are instructions for installing on Windows 7 desktop using individual components rather than a one click installer. This is intended only as a testing/evaluation install via 'localhost'. Proper server configuration and security is not considered.

Step 1: Install MySQL

  • Install the MySQL database server on your PC. We will do this using the 'MSI' one-click installer for Windows. Go to http://dev.mysql.com/downloads/ and download the 'MySQL Installer for Windows'. At the time of writing this was from a very obvious graphic at the top of the screen (which I missed the first time).
  • Run the installation. Click...
    • Install MySQL products
    • Accept the license
    • Allow the version check (optional)
    • At 'Choose a Setup Type' accept the "Developer Default" and click Next
    • A number of downloads of required software may be identified. Click Execute and follow onscreen instructions to install them.
    • At 'Installation progress' screen, hit Execute - the MySQL software will be installed
    • At 'Configuration overview' hit Next to go to the basic configuration screen.
    • Accept all the defaults on the 'MySQL Server Configuration' and hit Next.
    • On the password screen, supply a password for the 'root' (main administrator) user. Make sure it's one you won't forget. You can also create a 'User' account just for Moodle with more restricted access if you like. This would be good practice on a public server but just using the 'root' user will suffice for testing.
    • On the Service details page, accept the defaults and hit Next and then Next a couple more times for the configuration progress.
    • Click Finish. Job done.
  • MySQL Workbench will open. Under Server Administration (right hand column, double click 'Local MySQL56' (or whatever you called it). A box should pop up asking for the root password. Enter the password you supplied
  • The server management screen should appear. You don't have to worry too much about this. It just shows the install is working.

Step 2: Install Apache

  • Install the Apache web server on your PC. Go to http://www.apachelounge.com/download/. Scroll down the page until you find the download for the 'Apache 2.4 win32 binaries' and download. You need to be careful that the module dll in PHP matches the version of Apache you install. Apache won't load otherwise.
  • Unzip the file into C:\. You should end up with a directory 'Apache24' (or whatever the latest version is).
  • Find Start > All programs > Accessories > Command Prompt BUT, right click and select 'Run as administrator'.
  • Enter the following commands
   cd \Apache24\bin
   httpd -k install
   httpd -k start

...you may well get a warning about the server name. Don't worry about it.

  • To test it worked type 'http://localhost' into your browser. You should get a screen up to the effect that Apache is installed and working.

Step 3: Install PHP

  • Now install the PHP scripting language on your PC. Go to http://www.php.net/download. In the current stable release section click on link for Windows 5.x.x binaries and source. Scroll down to the newest 'Zip' for 'Thread safe' PHP (again, the newest versions of PHP didn't have this but it shouldn't matter) and download. *Don't* be tempted to use the Microsoft Installer version; it won't work.
  • Open the zip file and extract to C:\PHP\

You now need to edit Apache's httpd.conf file. The easiest thing is just to search for 'httpd.conf' in the Start menu. Open it in Notepad (I had to change the permissions as it was read only to start with). At the end of this file (or wherever you like if you want to be more organised) add the following lines:

   LoadModule php5_module "C:/PHP/php5apache2.dll"
   AddHandler application/x-httpd-php .php
   PHPIniDir C:/PHP

Step 4: Install Git

Step 5: Install Moodle

Upgrading Moodle