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

Installing Moodle on Debian based distributions

From MoodleDocs
Revision as of 20:49, 10 February 2012 by Visvanath Ratnaweera (talk | contribs) (Initial version (0.1) Intro and ToC)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Stub


This page documents how to install Moodle on Debian based distributions. They are tested for Debian 6.0 Squeeze and Ubuntu Server 10.04 LTS. These instructions should work for a dozen of Debian or Ubuntu based distributions. But if you are going to put the server into production use, you are strongly adviced to do a server installation, in the case of Debian the basic installation without any graphical interface (GUI) and in the case of Ubuntu, get the Server edition which to does not install a GUI by default. If you need Moodle just for you to practice, you can conveniently install Moodle on your Ubuntu-desktop. Or if you plan to work as a team and your institution has a local network (LAN), again you can install Moodle on any Ubuntu flavour and connect it to the LAN to be accessed only within the institution.

These instructions are also generic in the sense that they are valid for all the currently maintained versions of Moodle, from 1.9 to 2.2.

Disclaimer:

  • The public Internet has become a rough terrain. You should not leave a server connected to it, unless you understand a whole lot about security. The instructions given on this page just covers the so called 'default installation', without any guarantee on security.
  • Server maintenance including upgrading, backup, performance tuning and benchmarking too are not part of this documentation.
  • There is no substitute for thinking. To most part these commands are self-explanatory. If you are in doubt, invest on building some background knowledge. These instructions are not meant to be 'Mantras' which you can cut and paste in to your command line and execute! If you do that in the best case you get an error message. The worst case could be anything. Be warnde.

Typography and conventions

    Command line dialogs are set in monotype. What you type is in bold, everything else is brought up by the command line interface (CLI). For example: $ date
    Son Feb 5 10:04:46 CET 2012
  • Command prompt:
    The CLI indicates its readiness to accept command by printing a command prompt, or simply the prompt, http://en.wikipedia.org/wiki/Command-line_interface#Command_prompt The typical prompt for a non-privileged Unix user is the $ sign, as in the example above. Don't type the prompt!

    Other CLI's have other prompts. For example the MySQL command-line tool 'mysql' shows its readiness through a 'mysql>'
    $ mysql -u moodle -p
    Enter password: [not shown]
    mysql>

    The MySQL command-line expects SQL commands. For example
    mysql> show databases;
    +--------------------+
    | Database |
    +--------------------+
    | information_schema |
    | moodle |
    +--------------------+
    2 rows in set (0.00 sec)
    mysql>

    Commands with superuser privileges
    All the commands in ths page are executed with superuser privileges. The usual convention in Ubuntu is to be logged in as a non-privileged user and prepend every command with 'sudo' http://en.wikipedia.org/wiki/Sudo (do as superuser) to give it full privileges. For example:
    $ sudo reboot
    Prepending each command with sudo would be tedious for a long list of instructions. Therefore these instructions assume that the non-privileged user has taken over a privileged shell by executing sudo with the option -i. Example:
    $ sudo -i
    [sudo] password for xxx: [not shown]
    \#

    From now on, all the commands automatically have superuser privileges:
    # reboot
  • Version history:
    • V 0.1 2012-02-10 ratna

Install the Operating System

Configure Network

Install the Web Server

Apache

Install the Database Management System

MySQL

PostgreSQL

Install PHP

PHP Core

PHP Modules

PHP CLI

Optionally, install a web-based Database Administration Tool

phpMyAdmin

pgAdmin

Install Moodle

Get the Code

tar

CVS

Git

Create the Database

Create the data directory

Run the install script

Web-based

CLI