Hi folks,
I work on linux platforms and I've installed several sites using the normal install process. This has worked fine do far but I was wondering if moodle supports a command line installation using an answer file, etc.
This would be in alternative to running install.php from a browser.
I've used this technique with other software products and it has worked out well.
Thanks,
Tom
From which point in the process? Are you talking about the portion of the process where Moodle does the db setup or prior to that?
Let me first present a typical scenario (that we currently use):
When we perform installs we use cvs which is a command line tool for downloading all the moodle files. We also run mysql commands (from the command line) to set up a MySQL database (ex: moodle_db) and a database user (ex: moodle_user). Up to this point everything is command line driven which lends itself nicely to automation.
At this point in the installation transitions from command line to GUI. I enter the install.php URL into my browser: http://<myDomain>/moodle/install.php. The installer prompts for a host of inputs (some are listed below with typical values).
Language: English
Confirm PHP Settings Pass: Next
Web address: http://<myDomain>/moodle
Moodle Directory: /home/<account>/public_html/moodle
Data Directory: /home/<account>/moodledata
Type: MySQL (mysql)
Host Server: localhost
Database: moodle_db
User: moodle_user
Password:
etc ...
This continues until the install is complete ... It prompts for admin account info and front page settings before completing.
So going back to the original question - It would ideal (at least for us) if we could automate the GUI portion of the install. This would allow us to roll out sites more effeciently.
My thought was to set up an "answer" file that contained all the values for the specific for each site and then run a script to perform the install. The values would match the values for the prompts via the GUI install.
The script would be invoked something like this:
% ./install_moodle -answer_file my_answers.xml
That's it in a nutshell ...
I have a feeling that this type of capability may not exist but I wanted to pass it through the forum just as a double check.
Regards,
Tom
When we perform installs we use cvs which is a command line tool for downloading all the moodle files. We also run mysql commands (from the command line) to set up a MySQL database (ex: moodle_db) and a database user (ex: moodle_user). Up to this point everything is command line driven which lends itself nicely to automation.
At this point in the installation transitions from command line to GUI. I enter the install.php URL into my browser: http://<myDomain>/moodle/install.php. The installer prompts for a host of inputs (some are listed below with typical values).
Language: English
Confirm PHP Settings Pass: Next
Web address: http://<myDomain>/moodle
Moodle Directory: /home/<account>/public_html/moodle
Data Directory: /home/<account>/moodledata
Type: MySQL (mysql)
Host Server: localhost
Database: moodle_db
User: moodle_user
Password:
etc ...
This continues until the install is complete ... It prompts for admin account info and front page settings before completing.
So going back to the original question - It would ideal (at least for us) if we could automate the GUI portion of the install. This would allow us to roll out sites more effeciently.
My thought was to set up an "answer" file that contained all the values for the specific for each site and then run a script to perform the install. The values would match the values for the prompts via the GUI install.
The script would be invoked something like this:
% ./install_moodle -answer_file my_answers.xml
That's it in a nutshell ...
I have a feeling that this type of capability may not exist but I wanted to pass it through the forum just as a double check.
Regards,
Tom
By way of example, my webhost provides a "one Click Install" option for Moodle. All configuration options are provided via drop downs etc in a web page and then passed to the moodle install..... it then produces a nice little e-mail instructing you to log in............. so I guess the short answer to your request is yes.... However I don't know whether they have done this by hacking the moodle install file.
Thanks for the feedback - If you have any additional information on this tool/utility I would be interested in learning more about it.
Thanks,
Tom
Thanks,
Tom
In Moodle 2.0 (HEAD) we do have command line interface for upgrading Moodle. It was developed last year as part of GSOC. The script you run is called admin/cliupgrade.php
The docs need updating:
http://docs.moodle.org/en/Student_projects/Enterprise-level_improvements#Moodle_CLI_installer
http://cvs.moodle.org/moodle/admin/cliupgrade.php?view=log
http://tracker.moodle.org/browse/MDL-10267
This all won't help you too much because Moodle 2.0 is currrently experiencing a lot of major work and is still unstable. But it is coming!
If you're keen, you could probably backport that work to 1.9.
The docs need updating:
http://docs.moodle.org/en/Student_projects/Enterprise-level_improvements#Moodle_CLI_installer
http://cvs.moodle.org/moodle/admin/cliupgrade.php?view=log
http://tracker.moodle.org/browse/MDL-10267
This all won't help you too much because Moodle 2.0 is currrently experiencing a lot of major work and is still unstable. But it is coming!
If you're keen, you could probably backport that work to 1.9.
Thanks for passing that information along Martin - That's exactly what I was interested in.
Regards,
Tom
Regards,
Tom