Step-by-step Install Guide for Ubuntu using apt-get: Difference between revisions
(→Assumptions: a little wordsmithing) |
(→Allow access to your Moodle from other computers: fixed making http:// a link) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This install option will be useful for someone who is doing a new install on an ubuntu server install using | This install option will be useful for someone who is doing a new install on an ubuntu server install using APT. The Advanced packaging tool (APT) is a user interface that helps installing software on a Linux operating system. | ||
==Assumptions== | ==Assumptions== | ||
Line 48: | Line 48: | ||
sudo /etc/init.d/apache2 restart | sudo /etc/init.d/apache2 restart | ||
in the terminal. You should now be able to access the moodle from other hosts by doing http://<address of your moodle host>/moodle | in the terminal. You should now be able to access the moodle from other hosts by doing <nowiki>http://<address of your moodle host>/moodle</nowiki> | ||
==Upgrading your installation== | ==Upgrading your installation== | ||
Line 67: | Line 67: | ||
* config.php is a soft link in the /usr/share/moodle folder and actually sits in /etc/moodle | * config.php is a soft link in the /usr/share/moodle folder and actually sits in /etc/moodle | ||
The file permissions for the site and data folder are user = www-data and group = www-data. | The file permissions for the site and data folder are: | ||
* user = root, group = root for the site folder, | |||
* user = www-data and group = www-data for the data folder. | |||
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). | 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). |
Latest revision as of 14:52, 18 October 2008
This install option will be useful for someone who is doing a new install on an ubuntu server install using APT. The Advanced packaging tool (APT) is a user interface that helps installing software on a Linux operating system.
Assumptions
We assume that:
- Ubuntu is installed on the site and you have administrative rights.
- The site used the apt-get update and apt-get upgrade to get the latest version.
- The site has a typical ubuntu server edition which just gives the command line.
- The site has not enabled the root account and does not want to do that.
- The site opted to have a LAMP installed and a mailserver.
- The system administrator does not mind that the Moodle site 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.
- Tip: If you do not like the 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
sudo /etc/init.d/apache2 restart
in the terminal. You should now be able to access the moodle from other hosts by doing http://<address of your moodle host>/moodle
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.
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
The file permissions for the site and data folder are:
- user = root, group = root for the site folder,
- user = www-data and group = www-data for the data folder.
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
- Step-by-step Install Guide for Ubuntu - doing a manual installation on Ubuntu.
- Administrator documentation