Installing Moodle on Debian

Installing Moodle on Debian

by Guillermo Madero -
Number of replies: 6

I'm about to do my first Moodle installation on Debian (Squeeze). I still don't know if the client will want to have the Debian package installed (via apt-get install moodle), or will prefer having the latest 1.9.13 version installed.

I've already read the documentation at: http://docs.moodle.org/20/en/Debian_GNU/Linux_installation, however it seems a bit unclear about some points.

1. Would it be adviceable to install the .tgz file (as it would not be consistent with other Debian packages -mentioned on: http://docs.moodle.org/20/en/Step-by-step_Installation_Guide_for_Ubuntu)?

2. Will the Moodle installer create the database and the moodledata directory (¿where will it create it?), or is it best to create them beforehand (which is what I usually do on Windows).

3. If I were to create the moodledata directory, ¿where would it be best to locate it? The Moodle-Debian page (under the section "Installing Moodle from CVS") says to create it under /var/www, however, ¿wouldn't this put it under the web site root directory?

Any pointers about security, permissions and/or configurations would be welcome (maybe a good step-by-step guide).

Thanks beforehand.

Average of ratings: -
In reply to Guillermo Madero

Re: Installing Moodle on Debian

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Guillermo

> I still don't know if the client will want to have the Debian package installed (via apt-get install moodle),

"Don't be tempted to use the packaged version of Moodle though. Always download Moodle from here. http://download.moodle.org/"
http://moodle.org/mod/forum/discuss.php?d=154571#p677762

> 1. Would it be adviceable to install the .tgz file (as it would not be consistent with other Debian packages -mentioned on: http://docs.moodle.org/20/en/Step-by-step_Installation_Guide_for_Ubuntu ?

Assuming you've decided against the packaged version why don't you get it directly through CVS http://docs.moodle.org/en/CVS_for_Administrators ? Will make upgrades and porting any local code changes much easier.

> 2. Will the Moodle installer create the database and the moodledata directory (¿where will it create it?), or is it best to create them beforehand (which is what I usually do on Windows).

No it won't. You have to create them beforehand.

> 3. If I were to create the moodledata directory, ¿where would it be best to locate it? The Moodle-Debian page (under the section "Installing Moodle from CVS") says to create it under /var/www, however, ¿wouldn't this put it under the web site root directory?

/var is generally for "Contains variable data like system logging files, mail and printer spool directories, and transient and temporary files." http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/var.html Debian has in its default installation /var/www as the Apache DocumentRoot. The document you mentions puts Moodle code in /var/www/moodle and moodledata in for example /var/www/moodledata. In this case you set DocumentRoot to /var/www/moodle, that way your site is "out of danger". You URL then be http://server.dns.name and not http://server.dns.name/moodle.

> Any pointers about security, permissions and/or configurations would be welcome (maybe a good step-by-step guide).

Security is a "moving target". Don't get too much involved in security at the beginnng, that'll block your progress - "don't lock the doors before you finish the house". The starting point for Moodle is http://docs.moodle.org/en/Security
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Installing Moodle on Debian

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The only think I would add is consider using Git rather than CVS if it's all new to you anyway...

http://docs.moodle.org/20/en/Git_for_Administrators
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Installing Moodle on Debian

by Guillermo Madero -

Yes, I've neither actually used CVS and git. As the admin of my own installations (both on shared servers and on my computer -winxp) I always upgrade Moodle code by hand.

As a developer, many years ago, when working with Xenix, I used to use SCCS for versioning control, but then again, that was long ago smile

Maybe for some of my clients it would be interesting to have their Moodle code being automatically upgraded via git. I assume it would be Ok to start with a "normal" installation and then, after getting familiar with git, then start using it (if they feel inclined to do so).

Thanks for your answer.

In reply to Visvanath Ratnaweera

Re: Installing Moodle on Debian

by Guillermo Madero -

Thanks very much, your comments have helped me to set things a bit straight smile

If using the packaged versions (I assume from either Debian, Ubuntu, etc.), was at some point the best course of action, but not any more, then it seems that the related documentation pages needs some updating, hehe.

I'm actually familiar with security (and I agree with you about being a "moving target"), though it's been really too long since I worked with *nix environments, and back then I didn't have to deal with Web things.

Once, again, thanks for your answer.

In reply to Guillermo Madero

Re: Installing Moodle on Debian

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Guillermo

> If using the packaged versions (I assume from either Debian, Ubuntu, etc.), was at some point the best course of action, but not any more, then it seems that the related documentation pages needs some updating, hehe.

You are right. See http://docs.moodle.org/20/en/Talk:Step-by-step_Installation_Guide_for_Ubuntu. Moodle docs are still "under construction" http://moodle.org/mod/forum/discuss.php?d=176065.

> though it's been really too long since I worked with *nix environments, and back then I didn't have to deal with Web things.

If you were familiar with a command interface, whether Xenix, VMS or even DOS, you'll catch up the modern *nixes easily.
In reply to Visvanath Ratnaweera

Re: Installing Moodle on Debian

by Guillermo Madero -

Yes, I actually started during the DOS era, when BASIC was still an interpreted language, CPU speed was like 4 MHz and RAM, well, we know how scarce was RAM back then. Years later I was fortunate enough to work with other OS.

Have a great day.