-

Note: You are currently viewing documentation for Moodle 3.10. Up-to-date documentation for the latest stable version of Moodle may be available here: Installing Moodle using command line.

Installing Moodle using command line

From MoodleDocs
Revision as of 16:47, 23 February 2009 by chris collman (talk | contribs) (Start a new page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Moodle 2.0


Installing Moodle Using command line is just as easy as installing Moodle using web browser.

  • First Go to the moodle root directory and then to admin directory inside the moodle root. For example type:
$cd /var/www/html/moodle/admin
  • Then simply use the following syntax to run the moodle command line installer (this is a long command which has been split over 3 lines, so type as one line)
$php cliupgrade.php --lang=en --webaddr=http://www.example.com --moodledir=/var/www/html/moodle 
                    --datadir=/var/moodledata --dbtype=mysql --dbhost=localhost --dbname=moodle 
                    --dbuser=root --prefix=mdl --verbose=1 --interactivelevel=2 

More information about the options can be found using $php cliupgrad.php --help

Then you will see the following list of available options

--lang		 		Valid installed language for installation. Default is English(en)
--webaddr			Web address for the Moodle site
--moodledir			Location of the moodle web folder
--datadir			Location of the moodle data folder (should not be web visible)
--dbtype			Database type. Default it mysql
--dbhost			Database host. Default localhost
--dbname			Database name. Default is moodle
--dbuser			Database user. Default is blank
--dbpass			Database password. Default is blank
--prefix			        Table prefix for above database tables. Default is mdl
--verbose			0 No output, 1 Summarized output(Default), 2 Detailed output
--interactivelevel	        0 Non interactive, 1 Semi interactive(Default), 2 Interactive
--help				print out this help

When you choose non interactive mode without any options all the default values are assumed.