Installation quick guide

This page is intended for administrators who are experienced with installing web server applications and are in a hurry to get up and running. Otherwise please see Installing Moodle.

Contents

Basic Requirements

Getting Moodle

You have two basic options:

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

. this fetches a complete copy of the Moodle repository and then switches to the 4.3 Stable branch.

See Git for Administrators for details on using Git to install Moodle code.

Note: Only download Moodle from one of the moodle.org sources. Other versions (e.g. control panel based installers, Linux distribution repositories, other "one click" installers) cannot be guaranteed to work properly, be upgradable or be supportable.

Create a database

CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodleuser'@'localhost' IDENTIFIED BY 'yourpassword';
mysql> CREATE USER 'moodleuser'@'localhost' IDENTIFIED BY 'yourpassword'; mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodleuser'@'localhost'; mysql> FLUSH PRIVILEGES;

Notes: It is important to GRANT ON moodle.* as the database name including the '.*' and not just the bare database name. Save this password you use for the Moodle user, since you will need it later in the install.

Create data directory

Install Moodle code

Configure Moodle

Install Moodle

/usr/bin/php /path/to/moodle/admin/cli/install.php

The CLI creates the config.php for you and will not run if you created one in the previous step.

Set up cron

You will need a cron job to run periodically. It is recommended that the cron is run every minute, as required for asynchronous activity deletion when using the recycle bin. A typical Unix cron entry will be as follows:

* * * * * /usr/bin/php /path/to/moodle/admin/cli/cron.php >/dev/null

Your site will not work properly unless cron is running regularly. It is very important you do not skip this step.

See Cron for details.

Congratulations!

You are now ready to use your Moodle site.

If you run into problems, check the Installation FAQ and visit the Installation help forum.

See Also