Installation via the command-line interface
Moodle provides a CLI that lets you perform several administrative tasks from the Unix shell prompt. There is no CLI for Windows-based systems. CLI-based installations are useful if you need to automate setups, for example, in an environment where you host multiple Moodle instances.
The CLI is not for the faint-hearted, so be careful when using it. You must execute the installation script as the web server user, usually
apache. You can run the installation script,
install.php, in interactive mode (you will have to enter any parameters by hand) or in non-interactive mode, where the script will run silently.
dirroot, you can initiate the interactive script as follows:
sudo –u www-data /usr/bin/php admin/cli/install.php
Something more interesting is the CLI’s non-interactive mode, as this can be used for scripting and automation purposes. A list of all the available parameters can be displayed...