Note: You are currently viewing documentation for Moodle 1.9. 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
(New page: This install option will be useful for someone who is doing a new install on an ubuntu server install. We are assuming that 1) You have done your ubuntu install. 2) You have used apt-get ...)
 
No edit summary
Line 1: Line 1:
This install option will be useful for someone who is doing a new install on an ubuntu server install. We are assuming that  
This install option will be useful for someone who is doing a new install on an ubuntu server install. We are assuming that  
1) You have done your ubuntu install.
1) You have done your ubuntu install.
2) You have used apt-get update and apt-get upgrade to get the latest version.
2) You have used apt-get update and apt-get upgrade to get the latest version.
Line 5: Line 6:
4) You have not enabled the root account and do not want to do that.  
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.
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.


First,  
First, from the terminal type


           sudo apt-get install moodle
           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.
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.


If you are using a remote terminal then it needs to be an reasoably 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.  
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).
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).
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
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
/etc/init.d/apache2 restart
and you should be able to access the moodle from other hosts.
You are now done.
One big advantage of doing this install is that the moodle will be maintained by
         
          sudo apt-get upgrade.
The installation is actually rather better thought out than many installs. For example the apache2 conf file is nicely done.
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
This moodle install was done 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).

Revision as of 14:54, 28 August 2008

This install option will be useful for someone who is doing a new install on an ubuntu server install. 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.

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.

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).

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

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

/etc/init.d/apache2 restart

and you should be able to access the moodle from other hosts.

You are now done.


One big advantage of doing this install is that the moodle will be maintained by

         sudo apt-get upgrade.

The installation is actually rather better thought out than many installs. For example the apache2 conf file is nicely done.

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


This moodle install was done 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).