
The provided values are then used as the default values during the interactive session. The parameters can be passed in the interactive mode, too. In non-interactive mode, you must provide all required data as the script parameters and then the new site is installed silently.
Putty commands install#
In interactive mode, the install script asks you for all data needed to properly set up new Moodle site. There are two modes of installing Moodle from the command line. $ sudo -u apache /usr/bin/php admin/cli/maintenance.php -disable $ sudo -u apache /usr/bin/php admin/cli/maintenance.php -enable
Putty commands how to#
See the following procedure how to upgrade your site within several seconds to the most recent version while preserving your eventual local customizations tracked in git repository: Upgrading via command line is a very comfortable way of Moodle upgrade if you use Git checkout of the Moodle source code (see Git for Administrators). $ sudo -u apache /usr/bin/php admin/cli/upgrade.php Also, the script does not backup any data (if you read this page, you probably have some own scripts to backup your moodledata and the database, right?) The script itself does not put the site into the maintenance mode, you have to do it on your own. As with the installation script, there is either interactive or non-interactive mode of the upgrade. Moodle can be upgraded from the command line.

Typical values may be apache, www-data or httpd. The particular value depends on your OS distribution and local set-up. Examples on this page use the apache user for illustration. Note: These scripts are supposed to be run under the identity of the web server user. $ sudo -u apache /usr/bin/php admin/cli/install.php -help Most of the scripts accept common -help (or -h) parameter to display the full usage information, for example: $ sudo -u apache /usr/bin/php admin/cli/somescript.php -params As a root, you will probably want to execute Moodle CLI scripts like this: In Linux distributions, the user that runs the web server is usually apache or www-data or httpd or something similar. It is especially important for CLI installation and upgrade as they create new files in moodledata directory and the web server has to have write access to them. To avoid problems with access control, you should run them as the owner of the web server process.

Other plugins may provide CLI functionality via scripts in their own cli folder. Core admin CLI tools are located in the admin/cli/* folder. If you have shell access to your web server, you may find various CLI (command line interface) scripts useful during Moodle administration. 9 Converting to the new character set and collation.

