A script that sets up a Moodle development environment in Ubuntu
Disclaimer: This is only meant for use on development and testing environments. Do NOT use this for production environments!
-
Download and install Ubuntu Desktop.
- If you're setting up an Ubuntu virtual machine using VirtualBox, follow these instructions.
-
Open a terminal and install
git
sudo apt update && sudo apt install -y git
-
Clone this repository.
git clone https://github.com/junpataleta/moodle-ubuntu.git cd moodle-ubuntu
- Note: If you're using VirtualBox, this is a good point to take a snapshot of the machine first, so it would be easier to reset in case you need to reinstall when the setup script gets updated in the future.
-
Copy
config-dist.sh
toconfig.sh
and edit the Git-related or MDK-related settings inconfig.sh
. -
Run the script
./setup.sh
-
Grab some coffee, walk the dog, cook your lunch, do the laundry, or whatever.😛
After the installation, you should have the following:
-
Apache server
-
PHP versions supported by the lowest security-supported version of Moodle and the next major Moodle version (
main
).-
PHP versions supported by currently supported versions:
- PHP 7.4
- PHP 8.0
- PHP 8.1
- PHP 8.2
- PHP 8.3 (tentative)
-
To switch PHP versions, open a terminal and run
~/apps/switchphp.sh PHPVER
wherePHPVER
is any of the installed PHP version numbers. e.g. to switch to PHP 8.1~/apps/switchphp.sh 8.1
-
-
PostgreSQL server version supported by your Ubuntu distribution.
- Username:
postgres
- Password:
moodle
- Username:
-
MySQL server version supported by your Ubuntu distribution.
-
MDK
- Two instances are created by MDK during setup:
- A
moodle.git
instance based on themain
branch:http://localhost/stable_main
- An
integration.git
instance based on themain
branch:http://localhost/integration_main
- A
- Default
admin
password for both instances istest
. - Default database engine is
pgsql
.
- Two instances are created by MDK during setup:
-
Behat-related stuff:
- moodle-browser-config
- Chromedriver
- Geckodriver
- Selenium
- xvfb
-
Docker with Docker compose
-
Ngrok
Enjoy!