Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Step-by-step Install Guide for Ubuntu using apt-get.

Step-by-step Install Guide for Ubuntu using apt-get: Difference between revisions

From MoodleDocs
No edit summary
Line 61: Line 61:


The installation is actually rather better thought out than many installs. For example the apache2 conf file is nicely done.
The installation is actually rather better thought out than many installs. For example the apache2 conf file is nicely done.
One big advantage of doing this install is that the moodle will be maintained by apt-get upgrade.


These are the file locations for a default install from apt-get
These are the file locations for a default install from apt-get

Revision as of 09:53, 29 August 2008

This install option will be useful for someone who is doing a new install on an ubuntu server install.

Assumptions

We are assuming that

  1. You have done your ubuntu install.
  2. You have used apt-get update and apt-get upgrade to get the latest version.
  3. You have a typical ubuntu server edition which just gives you the command line.
  4. You have not enabled the root account and do not want to do that.
  5. When you installed you opted to have a LAMP install and a mailserver.
  6. You do not mind that your moodle will be at the package maintainers current state which may not be in line with the latest build from the moodle site. This is very unlikely to be a problem if you are installing a new moodle.

If you do not like that last assumption Step-by-step Install Guide for Ubuntu describes how to do a manual installation of Moodle on Ubuntu.

Doing the installation

First, from the terminal type

sudo apt-get install moodle

During the process that follows you will be asked for some names and passwords for the mysql and moodle accounts. This information is used to populate the config.php file.

Notes

You can do this from a remote terminal but bear in mind that if you are using a remote terminal then it needs to be an reasonably capable one. Otherwise the installation dialog may not be able to talk to you and you will get an error which mentions the limitations of your terminal.

One terminal that does work is the X terminal on a mac. (Not the terminal program that comes with a mac in the utilities folder but the Xterm that you will have if you installed open office).

Configuration changes

Allow access to your Moodle from other computers

This moodle install will only work from the localhost. To make it accessible from other hosts you must edit the file /etc/apache2/conf.d/moodle. Type

sudo nano /etc/apache2/conf.d/moodle

(This is actually a soft link from /etc/moodle/apache.conf). This fires up the 'nano' text editor which is command line text editor and the sudo gives you the write access you need.

About 10 lines down you see the following line

#allow from all

The # indicates it is commented out, so remove the # and use CTRL+O to save the file.

Now restart apache by typing

/etc/init.d/apache2 restart

in the terminal. You should now be able to access the moodle from other hosts.

Upgrading your installation

One big advantage of installing Moodle this way is that you can upgrade it just be typing

sudo apt-get upgrade.

in a terminal.

Notes and comments

The installation is actually rather better thought out than many installs. For example the apache2 conf file is nicely done. One big advantage of doing this install is that the moodle will be maintained by apt-get upgrade.

These are the file locations for a default install from apt-get

  • moodle site is at /usr/share/moodle
  • moodle data folder is at /var/lib/data
  • config.php is a soft link in the /usr/share/moodle folder and actually sits in /etc/moodle

These instructions were written and tested on 27th August 2008 using an up to date install of ubuntu server 64 bit (hardy) on a HP Blade (Dual quad Xeon with 32G ram).

See also