Note: You are currently viewing documentation for Moodle 2.2. Up-to-date documentation for the latest stable version is available here: Installing AMP.

Installing AMP: Difference between revisions

From MoodleDocs
(→‎Windows: Step by step Install complete package localhost)
 
(63 intermediate revisions by 23 users not shown)
Line 1: Line 1:
Moodle is written in a scripting language called [[PHP]] and stores most of its data in a database. The recommended database is [[MySQL]]. Before installing Moodle you must have a working PHP installation and a working database to turn your computer into a functional web server platform. These packages can be tricky to set up for average computer users, so this page has been written to try to make this process as simple as possible for different platforms:
{{Installing Moodle}}
AMP, stands for '''A'''pache, '''M'''ySQL & '''P'''HP. This is not the only platform on which Moodle runs but is the most common and fine for basic installations.  


== Hosting Service ==
'' 'All-in-one' Moodle installers for Windows and OSX are available at http://httpd.apache.org/docs/2.0/install.html (not intended for 'production' sites). ''


Unfortunately hosting services vary quite a lot in the way they work. Some will even install Moodle for you.
== First a word about PostgreSQL ==


Most will offer a web-based control panel to control your site, create databases and set up cron. Some may also offer terminal access via ssh, so that you can use the command shell to do things.
If you would prefer to use the PostgreSQL database (and you should consider it) you can - when using the package type installers - just install it instead of MySQL. MySQL tends to be the universal choice with the simpler 'one-click' installers. For a 'one-click' installer with PostgreSQL, Apache and PHP you can check [http://bitnami.org BitNami], it supports Windows ([http://bitnami.org/stack/wappstack WAPP]), Linux ([http://bitnami.org/stack/lappstack LAPP]) and Mac ([http://bitnami.org/stack/mappstack MAPP]).
 
You should work your way through the [[Installing Moodle|Installation guide]] and take each step at a time. Ask your hosting provider if you get stuck.


== Mac OS X ==
== Mac OS X ==


The easiest way to do this is use the [[Apache]] server that Apple provides, and add PHP and MySQL using Marc Liyanage's packages. Both of the pages below come with good instructions that we won't duplicate here:
OSX comes with a suitable [[Apache]] web server and a not so suitable PHP (it doesn't have all the required extensions).  
 
* '''PHP''': Download from here: http://www.entropy.ch/software/macosx/php/
* '''MySQL''': Download here: http://www.entropy.ch/software/macosx/mysql/
 
Once these are installed the standard [[Installing Moodle|Installation guide]] should be fairly straightforward.


Go here for a [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] (not server) Mac.
Here are some other possibilities (all are documented so this is not repeated here):
* Liip 'one click' installer from http://php-osx.liip.ch/. Note that it is primarily biased towards developers.
* [http://www.mamp.info/ MAMP]: One click installer - easy to use and well documented. Probably only suitable for personal use.
* [http://www.ampps.com/  Softaculous AMPPS]: Another one click installer - for both Windows and OSX this time.
* [http://www.macports.org/ MacPorts]: A complete Linux-style package repository. You will find the AMP components here. See [https://trac.macports.org/wiki/howto/MAMP Getting Apache, MySQL, and PHP Running under MacPorts]
* [http://www.finkproject.org/ Fink]: an alternative to MacPorts.
* [http://bitnami.org/stack/mampstack BitNami MAMPStack]: On 'one-click' installer with for MySQL, Apache and PHP which supports the BitNami applications modules to installed on top of it like the [http://bitnami.org/stack/moodle#nativeInstaller BitNami Moodle module].


== Red Hat Linux ==
== Linux ==
You should install the packages from your distribution's repository for [[Apache]], [[PHP]] and MySQL. You will almost certainly need additional extensions for [[PHP]] (e.g. the extension for the database). The packaged versions of Moodle are not recommended (it's not much harder to install from moodle.org download)


You should install all available RPM packages for Apache, PHP and MySQL. One package that people frequently forget is the php-mysql package which is necessary for PHP to talk to MySQL.
See (for example):
* Ubuntu - https://help.ubuntu.com/community/ApacheMySQLPHP
* Debian - http://wiki.debian.org/LaMp
* RedHat / Centos - http://www.howtoforge.com/quick-n-easy-lamp-server-centos-rhel
* SuSE / OpenSuSE - http://www.susegeek.com/internet-browser/install-configure-lamp-apachemysqlphp-in-opensuse-110/


Once these are installed the standard [[Installing Moodle|Installation guide]] should be fairly straightforward.
While one-click installers (e.g. XAMPP or BitNami LAMP Stack) exist for Linux, it is so simple to install the components the "right" way that they seem pointless. Using the standard method will make it much easier for you to obtain help and support.  


A more detailed walkthrough is here: [[RedHat Linux installation]]
Of course, if you wish to (or you need a particularly new version) you can compile all or some of the elements from source. All the elements have good documentation. The tricky one is PHP and some guidance for Debian/Ubuntu is here: [[Compiling PHP from source]]


== Windows ==
== Windows ==


The easiest way to do this is use one of the complete install packages available from the  Moodle.org link called [http://download.moodle.org/?lang=en Download Moodle]. 
Windows has slightly more variations as you can use [[Apache]] or Microsoft's [[IIS]] web servers. Again, here are some pointers
 
For those who want to install Moodle '''for the first time''' on a localhost (a stand alone computer, a very useful tool even if you have a web based Moodle Server), here is a step by step, that works on a Window XP Professional OS computer:
#In the Download section, find the second group called [http://download.moodle.org/?lang=en Complete Install Packages (Moodle+Apache+MySQL+PHP)], select the your version for Windows.  For example: Moodle 1.6.1+ . Click on the download link on the far right, which will download a large zip file.
#Unzip the downloaded file at c: and keep the path structure for all the files. 
#Rename the just created c:\moodle to c:\xampplite  . 
#In Windows Explorer click on  c:\xampplite\apache_start an MS DOS batch file, leave DOS window open.
#In Windows Explorer click on  c:\xampplite\mysql_start an MS DOS batch file, leave DOS window open.
#In your favorite Web browser, go to address bar and type "localhost" and press enter or go.
#This will start the Moodle Install process, see elsewhere for detail instructions. This can take some time for a new user. '''Don't panic''', you can change things later and the install process will tell you what you absolutely have to fill in or correct.
#Once this is completed, resist the temptation to start playing, close Moodle in your Web browser.
#Welcome to the Moodle community. Now we will make starting Moodle a little easier.
#In Windows Explorer click on c:\xampplite\mysql_stop
#In Windows Explorer click on c:\xampplite\apache_stop
#In Windows Explorer click on c:\xampplite\setup_xampp
#Create a short cut on your Windows start menu to c:\xampplite\xampp_restart
#Create a short cut on your Windows start menu to c:\xampplite\xampp_stop
#Create a Favorite on your Web Browser for http://localhost/
 
Now you are ready to do oodles of Moodle. To use this Moodle setup: first click on the shortcut for xampp_restart, then click on your localhost favorite in your Web Browser.  (One tec note, we use xampp_restart because sometimes we forget that we already have xampp running in the background and this deals with that.)
 
Alternatively, for the more experienced, you could use a package like EasyPHP that bundles all the software you need into a single Windows application.  Note that the EasyPHP 1.7 uses the following somewhat older versions:
 
# apache 1.3.27 (current relases is 2.2.0)
# php 4.3.3 (current stable release is 5.1.3)
# mysql 4.0.15 (current release is 5.0.18)
# phpmyadmin 2.5.3


It should be noted that these are not the current releases. Also many menus for EasyPHP are still in French.
* [http://www.apachefriends.org/en/xampp-windows.html XAMPP]: Probably the best known one-click installer for Windows. Lots of documentation and discussion around. Definitely only for a personal web server
* [http://www.easyphp.org/ EasyPHP]: Another popular alternative to the above
* [http://bitnami.org/stack/wampstack BitNami WAMPStack]: On 'one-click' installer with for MySQL, Apache and PHP which supports the BitNami applications modules to installed on top of it like the [http://bitnami.org/stack/moodle#nativeInstaller BitNami Moodle module].
* [http://php.net/manual/en/install.windows.php Official PHP Documentation]: A lengthy list of instructions for installing PHP on all manner of Windows and web server variations
* [http://www.mysql.com/downloads/mysql/ MySQL]: Select Windows and download installer.
* [http://www.postgresql.org/download/windows/ PostgreSQL]: Download installer for Windows


See Also for Windows:
=== Installer packages and components ===


Here you can find steps for an [[IIS]]: [[Windows installation]] for XAMPP or Windows 2003 .
As a reference, the following table lists each package, its version and its components (as of July 30, 2012):


==Testing PHP==
{| style="width:75%; height:75px" border="0"
Once you have installed your web server and PHP you should be able to create a file (for example phpinfo.php in the document root) with the following in it:
|-
| '''Product''' || '''Version''' || '''Httpd (Apache)''' || '''PHP''' || '''MySQL''' || '''PHPMyAdmin''' || '''Address'''
|-
| WampServer || 2.2e || 2.2.22 || 5.3.13 || 5.5.24 || 3.4.10.1 || [http://www.wampserver.com/en/ Web page]
|-
| BitNami WAMP Stack || 5.3.15 || 2.2.22 || 5.3.15 || 5.5.21 || 3.5.2 || [http://bitnami.org/stack/wampstack/ Web page]
|-
| BitNami WAMP Stack || 5.4.5-0 dev || 2.4.2 || 5.4.5 || 5.5.21 || 3.5.2 ||
|-
| EasyPHP || 12.0 || 2.4.2 VC9 || 5.4.4 VC9, 5.3.14 VC9, 5.2.17 || 5.5.25a || 3.5.1 || [http://www.easyphp.org/ Web page]
|-
| EasyPHP || 5.3.8.1 || 2.2.21 VC9 || 5.3.8 VC9 || 5.5.16 || 3.4.5 || [http://www.easyphp.org/ Web page]
|-
| XAMPP || 1.8.0 || 2.4.2 || 5.4.4 || 5.5.25a || 3.5.2 || [http://www.apachefriends.org/en/xampp-windows.html Web page]
|-
| ----------------- || --------- || ---------- || -------------------------- || ------ || ------- ||
|-
| XAMPP || 1.7.4 || 2.2.17 || 5.3.5 || 5.5.8 || 3.3.9 ||
|-
| XAMPP || 1.7.1 || 2.2.11 || 5.2.9 || 5.1.33 || 3.1.3.1 ||
|}


  <?phpinfo()?>
Versions 1.7.1 and 1.7.4 of the XAMPP package were included because those are the versions on which the [http://download.moodle.org/windows/ Windows Moodle Package] are built (1.9.18+ is under 1.7.1, and 2.1.7+, 2.2.4+ & 2.3.1+ are under 1.7.4).


You should be able to open this file in a web browser by going to to the URL '''localhost/phpinfo''' and see a web page that has PHP status information in it such as [[phpinfo|this]].
==Vista and Windows 7==


==See also==
Many people have trouble installing the stand alone local [http://download.moodle.org/windows/ Moodle for Windows] on Vista and Windows 7.


*[[Installing Moodle]]
Here are some things you might want to try:
*[[Installation FAQ]]
*[[Upgrading Moodle]]
*[[Debian GNU/Linux installation]]


[[Category:Core]]
* A simple one is to use http://bitnami.org/stack/moodle
[[Category:Administrator]]
* Another solution is to look at these videos at [http://www.sebastiansulinski.co.uk/web_design_tutorials/tutorial/7/install_apache_php_and_mysql_on_windows_vista Sebastian Sulinski Design] for Windows Vista.
[[Category:Installation]]
* For personal (evaluation) use - install XAMPP or EasyPHP and then Moodle using the normal installation instructions.


[[es:Instalación AMP]]
[[es:Instalación AMP]]
[[fr:Installation de AMP]]
[[ja:AMPのインストール]]
[[ru:Установка AMP]]
[[pl:Instalacja AMP]]
[[de:Installation von Apache, MySQL und PHP]]

Latest revision as of 10:55, 8 November 2012

AMP, stands for Apache, MySQL & PHP. This is not the only platform on which Moodle runs but is the most common and fine for basic installations.

'All-in-one' Moodle installers for Windows and OSX are available at http://httpd.apache.org/docs/2.0/install.html (not intended for 'production' sites).

First a word about PostgreSQL

If you would prefer to use the PostgreSQL database (and you should consider it) you can - when using the package type installers - just install it instead of MySQL. MySQL tends to be the universal choice with the simpler 'one-click' installers. For a 'one-click' installer with PostgreSQL, Apache and PHP you can check BitNami, it supports Windows (WAPP), Linux (LAPP) and Mac (MAPP).

Mac OS X

OSX comes with a suitable Apache web server and a not so suitable PHP (it doesn't have all the required extensions).

Here are some other possibilities (all are documented so this is not repeated here):

Linux

You should install the packages from your distribution's repository for Apache, PHP and MySQL. You will almost certainly need additional extensions for PHP (e.g. the extension for the database). The packaged versions of Moodle are not recommended (it's not much harder to install from moodle.org download)

See (for example):

While one-click installers (e.g. XAMPP or BitNami LAMP Stack) exist for Linux, it is so simple to install the components the "right" way that they seem pointless. Using the standard method will make it much easier for you to obtain help and support.

Of course, if you wish to (or you need a particularly new version) you can compile all or some of the elements from source. All the elements have good documentation. The tricky one is PHP and some guidance for Debian/Ubuntu is here: Compiling PHP from source

Windows

Windows has slightly more variations as you can use Apache or Microsoft's IIS web servers. Again, here are some pointers

  • XAMPP: Probably the best known one-click installer for Windows. Lots of documentation and discussion around. Definitely only for a personal web server
  • EasyPHP: Another popular alternative to the above
  • BitNami WAMPStack: On 'one-click' installer with for MySQL, Apache and PHP which supports the BitNami applications modules to installed on top of it like the BitNami Moodle module.
  • Official PHP Documentation: A lengthy list of instructions for installing PHP on all manner of Windows and web server variations
  • MySQL: Select Windows and download installer.
  • PostgreSQL: Download installer for Windows

Installer packages and components

As a reference, the following table lists each package, its version and its components (as of July 30, 2012):

Product Version Httpd (Apache) PHP MySQL PHPMyAdmin Address
WampServer 2.2e 2.2.22 5.3.13 5.5.24 3.4.10.1 Web page
BitNami WAMP Stack 5.3.15 2.2.22 5.3.15 5.5.21 3.5.2 Web page
BitNami WAMP Stack 5.4.5-0 dev 2.4.2 5.4.5 5.5.21 3.5.2
EasyPHP 12.0 2.4.2 VC9 5.4.4 VC9, 5.3.14 VC9, 5.2.17 5.5.25a 3.5.1 Web page
EasyPHP 5.3.8.1 2.2.21 VC9 5.3.8 VC9 5.5.16 3.4.5 Web page
XAMPP 1.8.0 2.4.2 5.4.4 5.5.25a 3.5.2 Web page
----------------- --------- ---------- -------------------------- ------ -------
XAMPP 1.7.4 2.2.17 5.3.5 5.5.8 3.3.9
XAMPP 1.7.1 2.2.11 5.2.9 5.1.33 3.1.3.1

Versions 1.7.1 and 1.7.4 of the XAMPP package were included because those are the versions on which the Windows Moodle Package are built (1.9.18+ is under 1.7.1, and 2.1.7+, 2.2.4+ & 2.3.1+ are under 1.7.4).

Vista and Windows 7

Many people have trouble installing the stand alone local Moodle for Windows on Vista and Windows 7.

Here are some things you might want to try: