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

Installing AMP: Difference between revisions

From MoodleDocs
(→‎Windows: added another see also installation using XAMPP page)
 
(47 intermediate revisions by 19 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:
AMP, stands for '''A'''pache, '''M'''ySQL & '''P'''HP. 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. As individual applications, [[Apache]], MySQL and PHP can be tricky to set up for average computer users. Moodle uses one of the AMP programs to make the process easier. When you install a Moodle AMP package it installs both the server, database, PHP and Moodle itself with their basic interconnections already made.


== Hosting Service ==
In 2008, Moodle is rolled into XAMPP (which includes Perl) in the [http://download.moodle.org/windows Windows complete package] and into MAMP for the [http://download.moodle.org/macosx Mac OS complete package]. Of course, the [http://download.moodle.org Standard install packages] contains just the Moodle program.


Unfortunately hosting services vary quite a lot in the way they work. Some will even install Moodle for you.
:'''TIP:'''Installing Moodle '''for the first time''' on a [[Localhost|localhost]] (a stand alone computer) is easy and can be a very useful tool even if a web based production Moodle Server is available for use.  


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.


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 - MAMP==
[[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 ==
[[Installing_AMP#Mac_OS_without_the_complete_install|See below]] if you want a secure, public server with OS X. This will use the web server that comes preinstalled with every Mac Computer.


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:
See also [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]].


* '''PHP''': Download from here: http://www.entropy.ch/software/macosx/php/
== Red Hat Linux ==
* '''MySQL''': Download here: http://www.entropy.ch/software/macosx/mysql/
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.


Once these are installed the standard [[Installing Moodle|Installation guide]] should be fairly straightforward.
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.
A more detailed walkthrough is here: [[RedHat Linux installation]]
 
== Windows - XAMPP ==
For a complete description of installing an XAMPP webserver and then adding your own standard windows Moodle install package see [[Windows installation using XAMPP]].
 
'''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].  


== Red Hat Linux ==
=== 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.


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


Once these are installed the standard [[Installing Moodle|Installation guide]] should be fairly straightforward.
Start Moodle by typing localhost in the web browser and/or adding localhost as a favorite site.


A more detailed walkthrough is here: [[RedHat Linux installation]]
==== 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.


== Windows ==
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.
* 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.


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].
=== EasyPHP - similar to XAMPP ===
As an alternative to the above package you could use a package like EasyPHP that bundles all the software you need into a single Windows application. Note that the EasyPHP 1.8 uses older versions of the software that are too old for Moodle 1.6. Also many menus for EasyPHP are still in French. EasyPHP may be a good option again once its version 2.0 is released.


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:
=== Mac OS without the complete install ===
#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.
It is possible to 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:
#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, which the [[Installing Moodle]] MoodleDoc page and [[Installing_Moodle#Go_to_the_admin_page_to_continue_configuration]] section describes in a little bit more detail. 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.)
* '''PHP''': Download from here: http://www.entropy.ch/software/macosx/php/
* '''MySQL''': Download here: http://www.entropy.ch/software/macosx/mysql/


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:
Once these are installed the standard [[Installing Moodle|Installation guide]] should be fairly straightforward.


# apache 1.3.27 (current relases is 2.2.0)
Go here for a [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] (not server).
# 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.
=== IIS for Windows ===
Here you can find steps for an [[IIS]]: [[Windows installation]] for XAMPP or Windows 2003.


See Also for Windows:
=== Hosting Service ===
Hosting services vary quite a lot in the way they work. Some will install Moodle for you. Others may have "scripts" that you can choose that can add Moodle to your site.


https://docs.moodle.org/en/Windows_installation_using_XAMPP
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.


Here you can find steps for an [[IIS]]: [[Windows installation]] for XAMPP or Windows 2003 .
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. Remember, you will not use a Complete install package from Moodle, but rather one of the Generic packages if you already have a webserver.


==Testing PHP==
== 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:
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:


   <?phpinfo()?>
   <?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]].
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]].


==See also==
==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:
 
- 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.
 
- 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.


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


[[Category:Core]]
[[Category:Administrator]]
[[Category:Installation]]
[[Category:Installation]]


[[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 11:19, 7 May 2011

AMP, stands for Apache, MySQL & PHP. 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. As individual applications, Apache, MySQL and PHP can be tricky to set up for average computer users. Moodle uses one of the AMP programs to make the process easier. When you install a Moodle AMP package it installs both the server, database, PHP and Moodle itself with their basic interconnections already made.

In 2008, Moodle is rolled into XAMPP (which includes Perl) in the Windows complete package and into MAMP for the Mac OS complete package. Of course, the Standard install packages contains just the Moodle program.

TIP:Installing Moodle for the first time on a localhost (a stand alone computer) is easy and can be a very useful tool even if a web based production Moodle Server is available for use.


Mac OS X - MAMP

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.

See below if you want a secure, public server with OS X. This will use the web server that comes preinstalled with every Mac Computer.

See also Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client.

Red Hat Linux

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.

Once these are installed the standard Installation guide should be fairly straightforward.

A more detailed walkthrough is here: RedHat Linux installation

Windows - XAMPP

For a complete description of installing an XAMPP webserver and then adding your own standard windows Moodle install package see Windows installation using XAMPP.

NOTE: There is a difference between the XAMPP Installer used in the Moodle/Windows/XAMPP installation package and the XAMPP webserver. The complete install package page has detailed instructions for a Windows installation using XAMPP and there is the 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 c:\Moodle19\restart_xampp.bat . 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.

  • 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 - similar to XAMPP

As an alternative to the above package you could use a package like EasyPHP that bundles all the software you need into a single Windows application. Note that the EasyPHP 1.8 uses older versions of the software that are too old for Moodle 1.6. Also many menus for EasyPHP are still in French. EasyPHP may be a good option again once its version 2.0 is released.

Mac OS without the complete install

It is possible to 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:

Once these are installed the standard 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).

IIS for Windows

Here you can find steps for an IIS: Windows installation for XAMPP or Windows 2003.

Hosting Service

Hosting services vary quite a lot in the way they work. Some will install Moodle for you. Others may have "scripts" that you can choose that can add Moodle to your site.

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.

You should work your way through the Installation guide and take each step at a time. Ask your hosting provider if you get stuck. Remember, you will not use a Complete install package from Moodle, but rather one of the Generic packages if you already have a webserver.

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

Vista and Windows 7

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

There are several solutions:

- A simple one is to use http://bitnami.org/stack/moodle

- Another solution is to look at these videos at Sebastian Sulinski Design for Windows Vista.

- Also, the page at 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 Xampp server and then a Standard Moodle Package Note: not Moodle for Windows.

See also