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
(Moodle complete install uses Xampp, edit to reflect this, fix Mac sections)
Line 1: Line 1:
AMP or AMPPlite 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. XAMP is a Windows and MAMP is a Mac OS version.  
AMP, or AMPPlite stands for '''A'''pache, '''M'''ySQL & '''P'''HP. In XAMPP the last P is for '''P'''erl (Moodle does not use it) and the '''X''' is for cross platform.  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.  
Moodle does have [[Complete install packages]] in the [http://download.moodle.org/ download section] as well as the Moodle only package.


The AMP individual applications can be tricky to set up for average computer usersThis page has been written to try to make this process as simple as possible for different platforms.   
In 2008, Moodle is rolled into XAMPP 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 Generic packages]] contains just the Moodle program.  
 
 
== Hosting Service ==
 
Unfortunately hosting services vary quite a lot in the way they work. Some will even install Moodle for you.
 
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 ==
== Mac OS X ==
[[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.


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:
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.  
 
* '''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.
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]].


Go here for a [[Step-by-step Guide for Installing Moodle on Mac OS X 10.4 Client]] (not server) Mac.


== Red Hat Linux ==
== Red Hat Linux ==
Line 35: Line 22:
== Windows ==
== Windows ==


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. These instructions work on a Windows XP computer.
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. On the [http://download.moodle.org/windows/ Windows packages] download page, choose the version you would like. Click on the download link in the rightmost column. This will download a 50-70 meg zip file that contains everything you need.
#On the [http://download.moodle.org/windows/ Windows packages] download page, choose the version you would like. Click on the download link in the rightmost column. This will download a large zip file.
 
#Unzip the downloaded file at c: and keep the path structure for all the files. 
[[Complete install packages|The complete install package page]] has detailed instructions for a Windows installation using XAMPP.
#Move the whole folder to its final location  (eg c:\moodle or something)
 
#Run '''Start Moodle.exe''' to start the server
#Visit [http://localhost http://localhost/] [http://127.0.0.1/ http://127.0.0.1/]or to see the Moodle site and continue the installation via your web browser.
#In your favorite Web browser, go to the address bar and type "localhost" or "127.0.0.1" and press enter or click go.
#This will start the Moodle Install process, which the [[Installing Moodle]] [[Installing_Moodle#Go_to_the_admin_page_to_continue_configuration| MoodleDoc page 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.    Normally you can accept all the defaults!


===Easier Moodle restarts===
===Easier Moodle restarts===
Line 50: Line 33:


Start Moodle by typing localhost in the web browser and/or adding localhost as a favorite site.
Start Moodle by typing localhost in the web browser and/or adding localhost as a favorite site.
====Single button service startups====
====Single button service startups====
Sometimes there are more than one localhost installed on a computer. Create a shortcut on the start menu, favorites or desktop that points to each specific file like c:\xampplite\restart_xampp.bat . Label each shortcut to a localhost differently, for example C_MoodleXampp, or Moodle16 or Moodle17 or whatever.   
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.
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. 


==Other install options==
==Other install options==
Instead of using this package you can also install XAMPP and Moodle separately as explained on the page [[Windows_installation_using_XAMPP]].  
Instead of using a Complete install package you can also install XAMPP and Moodle separately as explained on the page [[Windows_installation_using_XAMPP]].
*Note: some packages while excellent for evaluation or small pilots are not suitable for production services.


===EasyPHP===
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.
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:
* '''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).
===ISS for Windows===
Here you can find steps for an [[IIS]]: [[Windows installation]] for XAMPP or Windows 2003 .
Here you can find steps for an [[IIS]]: [[Windows installation]] for XAMPP or Windows 2003 .


Note, however, that such packages while excellent for evaluation or small pilots are rarely suitable for production services.
 
 
=== 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 [[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==

Revision as of 12:24, 7 August 2008

AMP, or AMPPlite stands for Apache, MySQL & PHP. In XAMPP the last P is for Perl (Moodle does not use it) and the X is for cross platform. 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.

In 2008, Moodle is rolled into XAMPP in the Windows complete package and into MAMP for the Mac OS complete package. Of course the [Generic packages] contains just the Moodle program.


Mac OS X

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

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. On the Windows packages download page, choose the version you would like. Click on the download link in the rightmost column. This will download a 50-70 meg zip file that contains everything you need.

The complete install package page has detailed instructions for a Windows installation using XAMPP.


Easier Moodle restarts

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.

Other install options

Instead of using a Complete install package you can also install XAMPP and Moodle separately as explained on the page Windows_installation_using_XAMPP.

  • Note: some packages while excellent for evaluation or small pilots are not suitable for production services.

EasyPHP

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 theApache 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).

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

See also