$ sudo apt-get install tasksel
$ sudo tasksel install lamp-server
Create a mysql database
$ mysql> CREATE DATABASE moodel;
Create a mysql user
$ mysql> GRANT ALL PRIVILEGES ON moodel.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
After installing a copy of Moodle for development, the first thing you should do is:
- Go to Site administration -> Development -> Debugging
- Set Debug messages to DEVELOPER, and Turn on Display debug messages. (Consider turning on some of the other options too.)
- In the administration block, search for "Cache" then
- Turn off Cache all language strings.
- Set Text cache lifetime to No
- Turn on Theme designer mode
Immediately after the installation, set your name and contact e-mail. The name and e-mail will become part of your commits and they can't be changed later once your commits are accepted into the Moodle code. Therefore we ask contributors to use their real names written in capital letters, eg "John Smith" and not "john smith" or even "john5677".
git config --global user.name "Your Name" git config --global user.email email@example.com
Unless you are the repository maintainer, it is wise to set your Git to not push changes in file permissions:
git config --global core.filemode false
Then register the upstream remote:
cd moodle git remote add upstream git://git.moodle.org/moodle.git
Then use following commands to keep the standard Moodle branches at your Github repository synced with the upstream repository. You may wish to store them in a script so that you can run it every week after the upstream repository is updated.
#!/bin/sh git fetch upstream for BRANCH in MOODLE_19_STABLE MOODLE_20_STABLE MOODLE_21_STABLE MOODLE_22_STABLE MOODLE_23_STABLE MOODLE_24_STABLE master; do git push origin refs/remotes/upstream/$BRANCH:$BRANCH done