Note: You are currently viewing documentation for Moodle 3.7. Up-to-date documentation for the latest stable version of Moodle may be available here: Installing Moodle from Git repository.

Installing Moodle from Git repository: Difference between revisions

From MoodleDocs
(Added caveats to the top of the page)
No edit summary
Line 1: Line 1:
'''This page is a work in progress'''
'''This page is a work in progress'''
== Linux/Unix command line ==
== Command line (all platforms) ==
These instructions should be very similar on Windows.
 
Using the cd command, move to the directory that you wish to install Moodle inside. The Moodle code will be placed in a subdirectory of the directory you're currently in. For example, if you are in /tmp when you run the command, Moodle will be installed in /tmp/moodle.
 
Clone the offical Moodle repository via git, taking the 2.0 stable branch, and placing it into a subdirectory called moodle.
 
git clone -b MOODLE_20_STABLE git://git.moodle.org/moodle.git moodle


Move to the directory where you wish to install Moodle. Moodle will go in ./moodle, relative to this directory
cd ~
Clone the offical Moodle repository via git
git clone git://git.moodle.org/moodle.git
If you have firewall issues with the git protocol, the above may not work, in which case you can try cloning the official github repository via http
If you have firewall issues with the git protocol, the above may not work, in which case you can try cloning the official github repository via http
  git clone https://github.com/moodle/moodle.git
 
  git clone -b MOODLE_20_STABLE https://github.com/moodle/moodle.git moodle
 
Whichever command works it should display a result like the following. Installing will probably take around ten minutes.


  Initialized empty Git repository in ~/moodle/.git/
  Initialized empty Git repository in ~/moodle/.git/
Line 16: Line 20:
  Receiving objects: 100% (448351/448351), 128.54 MiB | 10.94 MiB/s, done.
  Receiving objects: 100% (448351/448351), 128.54 MiB | 10.94 MiB/s, done.
  Resolving deltas: 100% (336929/336929), done.
  Resolving deltas: 100% (336929/336929), done.
Move in to the new moodle directory (you can rename this if you wish)
 
Move in to the new moodle directory that you just created.
 
  cd moodle
  cd moodle
From here, you can edit config.php and install as per the [[Installing_Moodle#Setting-up_your_web_server|Installation Instructions]]
From here, you can edit config.php and install as per the [[Installing_Moodle#Setting-up_your_web_server|Installation Instructions]]
Upgrading to the latest Moodle version is now 2 simple commands:
 
git fetch
Upgrading to the latest Moodle 2.0 version is now one simple command. Change into the moodle directory and then run:
  git merge origin/master
 
  git pull origin MOODLE_20_STABLE
 
== Installing other versions ==
 
You can install another version by replacing MOODLE_20 with e.g. MOODLE_19. If you want the latest development version, use 'master' (note lower-case) instead of MOODLE_20.

Revision as of 12:46, 31 March 2011

This page is a work in progress

Command line (all platforms)

Using the cd command, move to the directory that you wish to install Moodle inside. The Moodle code will be placed in a subdirectory of the directory you're currently in. For example, if you are in /tmp when you run the command, Moodle will be installed in /tmp/moodle.

Clone the offical Moodle repository via git, taking the 2.0 stable branch, and placing it into a subdirectory called moodle.

git clone -b MOODLE_20_STABLE git://git.moodle.org/moodle.git moodle

If you have firewall issues with the git protocol, the above may not work, in which case you can try cloning the official github repository via http

git clone -b MOODLE_20_STABLE https://github.com/moodle/moodle.git moodle

Whichever command works it should display a result like the following. Installing will probably take around ten minutes.

Initialized empty Git repository in ~/moodle/.git/
remote: Counting objects: 448351, done.
remote: Compressing objects: 100% (103262/103262), done.
remote: Total 448351 (delta 336929), reused 446784 (delta 335924)
Receiving objects: 100% (448351/448351), 128.54 MiB | 10.94 MiB/s, done.
Resolving deltas: 100% (336929/336929), done.

Move in to the new moodle directory that you just created.

cd moodle

From here, you can edit config.php and install as per the Installation Instructions

Upgrading to the latest Moodle 2.0 version is now one simple command. Change into the moodle directory and then run:

git pull origin MOODLE_20_STABLE

Installing other versions

You can install another version by replacing MOODLE_20 with e.g. MOODLE_19. If you want the latest development version, use 'master' (note lower-case) instead of MOODLE_20.