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

Installing AMP: Difference between revisions

From MoodleDocs
(edits copied from 21 docs)
(copying recent changes from 21 wiki)
Line 1: Line 1:
AMP, stands for '''A'''pache, '''M'''ySQL & '''P'''HP. This is not the only platform on which Moodle runs but is the most common. This page describes how to install this basic software on a number of platforms - usually using 'one click' AMP installers.
{{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.  


'''NOTE: 'One-click' installers are rarely suitable or secure for production sites (i.e. public servers). They are intended only for standalone development, evaluation and testing (e.g. developing course materials before sending to a production Moodle site).'''
'' '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). ''


'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 ==


== Mac OS X - MAMP==
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.  
[[Complete Install Packages for Mac OS X]] are named Moodle4Mac. These do not have sufficient security for public, production servers--only use for private, local testing purposes.  


These packages allow Moodle to be installed, along with the prerequisites that includes a web server, database and scripting language (Apache, MySQL and PHP in this case). Several versions of the complete install package are available. You will find versions for Intel based Macs and for older PPC based Macs. Please use the correct version for your processor.
== Mac OS X ==


==== AMP for OSX (primarily for development) ====
OSX comes with a suitable [[Apache]] web server and a not so suitable PHP (it doesn't have all the required extensions).


If you just want to install the basic components (with Moodle code, Liip have a neat 'one click' installer available from http://php-osx.liip.ch/. Note that it is primarily biased towards developers.
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.


== 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).  
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):
See (for example):
Line 23: Line 28:
* SuSE / OpenSuSE - http://www.susegeek.com/internet-browser/install-configure-lamp-apachemysqlphp-in-opensuse-110/
* SuSE / OpenSuSE - http://www.susegeek.com/internet-browser/install-configure-lamp-apachemysqlphp-in-opensuse-110/


== Windows ==
While one-click installers (e.g. XAMPP) 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.


=== XAMPP ===
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]]


For a complete description of installing an XAMPP webserver and then adding your own standard windows Moodle install package see [[Windows installation using XAMPP]].
== Windows ==
 
'''NOTE:''' There is a difference between the XAMPP Installer used in the Moodle/Windows/XAMPP installation package and the XAMPP webserver.
[[Complete install packages for Windows|The complete install package page]] has detailed instructions for a Windows installation using XAMPP and there is the [https://docs.moodle.org/en/Xampp_Installer_FAQ XAMPP Installer FAQ].
 
====Tips and Tricks for Windows XAMPP====
There are lots of ways to start a Moodle after an install. Most Moodlers will have one or more "localhost" links on their computer installed in "Favorites" or even as a browser's default opening screen. But first a web server has to be started. Here are two ways to start them.
 
=====Automatic Windows services startup=====
In order to make starting Moodle more convenient in the future you could install the web and database servers as Windows services that are started automatically. To do this go to Start -> Run... and type the command "c:/moodle/server/service.exe -install" into Open box. Then click OK.
 
Start Moodle by typing localhost in the web browser and/or adding localhost as a favorite site.
 
=====Single button service startups=====
Use the "xampp_start" or "xampp_restart" to start your webserver. You can install multiple localhost webservers on a computer. Each will have it's own start and restart programs.
* Create a shortcut on the start menu, favorites or desktop that points to each specific file like <nowiki>c:\Moodle19\restart_xampp.bat</nowiki> . Label each shortcut to a localhost differently, for example C_Moodle19, or Moodle16 or MoodleSchool.


Start Moodle by placing localhost in the web browser or adding it as a favorite site. Whichever localhost you restarted, that is the Moodle your web browser will find.
Windows has slightly more variations as you can use [[Apache]] or Microsoft's [[IIS]] web servers. Again, here are some pointers
* Use the xampp_restart program. It will automatically close any running webserver on your computer before it starts the version of Moodle you want to run.
* Use any xampp_stop to close any running webserver on your computer.


===EasyPHP===
* [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
As an alternative to the above package available from http://www.easyphp.org/
* [http://www.easyphp.org/ EasyPHP]: Another popular alternative to the above
 
* [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
=== IIS for Windows ===
* [http://www.mysql.com/downloads/mysql/ MySQL]: Select Windows and download installer.  
Here you can find steps for an [[IIS]]: [[Windows installation]] for XAMPP or Windows 2003.
* [http://www.postgresql.org/download/windows/ PostgreSQL]: Download installer for Windows
 
== Testing PHP ==
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:
 
  <?php phpinfo()?>
 
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==
==Vista and Windows 7==
Line 65: Line 46:
Many people have trouble installing the stand alone local [http://download.moodle.org/windows/ Moodle for Windows] on Vista and Windows 7.
Many people have trouble installing the stand alone local [http://download.moodle.org/windows/ Moodle for Windows] on Vista and Windows 7.


There are several solutions:
Here are some things you might want to try:


- A simple one is to use http://bitnami.org/stack/moodle
* A simple one is to use http://bitnami.org/stack/moodle
 
* 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.  
- 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.  
* For personal (evaluation) use - install XAMPP or EasyPHP and then Moodle using the normal installation instructions.
 
- Also, the page at [http://www.webdevelopersnotes.com/how-do-i/install-apache-windows-7.php Web Developer's Notes] outlines how you can install an AMP on windows 7.
Installing Moodle from there should be considerably easier.
 
- It's also easy to install a [http://www.apachefriends.org/en/xampp.html Xampp server] and then a [http://download.moodle.org/ Standard Moodle Package] Note: '''''not''''' Moodle for Windows.


== See also ==
== See also ==
* [[Installing Moodle]]
* [[Installing Moodle]]
* [[Installation FAQ]]
* [[Installation FAQ]]
* [[Xampp Installer FAQ]]
* [[Upgrading Moodle]]
* [[Upgrading Moodle]]
* [[Complete install packages]], also includes instructions for creating a stand alone (localhost) installation on a single computer.
[[Category:Installation]]


[[es:Instalación AMP]]
[[es:Instalación AMP]]

Revision as of 09:10, 8 December 2011

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.

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) 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
  • 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

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:

See also