https://docs.moodle.org/37/en/api.php?action=feedcontributions&user=Phr&feedformat=atomMoodleDocs - User contributions [en]2024-03-28T19:47:35ZUser contributionsMediaWiki 1.39.6https://docs.moodle.org/37/en/index.php?title=Pedagogy&diff=24582Pedagogy2007-06-24T04:28:14Z<p>Phr: /* Finding a balance */</p>
<hr />
<div>Let's sit back and really reflect on the pedagogy that is at the core of what we, as online educators, are trying to do.<br />
<br />
==Moodle in three short paragraphs==<br />
<br />
The heart of Moodle is courses that contain activities and resources. There are about 20 different types of activities available (forums, glossaries, wikis, assignments, quizzes, choices (polls), scorm players, databases etc) and each can be customised quite a lot. The main power of this activity-based model comes in combining the activities into sequences and groups, which can help you guide participants through learning paths. Thus, each activity can build on the outcomes of previous ones.<br />
<br />
There are a number of other tools that make it easier to build communities of learners, including blogs, messaging, participant lists etc, as well useful tools like grading, reports, integration with other systems and so on.<br />
<br />
For more about Moodle, see http://moodle.org, and particularly the main community “course” called [http://moodle.org/course/view.php?id=5 Using Moodle]. It's crowded and busy these days, but jump in and you'll soon find interesting stuff I'm sure. The developers and the users are deliberately forced to mix in the same forums. The other great place to start is our [https://docs.moodle.org/ online documentation] which is a community-developed wiki site.<br />
<br />
==Social Constructionism as a Referent==<br />
<br />
I have these five points on a slide which I use in every presentation I do. They are useful referents taken from research that apply to education in general, boiled down into a simple list that I carry around under the moniker of "social constructionism".<br />
<br />
# '''All of us are potential teachers as well as learners - in a true collaborative environment we are both'''.<br /><br /> It's so important to recognise and remember this.<br /><br /> I think this perspective helps us retain some humility as teachers and fight the (very natural!) tendency to consolidate all your history and assume the revered position of “wise source of knowledge”.<br /><br /> It helps us keep our eyes open for opportunities to allow the other participants in our learning situation to share their ideas with us and to remind us to listen carefully and ask good questions that elicit more from others.<br /><br /> I find I need to constantly remind myself of this point, especially when the culture of a situation pushes me into a central role (like now!)<br /><br /><br />
# '''We learn particularly well from the act of creating or expressing something for others to see.'''<br /><br /> For most of us this is basically “learning by doing”, and is fairly obvious, yet it's worth reminding ourselves of it. <br /><br /> It's surprising how much online learning is still just presenting static information, giving students little opportunity to practice the activities they are learning about. I often see online teachers spending a great deal of time constructing perfect resources for their course, which no doubt is a terrific learning experience for them, but then they deny their students that same learning experience. Even textbooks often do a better job, with exercises after every chapter and so on.<br /><br /> Most importantly, such learning is best when you are expressing and presenting posts, projects, assignments, constructions etc '''for others to see'''. In this situation your personal “stakes” are a lot higher, and a lot of self-checking and reflection takes place that increases learning. Seymour Papert (the inventor of logo) famously described the process of constructing something for others to see as a very powerful learning experience, and really this sort of thinking goes right back to Socrates and beyond.<br /><br /><br />
# '''We learn a lot by just observing the activity of our peers'''.<br /><br /> Basically this is about “classroom culture”, or learning by osmosis. Humans are good at watching each other and learning what to do in a given situation though cues from others. <br /><br /> For example, if you walk into a lecture theatre where everyone is sitting in seats, facing the front, listening quietly to the teacher at the front and taking notes, then that's most likely what you are going to do too, right?<br /><br /> If you are in a less rigid class where people are asking questions all the time, then it's likely you'll feel freer to do so too. By doing so you'll be learning about both the subject itself and the meta-subject of how learning occurs from overhearing the discussions of your peers and the kinds of questions that get asked, leading to a richer multi-dimensional immersion in learning.<br /><br /><br />
# '''By understanding the contexts of others, we can teach in a more transformational way (constructivism)'''<br /><br /> As you probably know from experience, advice from a mentor or friend can provide better, more timely and customised learning experience than with someone who doesn't know you and is speaking to a hundred people.<br /><br /> If we understand the background of the people we are speaking to then we can customise our language and our expression of concepts in ways that are best suited to the audience. You can choose metaphors that you know the audience will relate to. You can use jargon where it helps or avoid jargon when it gets in the way.<br /><br /> Again this is a pretty basic idea - every guide to public speaking talks about knowing your audience - but in online learning we need to be particular mindful of this because we often have not met these people in person and don't have access to many visual and auditory cues.<br /><br /><br />
# '''A learning environment needs to be flexible and adaptable, so that it can quickly respond to the needs of the participants within it'''.<br /><br /> Combining all the above, if you as a learning facilitator want to take advantage of your growing knowledge about your participants, giving them tailored opportunities to share ideas, ask questions and express their knowledge, then you need an environment which is flexible, both in time and space.<br /><br /> If you discover that you need to throw your schedule out the window because your participants know a lot less than you'd expected when you first designed the course, you should be able to readjust the schedule, and easily add new activities to help everyone (or just one group) catch up. Likewise, some great ideas for a simulation or something may have come up during discussions, so you should be able to add those later in the course.<br /><br /> Timewise, your participants may be spread over different timezones, or maybe they live in the same timezone but have differing free time, so you should be able to offer asynchronous activities where people can work together but at different times.<br /><br /><br />
<br />
Jason Cole from Open University recently referred to these as “Martin's five laws” (ha!) but really they are referents: guiding concepts that I personally find useful to refer to whenever I need to make a decision in any given educational situation. In particular I find them useful for building '''communities of learners'''.<br />
<br />
I guess you probably find a lot of this familiar, even if you use different terms. If not there is a lot of research about constructionism, constructivism and social Constructionism which you can find out more about in some of [http://dougiamas.com/writing/ my more formal papers].<br />
<br />
==How Moodle tries to support a Social Constructionist view==<br />
<br />
I'm going to go through the earlier list again, this time pointing out existing features in Moodle. Pedagogy and software design are closely intertwined in online learning - the "shape" of the software can help or hinder the teacher in what they are trying to do.<br />
<br />
# '''All of us are potential teachers as well as learners - in a true collaborative environment we are both'''<br /><br /> Many of the activities in Moodle are designed to allow students to control common content, such as forums, wikis, glossaries, databases, messaging and so on. This encourages students to add to the total course experience for others.<br /><br /> In Moodle 1.7 we've made a huge step of a whole new Roles implementation which further breaks down the distinction of teachers and students, allowing Moodle system administrators and teachers to create new roles with any mix of capabilities they like. If you want students to be allowed to facilitate forums, create quiz questions or even control the course layout then you can. There is a very fine degree of control – for example you can allow students the ability to delete posts in just one single forum if you like.<br /><br /> I hope that people will take these new features and experiment with control in their courses, allowing students more flexibility to do things that were previously thought of as something teachers should do.<br /><br /><br />
# '''We learn particularly well from the act of creating or expressing something for others to see'''<br /><br /> Moodle has a wide range of ways in which people can create representations of their knowledge and share them.<br /><br /><br />
#* The course structure itself is terrific way to construct a shared and active representation of the learning journey that everyone is going through.<br />
#* Forums of course are the core of this, providing spaces for discussion and sharing of media and documents (using the media plugin filters, attachments or simply links).<br />
#* Wikis are collaboratively-built pages useful for group work and other negotiations.<br />
#* Glossaries are collaboratively-built lists of definitions that can then appear throughout the course.<br />
#* Databases are an extension of this idea allowing participants to enter structured media of any type (for example a collection of digital photos or a library of references). <br /><br /><br /><br />
# '''We learn a lot by just observing the activity of our peers'''<br /><br /> The participants page is the main place where you can see everyone in your course. It shows a lot of information about your participants and how recently they've been there.<br /><br /> An Online Users block is the best way to see everyone else who might be on right now.<br /><br /> The Recent Activity block shows a great deal of information about what has happened recently, and via link you can see reports with more detail. Things that happened not only include changes to the course and forum posts, etc, but also things like assignment submissions and quiz attempts. Students can't see the results that other students got from these activities, but they do get some sense that everyone is submitting Assignment 1 now and this peer pressure hopefully helps those who need it.<br /><br /> Finally, almost all the modules will "tag" an entry or change with the name of the user, so that you can see who did what and when. For example, wiki pages all have a history link with full details on every edit.<br /><br /><br />
# '''By understanding the contexts of others, we can teach in a more transformational way (constructivism)'''<br /><br /> There are many different ways to find out about people. Access to these can be decided on a site basis (different sites have different privacy policies): <br /><br /><br />
#* The user profile contains several fields where people can provide information about their background, etc. In particular there is a user profile photograph, which appears throughout Moodle whenever that person writes something. The photo links back to the profile page.<br />
#* A compendium of forum posts (and discussion starters) by that person in that course (or across the site).<br />
#* Individual blogs allow people to express things in a public but reflective way, often providing access to thinking that might not normally expressed in, say, a forum.<br />
#* Overall activity reports show all the contributions from a user in a course, including assignment submissions, glossary entries, etc.<br />
#* User log reports show detailed logs of every action taken by a person in Moodle, as well as graphs showing overall activity statistics.<br />
#* The survey module provides a variety of proven questionnaire instruments for discovering interesting information about the state of mind of the group.<br /><br /><br />
# '''A learning environment needs to be flexible and adaptable, so that it can quickly respond to the needs of the participants within it'''<br /><br /><br />
#* The course page itself is the main tool for a teacher, allowing them to add/remove and structure activities as necessary. Changing the course is one button click away at any time, so the teacher can change it on a whim. In Moodle 1.7 we have now added AJAX features, so that activities, sections and blocks can all be simply dragged-and-dropped.<br />
#* The roles in Moodle 1.7 can be applied individually in every context across the site, and can be further tweaked with overrides. So if you want to create one single quiz where everyone has access to everybody's results, or allow parents of students to see parts of your course, then you can.<br />
#* Navigation around the course and site is automatically generated.<br />
#* The gradebook is automatically maintained, and reflects the activities in the course at any given time.<br />
#* There are preferences for many aspects of appearance and behaviour, at site, course and activity levels, allowing educators to fine-tune the behaviour of Moodle in many ways.<br />
#* External systems can be integrated easily, to maintain authentication, enrolments and other things, allowing Moodle to react smoothly as data in other systems is modified. <br /><br />
<br />
==Finding a balance==<br />
<br />
Before I talk about about where we are going, let me talk a little about the balance that a Course Management System (aka VLE) like Moodle needs to achieve. One thing I found out quickly in a community like ours is that people have a wide range of expectations of online learning.<br />
<br />
At the fascist extreme there are those who want students to be highly controlled: reading resources that are revealed at set times and later sitting quizzes to prove they read those resources. I call this the rat-in-the-maze approach, or dump-and-pump.<br />
<br />
At the techno-hippy end of that spectrum there are those who want to devolve management completely, with every user running their own portfolio site, streaming blogs and files to each other using RSS and trackbacks. It's an interesting dream that really opens up thinking about education but I think the problems to be solved are many (such as security, accountability, the structure of institutions etc).<br />
<br />
The vast majority of people that I meet fall somewhere between these two extremes. Many of them are new to online learning, and are looking for the next step beyond what they were being paid to do offline, while being accepting of gentle guidance to improving their online techniques. These people are on a steep learning curve already without facing the aggregation of 100 different blogs.<br />
<br />
Moodle needs to be flexible to cater for a wide variety of needs while remaining simple enough for ordinary teachers to start making good use of the power of the internet for community building and collaborative learning. My hope is that Moodle can be seen as a toolbox where they can start simply and naturally, and then progress to more and more advanced community facilitation over time.<br />
<br />
==Where Moodle can do better and what we're doing about it==<br />
<br />
Keeping in mind the theme of this paper and the conference stream, here are a few of the upcoming plans for things that are more related to pedagogy:<br />
<br />
===Repository===<br />
<br />
Currently only teachers can upload and manage '''collections''' of files into Moodle, using the Files tool in each course. There is no easy way to share files between courses, and no way for ordinary users to keep a portfolio, say.<br />
<br />
This is changing by early next year with the addition of a Repository API (developed by Open University) that will allow Moodle to use any external repository as a place to store, browse and view files. Special-purpose repositories are a growing area, and it means institutions can keep their valuable data where they want to, even if they switch front-end systems like VLEs.<br />
<br />
Most importantly, this will make the development of e-Portfolios much easier, and these are something I think a lot of us really want to see as a very positive pedagogical enhancement.<br />
<br />
===Community Hubs===<br />
<br />
We want to improve the way teachers and users of Moodle communicate with each other, not only about e-learning and Moodle, but also in their subject areas. For example, imagine a Biology 101 teacher finding a "community" button in their course, taking them straight to a place where their peers are all discussing best practice for teaching Biology 101, sharing and browsing repositories of course materials and learning designs.<br />
<br />
A major focus for Moodle 2.0 is the creation of networking between Moodles, allowing anyone to turn their Moodle site into a Moodle Community Hub. Login between Moodles will be transparent but secure and fully controlled by site administrators. The peer-to-peer nature of the design will allow all sorts of interesting scenarios to develop.<br />
<br />
===Better interaction between tools===<br />
<br />
Currently Moodle already sends an email as notification of a lot of different types of events, but it can be difficult to manage. By piping all the messaging from throughout the system via the Messaging module that we already have, users will have a much finer control over exactly what sorts of messages they want to see. We can also allow email to come back into Moodle.<br />
<br />
Similarly, we'll be integrating the existing blogging much more tightly with the whole system, by adding "blog this" buttons everywhere that allow users to capture and comment on items of interest.<br />
<br />
===Metadata and outcome statements===<br />
<br />
Currently Moodle courses need to be manually connected to state learning standards. In many places of the world such reporting is mandatory, so it can take a lot of time.<br />
<br />
The plan for Moodle 2.0 is to include a mechanism so that:<br />
<br />
# admins can import a long list of outcome statements (as tags)<br />
# teachers can relate a subset of these to their course<br />
# teachers can connect each activity to an even smaller subset<br />
<br />
This helps course design by providing teachers with a tool to ensure the requirements for the course are being met, while also providing much better reporting for admins and students on what has been achieved.<br />
<br />
===Role-playing and scenario simulations===<br />
<br />
A popular and effective technique in face-to-face teaching is that of role-playing in scenarios, and this can be difficult to do online. You could imagine an Environmental Science course running a role-playing simulation where some students play the government, some as Greenpeace, some as industry for a particular scenario.<br />
<br />
The plans for this have been around for a long time, but I hope it can be developed soon. It would be a module where people can be assigned roles within a simulated situation and appear to others anonymously in those roles, interacting in forums, wikis, and all the other tools in Moodle according to the rules of the simulation.<br />
<br />
===Accessibility===<br />
<br />
We've spent a lot of effort making Moodle work well for those with disabilities, but we still don't have full certification against international standards. This is the major focus for Moodle 1.8, to be released in very early 2007.<br />
<br />
==What else would you like to see?==<br />
<br />
I hope this has stimulated some thoughts about the sorts of things you would like to see in your ideal online learning environment. If so, please join in with the discussions on http://moodle.org and let's brainstorm them a bit. I hope we can come up with some new ideas to put in the [http://tracker.moodle.org Moodle Tracker], or at least some support or modifications for old ones.<br />
<br />
[[fr:Pédagogie]][[es:Pedagogia]][[ru:Педагогика]]</div>Phrhttps://docs.moodle.org/37/en/index.php?title=Windows_installation&diff=24238Windows installation2007-06-16T02:33:30Z<p>Phr: /* See also */</p>
<hr />
<div>==Installation Packages==<br />
If you are running a small (less than 30 users) Moodle server or just want to test Moodle on your Windows XP PC, pre-built packages are available for you to use. Here are links to pages containing step-by-step instructions for installing Moodle using install packages:<br />
<br />
*[[Complete install packages]] for most Windows versions<br />
<br />
*[[Installing_AMP#Windows| This section has a quick]] way to install a complete package on a Windows XP machine<br />
<br />
*[[Windows installation using XAMPP|Installation guide for Windows using XAMPP]] in case you want to retrofit<br />
<br />
*[[Installation guide for Windows using EasyPHP]]<br />
<br />
*[[Installation guide - Moodle for Windows on a USB Memory Stick]]<br />
<br />
== Manual Installation ==<br />
For medium to large installations (e.g. a college, university or business), it is best practice to install Moodle on your server manually. <br />
<br />
* '''Plan your system capacity'''. This involves estimating the appropriate hardware to support the number of users in your organisation. See [[Installing Moodle]] in the How Many Users section for a method of doing this.<br />
* '''Install your database server'''. You have a choice of [http://dev.mysql.com/downloads/ MySQL] (recommended), [[Installing MSSQL for PHP | Microsoft SQL Server 2005]] (only for Moodle 1.7 or later) or Oracle.<br />
* '''Install PHP'''. See [http://www.peterguy.com/php/install_IIS6.html How to install PHP 5.x on Windows Server 2003 with IIS 6] for instructions.<br />
* '''Install your web server'''. You have several choices - the decision as to which one to use will depend on your in-house expertise and your required level of sustainability:<br />
**Apache 2 is recommended as the most tested and popular for Moodle installations. See these instructions for [[Installing Apache on Windows |manually installing Apache 2 on Windows]].<br />
**IIS 6 can also be used. See the Windows forum for guidance on installation and, in particular, permission settings for using Moodle with IIS.<br />
**Other webservers are known to install on Windows, e.g. Lighttpd, so you may wish to experiment with these if available memory is low on your server.<br />
* '''Install Moodle''' by getting the standard installation for Moodle from [http://download.moodle.org/ http://download.moodle.org/] and read [[Installing Moodle]] which has detailed generic information.<br />
* '''Setup backups'''. Once Moodle is setup and configured, you should setup backups of the system in case of failure or loss of data. <br />
** '''To perform full site backups''' you need to backup the moodledata and moodle directories, Apache webserver configuration (httpd.conf) if you're using Apache, PHP configuration (php.ini) and any php extensions which are non-standard, and the mysql database. To do this use the integrated backup program (Start -> All Programs -> Accessories -> System Tools -> Backup) or your own proprietary backup software (e.g. BackupExec). To backup your mysql database see the [[Backup FAQ]].<br />
** '''To perform course backups''' see the [[Course backup]] page.<br />
** You should also perform a '''state backup''' of the [http://technet2.microsoft.com/WindowsServer/en/library/921f0ed5-523d-48ac-8825-e850b0e548841033.mspx?mfr=true server] or [http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntbackup_backup_sysstate.mspx?mfr=true PC]. This is especially important if you're using IIS as this will backup the IIS metabase. <br />
* '''Check your server security and performance'''. It is also good practice to read the [[Performance]] and [[Security]] documentation. Although much of the content is targetted at Linux/Unix users, there is a growing amount for Windows systems.<br />
* Set-up your '''Active Directory authentication'''. You can use the standard [[LDAP authentication]] which prompts users with a username/password, or [[NTLM authentication | integrated NTLM authentication]] which does not require campus users to enter their credentials.<br />
<br />
== See also ==<br />
<br />
* [http://moodle.org/mod/forum/view.php?id=6799 Windows-based server forum] is the main forum for asking questions about your Moodle Windows installation.<br />
* [[Installing APC in Windows]] contains instructions for using a PHP accelerator to reduce processor load.<br />
* [[Cron | Installing Cron on Windows]] for setting up the Moodle scheduled task.<br />
* [[Configuring aspell on Windows 2003 Server]] for setting up the Moodle spell checker.<br />
* [http://moodle.org/mod/forum/discuss.php?d=56835 Running Apache and IIS on the same server] forum discussion.<br />
* [http://moodle.org/blog/index.php?userid=212926&courseid=55 A Windows installation log.]<br />
<br />
[[Category:Administrator]]<br />
[[Category:Installation]]</div>Phrhttps://docs.moodle.org/37/en/index.php?title=Installing_Moodle&diff=20843Installing Moodle2007-02-27T22:44:38Z<p>Phr: /* Creating an empty database */</p>
<hr />
<div>'''Firstly don't panic! :-)'''<br />
<br />
This guide explains how to install Moodle for the first time. For some of these steps it goes into a lot of detail to try and cover the majority of possible web server setups, so this page may look long and complicated. Don't panic, once you know how to do it you can install Moodle in minutes!<br />
<br />
If you have problems please read this page carefully - most common issues are answered in here. If you still have trouble, you can seek help from the Moodle community via [http://moodle.org/course/view.php?id=5 moodle.org Using Moodle].<br />
<br />
Another option is to contact a [http://moodle.com/hosting/ Moodle Partner providing Moodle hosting] who can completely maintain Moodle for you, so that you can ignore all this and get straight into educating!<br />
<br />
If you want to run Moodle on your own computer and this page looks a bit daunting, then please see our guides: [[Installing AMP |Installing Apache, MySQL and PHP(AMP)]] or [[Complete install packages| how to install one of Moodle's complete packages]]. They provide alternative instructions to install all this on most popular platforms.<br />
<br />
==Requirements==<br />
<br />
Moodle is primarily developed in Linux using [[Apache]], [[MySQL]] and [[PHP]] (also sometimes known as the LAMP platform), but is also regularly tested with Windows XP/2000/2003 (WAMP), Solaris 10 (Sparc and x64), Mac OS X and Netware 6 operating systems. Support for PostgreSQL, Oracle and Microsoft SQL Server is also available.<br />
<br />
The requirements for Moodle are as follows:<br />
<br />
* Hardware (unless you are using a hosted server). <br />
** Disk space: 160MB free (min). You will require more free space to store your teaching materials.<br />
** Memory: 256MB (min), 1GB (recommended). The general rule of thumb is that Moodle can support 50 ''concurrent'' users for every 1GB of RAM, but this will vary depending on your specific hardware and software combination. <br />
* Software<br />
** Web server software. Most people use [[Apache]], but Moodle should work fine under any web server that supports [[PHP]], such as [[IIS]] on Windows platforms. PHP does impose requirements on versions of web servers, however these are complex and the general advice is to use the newest version possible of your chosen web server. <br />
** PHP scripting language. (Please note that there have been issues installing Moodle with [http://www.php-accelerator.co.uk PHP-Accelerator]). There are currently two versions (or branches) of PHP available: PHP4 and PHP5.<br />
*** For Moodle 1.4 or later, PHP4 (version 4.1.0 or later) or PHP5 (version 5.1.0 or later) are supported.<br />
*** For Moodle version 1.6 or later, the PHP4 (version 4.3.0 or later) or PHP5 (version 5.1.0 or later) are supported. <br />
*** Future Moodle versions 2.0 or later will not support PHP4 and will require PHP5 (version 5.1.0 or later).<br />
** A working database server: [[MySQL]] or [[PostgreSQL]] are completely supported and recommended for use with any version of Moodle. Support for Microsoft SQL Server and Oracle has been added in Moodle 1.7. MySQL is ''the'' choice for many people because it is very popular, but there are some [[Arguments in favour of PostgreSQL|arguments in favour of PostgreSQL]], especially if you are planning a large deployment. <br />
*** For Moodle 1.5 or later, MySQL (version 3.23 or later) or PostgreSQL (7.4 or later). <br />
*** For Moodle 1.6 or later, MySQL (version 4.1.12 or later or PostgreSQ: (7.4 or later).<br />
*** '''Notes''': For Moodle 1.6 or later, If you use latin languages only you can use MySQL 4.1.12. If you are using non-latin languages you require MySQL 4.1.16 or later. Currently the MySQL setting "strict mode" should be OFF (set to "" or "MYSQL40") in the MySQL configuration file. The minimum version of PostgreSQL is 7.4 and it is widely used with 8.0 and 8.1. The minimum version of Microsoft SQL Server is 2005 (version 9). There has also been [http://moodle.org/mod/forum/discuss.php?d=59284 some success] with SQL Server Express 2005. <br />
* Additional PHP requirements<br />
** PHP Settings<br />
*** Safe mode needs to be OFF (check in your php.ini or Apache configuration file).<br />
*** The setting ''memory_limit'' to be at least 16M (32M is recommended for Moodle 1.7 or later).<br />
*** The PHP setting ''session.save_handler'' needs to be set to files. <br />
** PHP Extensions and libraries<br />
*** The mbstring extension is required for multi-byte string handling.<br />
*** The iconv extension is also recommended for Moodle 1.6 or later.<br />
*** [http://www.boutell.com/gd/ GD library] and the [http://www.freetype.org/ FreeType 2] library and extensions are needed to be able to look at the dynamic graphs that the logs pages make.<br />
*** The mysql extension is required if you are using the MySQL database. Note that in some Linux distributions (notably Red Hat) this is an optional installation.<br />
*** The pgsql extension is required if you are using the PostgreSQL database.<br />
*** The zlib extension is required for zip/unzip functionality.<br />
*** Other PHP extensions may be required to support optional Moodle functionality, especially external authentication and/or enrolment (e.g. LDAP extension for LDAP authentication and the sockets extension for Chat server).<br />
<br />
'''Note if you are using a hosted account''': Most web hosts support all of these requirements by default. You should contact your web host's support desk to check that this is the case '''before''' signing-up with them. If you are already signed up with one of the few web hosts that does not support these features ask them why, and consider taking your business elsewhere if they do not change.<br />
<br />
== How many users? ==<br />
<br />
In addition to the hardware and software requirements, you will also need to think about the capacity of your Moodle installation in terms of the number of users it can handle. There are two numbers to plan for:<br />
<br />
* '''Browsing users''': the maximum number of users able to browse your Moodle site. This is the number of computers in your organization or on your course (whichever is greater).<br />
* '''Concurrent database users''': the maximum number of concurrent database users (needed for Moodle activities such as quizzes). This is the number of users who will be using Moodle at the same time. In an educational institution, use your timetable/roster to obtain this figure.<br />
<br />
Once you know these figures for your users, you can start work out if your Moodle installation can support this capacity. The exact number of users depends on your hardware/software/network combination. Usually the amount of memory installed (RAM) is the deciding factor but a faster overall processor speed will also help in reducing waiting times for pages to load. <br />
<br />
The general rule of thumb for a single server is that the approx max concurrent users = RAM (GB) * 50 and the approx max browsing users = Approx max concurrent users * 5. As an example, a university with 500 total computers on campus and 100 concurrent users at any time will need approx 2GB of RAM on the one server to support the number of concurrent users.<br />
<br />
'''Note if you are using a hosted account''': Ask your provider what limits are placed on the number of concurrent database connections and the processor load. This will give a good estimate of the number of users your Moodle install can manage.<br />
<br />
== Download and copy files into place ==<br />
<br />
There are two ways to get Moodle, either as a compressed package or via CVS. <br />
* There are two types of compressed packages on the [http://download.moodle.org/ download page: http://download.moodle.org/], the standard distribution with Moodle only files and the [[Complete install packages|complete install]], which contains programs to operate Moodle in a web environment. <br />
* To use CVS, helpful instructions are available at the [[CVS_for_Administrators | CVS for Administrators]] page. The full [http://moodle.cvs.sourceforge.net/moodle/moodle/ Moodle Sourceforge CVS repository] is also available for browsing. <br />
<br />
After downloading, unpack the archive using either <br />
tar -zxvf [filename]<br />
or<br />
unzip [filename]<br />
as appropriate. <br />
<br />
If using CVS, run the CVS Checkout command.<br />
<br />
You will now be left with a directory called "moodle", containing a number of files and folders.<br />
<br />
You can either place the whole folder in your web server documents directory, in which case the site will be located at '''<nowiki>http://yourwebserver.com/moodle</nowiki>''', or you can copy all the contents straight into the main web server documents directory, in which case the site will be simply '''<nowiki>http://yourwebserver.com</nowiki>'''.<br />
<br />
If you are downloading Moodle to your local computer and then uploading it to your web site, it is usually better to upload the whole archive as one file, and then do the unpacking on the server. Even web hosting interfaces like cPanel allow you to uncompress archives in the "File Manager".<br />
<br />
=== Structure of moodle directory ===<br />
<br />
You can safely skip this section, but here is a quick summary of the contents of the Moodle folder, to help get you oriented:<br />
<br />
:''config.php'' - contains basic settings. This file does not come with Moodle - you will create it.<br />
:''install.php'' - the script you will run to create config.php<br />
:''version.php'' - defines the current version of Moodle code<br />
:''index.php'' - the front page of the site<br />
:''admin/'' - code to administrate the whole server<br />
:''auth/'' - plugin modules to authenticate users<br />
:''blocks/'' - plugin modules for the little side blocks on many pages<br />
:''calendar/'' - all the code for managing and displaying calendars<br />
:''course/'' - code to display and manage courses<br />
:''doc/'' - help documentation for Moodle (eg this page)<br />
:''files/'' - code to display and manage uploaded files<br />
:''lang/'' - texts in different languages, one directory per language<br />
:''lib/'' - libraries of core Moodle code<br />
:''login/'' - code to handle login and account creation<br />
:''mod/'' - all the main Moodle course modules are in here<br />
:''pix/'' - generic site graphics<br />
:''theme/'' - theme packs/skins to change the look of the site.<br />
:''user/'' - code to display and manage users<br />
<br />
== Setting-up your system==<br />
To ensure that Moodle will install successfully, you need to check that the web server settings are correct, then create a blank database for Moodle to use and finally create a directory on your hard disk for Moodle to save your materials and other files you upload into your courses.<br />
<br />
=== Check web server settings ===<br />
<br />
*Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:<br />
<br />
'''DirectoryIndex''' index.php index.html index.htm<br />
<br />
:Just make sure index.php is in the list (and preferably towards the start of the list, for efficiency).<br />
<br />
*Secondly, '''if you are using Apache 2''', then you should turn on the ''AcceptPathInfo'' variable, which allows scripts to be passed arguments like <nowiki>http://server/file.php/arg1/arg2</nowiki>. This is essential to allow relative links between your resources, and also provides a performance boost for people using your Moodle web site. You can turn this on by adding these lines to your httpd.conf file.<br />
<br />
'''AcceptPathInfo''' on<br />
<br />
*Thirdly, Moodle requires a number of PHP settings to be active for it to work. '''On most servers these will already be the default settings'''. However, some PHP servers (and some of the more recent PHP versions) may have things set differently. These are defined in PHP's configuration file (usually called '''php.ini'''):<br />
<br />
magic_quotes_gpc = 1 (preferred but not necessary)<br />
magic_quotes_runtime = 0 (necessary)<br />
file_uploads = 1<br />
session.auto_start = 0<br />
session.bug_compat_warn = 0<br />
<br />
:You may also want to set other, optional php.ini file settings while you are already editing it. For instance, you may want to reset the maximum upload size of file attachments, which usually defaults to 2M(egabytes). For instance, to set these to 16 Megabytes:<br />
<br />
post_max_size = 16M<br />
upload_max_filesize = 16M<br />
<br />
<br />
==== Using a .htaccess file ====<br />
<br />
Use the above if you can directly edit your server's files, but if you are setting-up Moodle on a webhost, or don't have access to '''httpd.conf''' or '''php.ini''' on your server, or you have Moodle on a server with other applications that require different settings, then don't worry, you can often still override the default settings. This only works on Apache servers and only when Overrides have been allowed in the main Apache configuration.<br />
<br />
* Create a file called '''.htaccess''' in Moodle's main directory that contains lines like the following. <br />
<br />
DirectoryIndex index.php index.html index.htm<br />
<br />
<IfDefine APACHE2><br />
'''AcceptPathInfo''' on<br />
</IfDefine><br />
<br />
php_flag magic_quotes_gpc 1<br />
php_flag magic_quotes_runtime 0<br />
php_flag file_uploads 1<br />
php_flag session.auto_start 0<br />
php_flag session.bug_compat_warn 0<br />
<br />
* Optionally, you can also do things like define the maximum size for uploaded files:<br />
<br />
LimitRequestBody 0<br />
php_value upload_max_filesize 2M<br />
php_value post_max_size 2M<br />
<br />
* The easiest thing to do is just copy the sample file from lib/htaccess and edit it to suit your needs. It contains further instructions. For example, in a Unix shell:<br />
<br />
cp lib/htaccess .htaccess<br />
<br />
=== Creating an empty database ===<br />
<br />
You need to create an empty database (eg "''moodle''") in your database system along with a special user (eg "moodleuser") that has access to that database (and that database only). You could use the "root" user if you wanted to for a test server, but this is not recommended for a production system: if hackers manage to discover the password then your whole database system would be at risk, rather than just one database.<br />
<br />
::'''Warning''': Bear in mind that currently (as of 1.7.x -- see http://moodle.org/mod/forum/discuss.php?d=58552) Moodle doesn't work with MySQL 5.x's new strict mode (STRICT_TRANS_TABLES and/or STRICT_ALL_TABLES) setting. So if you are using MySQL 5.x, edit MySQL's configuration file (called "my.ini" in Windows and "my.cnf" on Unix/Linux) and comment out that option or set it to sql-mode="" (single quotes). You have to restart MySQL after changing this setting. <br><br> If you do not have access to your server, use PHPMyAdmin (or another MySQL client) and enter the command SET @@global.sql_mode="" (single quotes); (note the semi-colon).<br />
<br />
====Using a hosted server====<br />
If you are using a webhost, they will probably have a control panel web interface for you to create your database.<br />
<br />
The '''[http://www.cpanel.com/ cPanel]''' system is one of the most popular of these. To create a database in cPanel,<br />
<br />
# Click on the "'''MySQL Databases'''" icon.<br />
# Type "moodle" in the database field and click "'''Add Database'''".<br />
# Type a username and password (not one you use elsewhere) in the respective fields and click "'''Add User'''".<br />
# Now use the "'''Add User to Database'''" button to give this new user account "'''ALL'''" rights to the new database.<br />
# Note that the username and database names may be prefixed by your cPanel account name. When entering this information into the Moodle installer - use the full names.<br />
<br />
====Using the command line====<br />
<br />
If you have access to Unix or Windows command lines then you can do the same sort of thing by typing commands. You should do this using the MySQL Client program<br />
<br />
Here are some example MySQL client command lines (the red part is for Moodle 1.6 and later, leave it out for Moodle 1.5.x or earlier):<br />
<br />
# mysql -u root -p<br />
> CREATE DATABASE moodle <font color="red">DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci</font>; <br />
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER ON moodle.*<br />
TO moodleuser@localhost IDENTIFIED BY 'yourpassword'; <br />
> quit <br />
# mysqladmin -u root -p reload<br />
<br />
If you are using MySQL 4.0.2 or later, you need to specify CREATE TEMPORARY TABLES as well in the GRANT statement:<br />
<br />
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,<br />
DROP,INDEX,ALTER ON moodle.* <br />
TO moodleuser@localhost IDENTIFIED BY 'yourpassword'; <br />
<br />
And some example command lines for PostgreSQL:<br />
<br />
# su - postgres<br />
> psql -c "create user moodleuser createdb;" template1<br />
> psql -c "create database moodle <font color="red">with encoding 'unicode'</font>;" -U moodleuser template1<br />
> psql -c "alter user moodleuser nocreatedb;" template1<br />
> psql -c "alter user moodleuser with encrypted password 'yourpassword';" template1<br />
> su - root<br />
# /etc/init.d/postgresql reload<br />
<br />
If the Postgres create database command above (>psql -c "create database moodle...") gives an error message you may want to try:<br />
psql -c "create database moodle with template=template1 encoding = 'unicode' owner = moodleuser <br> location = '/var/mydata';"<br />
<br />
=== Creating the data directory (moodledata) ===<br />
<br />
Moodle will also need some space on your server's hard disk to store uploaded files, such as course documents and user pictures. The Moodle installer tries hard to create this directory for you but if it fails then you will have to create a directory for this purpose manually.<br />
<br />
'''Security warning''': For security purposes, it's best that this directory is NOT accessible directly via the web. The easiest way to do this is to simply locate it OUTSIDE the web directory, but if you must have it in the web directory (and you are using Apache) then protect it by creating a file in the data directory called '''.htaccess''', containing this line:<br />
<br />
deny from all<br />
<br />
'''Permissions''': To make sure that Moodle can save uploaded files in this directory, check that the web server software has permission to read, write and execute in this directory. On Unix machines, this means setting the owner of the directory to be something like "nobody" or "apache", and then giving that user read, write and execute permissions. To do this you could use:<br />
<br />
chown -R nobody:nobody moodledata<br />
<br />
Remember by default, moodle will issue a warning about moodle data directories created inside the web directory, but otherwise this directory can be located where you wish. You can later move or change the location of this directory, but if you do, be sure to edit the setting in the '''config.php''' file that sets this; e.g. if moodledata is under a directory called data, then it would look like this:<br />
<br />
$CFG->dataroot = '/data/moodledata';<br />
<br />
'''CPanel and webhosts''': On cPanel systems you can use the "File Manager" to find the folder, click on it, then choose "Change Permissions". On many shared hosting servers, you will probably need to restrict all file access to your "group" (to prevent other webhost customers from looking at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files). Speak to your server administrator if you are having trouble setting this up securely. In particular it will not be possible to create a usable data directory on sites that use a PHP feature known as "'''Safe Mode'''".<br />
<br />
== Run the installer script to create config.php ==<br />
<br />
To run the installer script (install.php), just try to access your Moodle main URL using a web browser, or access '''<nowiki>http://yourserver/install.php</nowiki>''' directly.<br />
<br />
(The Installer will try to set a session cookie. If you get a popup warning in your browser make sure you accept that cookie!)<br />
<br />
Moodle will detect that configuration is necessary and will lead you through some screens to help you create a new configuration file called '''config.php'''. At the end of the process Moodle will try and write the file into the right location, otherwise you can press a button to download it from the installer and then upload '''config.php''' into the main Moodle directory on the server.<br />
<br />
Along the way the installer will test your server environment and give you suggestions about how to fix any problems. For most common issues these suggestions should be sufficient, but if you get stuck, check in the Installation Forum for more help. <br />
<br />
== Go to the admin page to continue configuration ==<br />
<br />
Once the basic config.php has been correctly created in the previous step, trying to access the front page of your site will take you the "admin" page for the rest of the configuration.<br />
<br />
The first time you access this admin page, you will be presented with a GPL "shrink wrap" agreement with which you must agree before you can continue with the setup.<br />
<br />
Now Moodle will start setting up your database and creating tables to store data. Firstly, the main database tables are created. You should see a number of SQL statements followed by status messages (in green or red) that look like this:<br />
<br />
{| border=1<br />
|<nowiki>CREATE TABLE course ( id int(10) unsigned NOT NULL auto_increment, category int(10) unsigned NOT NULL default '0', password varchar(50) NOT NULL default '', fullname varchar(254) NOT NULL default '', shortname varchar(15) NOT NULL default '', summary text NOT NULL, format tinyint(4) NOT NULL default '1', teacher varchar(100) NOT NULL default 'Teacher', startdate int(10) unsigned NOT NULL default '0', enddate int(10) unsigned NOT NULL default '0', timemodified int(10) unsigned NOT NULL default '0', PRIMARY KEY (id)) TYPE=MyISAM</nowiki><br />
<br />
<font color="green">SUCCESS</font><br />
|}<br />
<br />
...and so on, followed by: <font color="green">Main databases set up successfully.</font><br />
<br />
If you don't see these, then there must have been some problem with the database or the configuration settings you defined in config.php. Check that PHP isn't in a restricted "Safe Mode" (commercial web hosts sometimes have safe mode turned on). You can check PHP variables by creating a little file containing '''<?php phpinfo() ?>''' and looking at it through a browser. Check all these and try this page again.<br />
<br />
Scroll down the very bottom of the page and press the "Continue" link.<br />
<br />
You should now see a form where you can define more configuration variables for your installation, such as the default language, SMTP hosts and so on. Don't worry too much about getting everything right just now - you can always come back and edit these later on using the admin interface. The defaults are designed to be useful and secure for most sites. Scroll down to the bottom and click "Save changes".<br />
<br />
If (and only if) you find yourself getting stuck on this page, unable to continue, then your server probably has what I call the "buggy referrer" problem. This is easy to fix: just turn off the "secureforms" setting, then try to continue again.<br />
<br />
Next you will see more pages that print lots of status messages as they set up all the tables required by the various Moodle module. As before, they should all be <font color="green">green</font>.<br />
<br />
Scroll down the very bottom of the page and press the "Continue" link.<br />
<br />
The next page is a form where you can define parameters for your Moodle site and the front page, such as the name, format, description and so on. Fill this out (you can always come back and change these later) and then press "Save changes".<br />
<br />
Finally, you will then be asked to create a top-level administration user for future access to the admin pages. Fill out the details with your own name, email etc and then click "Save changes". Not all the fields are required, but if you miss any important fields you'll be re-prompted for them.<br />
<br />
'''Make sure you remember the username and password you chose for the administration user account, as they will be necessary to access the administration page in future.'''<br />
<br />
(If for any reason your install is interrupted, or there is a system error of some kind that prevents you from logging in using the admin account, you can usually log in using the default username of "'''admin'''", with password "'''admin'''".)<br />
<br />
Once successful, you will be returned to the home page of your new site! Note the administration links that appear down the left hand side of the page (these items also appear on a separate Admin page) - these items are only visible to you because you are logged in as the admin user. All your further administration of Moodle can now be done using this menu, such as:<br />
<br />
* creating and deleting courses<br />
* creating and editing user accounts<br />
* administering teacher accounts<br />
* changing site-wide settings like themes etc<br />
<br />
But you are not done installing yet! There is one very important thing still to do (see the next section on cron).<br />
<br />
== Set up cron ==<br />
<br />
Please refer to the [[Cron|Cron instructions]].<br />
<br />
== Set up backups ==<br />
<br />
Please refer to the [[Backup | Backup instructions]].<br />
<br />
== Create a new course ==<br />
<br />
Now that Moodle is running properly, you can try creating a new course to play with.<br />
<br />
Select "Create a new course" from the Admin page (or the admin links on the home page).<br />
<br />
Fill out the form, paying special attention to the course format. You don't have to worry about the details too much at this stage, as everything can be changed later by the teacher. Note that the yellow help icons are everywhere to provide contextual help on any aspect.<br />
<br />
Press "Save changes", and you will be taken to a new form where you can assign teachers to the course. You can only add existing user accounts from this form - if you want to create a new teacher account then either ask the teacher to create one for themselves (see the login page), or create one for them using the "Add a new user" on the Admin page.<br />
<br />
Once done, the course is ready to customize, and is accessible via the "Courses" link on the home page.<br />
<br />
==See also==<br />
<br />
* [[Installation FAQ]]<br />
*[[Complete install packages]] might be an easier first time installs on some systems<br />
* [[Installing Apache, MySQL and PHP]] - Open source programs that can run Moodle on the web or on a desktop<br />
* [[Upgrading Moodle]]<br />
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=42688 Selecting a web host for Moodle] forum discussion<br />
* [[masquerading|Masquerading]] - Running Moodle behind a masquerading/NAT firewall<br />
<br />
[[Category:Core]]<br />
[[Category:Administrator]]<br />
[[Category:Installation]]<br />
<br />
[[cs:Instalace]]<br />
[[de:Installieren von Moodle]]<br />
[[es:Instalación de moodle]]<br />
[[fr:Installation de Moodle]]<br />
[[ja:Moodleのインストール]]<br />
[[nl:Installatiegids]]<br />
[[ru:Установка Moodle]]<br />
[[zh:安装Moodlezh:]]</div>Phrhttps://docs.moodle.org/37/en/index.php?title=Installing_Moodle&diff=20842Installing Moodle2007-02-27T22:31:56Z<p>Phr: /* Creating an empty database */</p>
<hr />
<div>'''Firstly don't panic! :-)'''<br />
<br />
This guide explains how to install Moodle for the first time. For some of these steps it goes into a lot of detail to try and cover the majority of possible web server setups, so this page may look long and complicated. Don't panic, once you know how to do it you can install Moodle in minutes!<br />
<br />
If you have problems please read this page carefully - most common issues are answered in here. If you still have trouble, you can seek help from the Moodle community via [http://moodle.org/course/view.php?id=5 moodle.org Using Moodle].<br />
<br />
Another option is to contact a [http://moodle.com/hosting/ Moodle Partner providing Moodle hosting] who can completely maintain Moodle for you, so that you can ignore all this and get straight into educating!<br />
<br />
If you want to run Moodle on your own computer and this page looks a bit daunting, then please see our guides: [[Installing AMP |Installing Apache, MySQL and PHP(AMP)]] or [[Complete install packages| how to install one of Moodle's complete packages]]. They provide alternative instructions to install all this on most popular platforms.<br />
<br />
==Requirements==<br />
<br />
Moodle is primarily developed in Linux using [[Apache]], [[MySQL]] and [[PHP]] (also sometimes known as the LAMP platform), but is also regularly tested with Windows XP/2000/2003 (WAMP), Solaris 10 (Sparc and x64), Mac OS X and Netware 6 operating systems. Support for PostgreSQL, Oracle and Microsoft SQL Server is also available.<br />
<br />
The requirements for Moodle are as follows:<br />
<br />
* Hardware (unless you are using a hosted server). <br />
** Disk space: 160MB free (min). You will require more free space to store your teaching materials.<br />
** Memory: 256MB (min), 1GB (recommended). The general rule of thumb is that Moodle can support 50 ''concurrent'' users for every 1GB of RAM, but this will vary depending on your specific hardware and software combination. <br />
* Software<br />
** Web server software. Most people use [[Apache]], but Moodle should work fine under any web server that supports [[PHP]], such as [[IIS]] on Windows platforms. PHP does impose requirements on versions of web servers, however these are complex and the general advice is to use the newest version possible of your chosen web server. <br />
** PHP scripting language. (Please note that there have been issues installing Moodle with [http://www.php-accelerator.co.uk PHP-Accelerator]). There are currently two versions (or branches) of PHP available: PHP4 and PHP5.<br />
*** For Moodle 1.4 or later, PHP4 (version 4.1.0 or later) or PHP5 (version 5.1.0 or later) are supported.<br />
*** For Moodle version 1.6 or later, the PHP4 (version 4.3.0 or later) or PHP5 (version 5.1.0 or later) are supported. <br />
*** Future Moodle versions 2.0 or later will not support PHP4 and will require PHP5 (version 5.1.0 or later).<br />
** A working database server: [[MySQL]] or [[PostgreSQL]] are completely supported and recommended for use with any version of Moodle. Support for Microsoft SQL Server and Oracle has been added in Moodle 1.7. MySQL is ''the'' choice for many people because it is very popular, but there are some [[Arguments in favour of PostgreSQL|arguments in favour of PostgreSQL]], especially if you are planning a large deployment. <br />
*** For Moodle 1.5 or later, MySQL (version 3.23 or later) or PostgreSQL (7.4 or later). <br />
*** For Moodle 1.6 or later, MySQL (version 4.1.12 or later or PostgreSQ: (7.4 or later).<br />
*** '''Notes''': For Moodle 1.6 or later, If you use latin languages only you can use MySQL 4.1.12. If you are using non-latin languages you require MySQL 4.1.16 or later. Currently the MySQL setting "strict mode" should be OFF (set to "" or "MYSQL40") in the MySQL configuration file. The minimum version of PostgreSQL is 7.4 and it is widely used with 8.0 and 8.1. The minimum version of Microsoft SQL Server is 2005 (version 9). There has also been [http://moodle.org/mod/forum/discuss.php?d=59284 some success] with SQL Server Express 2005. <br />
* Additional PHP requirements<br />
** PHP Settings<br />
*** Safe mode needs to be OFF (check in your php.ini or Apache configuration file).<br />
*** The setting ''memory_limit'' to be at least 16M (32M is recommended for Moodle 1.7 or later).<br />
*** The PHP setting ''session.save_handler'' needs to be set to files. <br />
** PHP Extensions and libraries<br />
*** The mbstring extension is required for multi-byte string handling.<br />
*** The iconv extension is also recommended for Moodle 1.6 or later.<br />
*** [http://www.boutell.com/gd/ GD library] and the [http://www.freetype.org/ FreeType 2] library and extensions are needed to be able to look at the dynamic graphs that the logs pages make.<br />
*** The mysql extension is required if you are using the MySQL database. Note that in some Linux distributions (notably Red Hat) this is an optional installation.<br />
*** The pgsql extension is required if you are using the PostgreSQL database.<br />
*** The zlib extension is required for zip/unzip functionality.<br />
*** Other PHP extensions may be required to support optional Moodle functionality, especially external authentication and/or enrolment (e.g. LDAP extension for LDAP authentication and the sockets extension for Chat server).<br />
<br />
'''Note if you are using a hosted account''': Most web hosts support all of these requirements by default. You should contact your web host's support desk to check that this is the case '''before''' signing-up with them. If you are already signed up with one of the few web hosts that does not support these features ask them why, and consider taking your business elsewhere if they do not change.<br />
<br />
== How many users? ==<br />
<br />
In addition to the hardware and software requirements, you will also need to think about the capacity of your Moodle installation in terms of the number of users it can handle. There are two numbers to plan for:<br />
<br />
* '''Browsing users''': the maximum number of users able to browse your Moodle site. This is the number of computers in your organization or on your course (whichever is greater).<br />
* '''Concurrent database users''': the maximum number of concurrent database users (needed for Moodle activities such as quizzes). This is the number of users who will be using Moodle at the same time. In an educational institution, use your timetable/roster to obtain this figure.<br />
<br />
Once you know these figures for your users, you can start work out if your Moodle installation can support this capacity. The exact number of users depends on your hardware/software/network combination. Usually the amount of memory installed (RAM) is the deciding factor but a faster overall processor speed will also help in reducing waiting times for pages to load. <br />
<br />
The general rule of thumb for a single server is that the approx max concurrent users = RAM (GB) * 50 and the approx max browsing users = Approx max concurrent users * 5. As an example, a university with 500 total computers on campus and 100 concurrent users at any time will need approx 2GB of RAM on the one server to support the number of concurrent users.<br />
<br />
'''Note if you are using a hosted account''': Ask your provider what limits are placed on the number of concurrent database connections and the processor load. This will give a good estimate of the number of users your Moodle install can manage.<br />
<br />
== Download and copy files into place ==<br />
<br />
There are two ways to get Moodle, either as a compressed package or via CVS. <br />
* There are two types of compressed packages on the [http://download.moodle.org/ download page: http://download.moodle.org/], the standard distribution with Moodle only files and the [[Complete install packages|complete install]], which contains programs to operate Moodle in a web environment. <br />
* To use CVS, helpful instructions are available at the [[CVS_for_Administrators | CVS for Administrators]] page. The full [http://moodle.cvs.sourceforge.net/moodle/moodle/ Moodle Sourceforge CVS repository] is also available for browsing. <br />
<br />
After downloading, unpack the archive using either <br />
tar -zxvf [filename]<br />
or<br />
unzip [filename]<br />
as appropriate. <br />
<br />
If using CVS, run the CVS Checkout command.<br />
<br />
You will now be left with a directory called "moodle", containing a number of files and folders.<br />
<br />
You can either place the whole folder in your web server documents directory, in which case the site will be located at '''<nowiki>http://yourwebserver.com/moodle</nowiki>''', or you can copy all the contents straight into the main web server documents directory, in which case the site will be simply '''<nowiki>http://yourwebserver.com</nowiki>'''.<br />
<br />
If you are downloading Moodle to your local computer and then uploading it to your web site, it is usually better to upload the whole archive as one file, and then do the unpacking on the server. Even web hosting interfaces like cPanel allow you to uncompress archives in the "File Manager".<br />
<br />
=== Structure of moodle directory ===<br />
<br />
You can safely skip this section, but here is a quick summary of the contents of the Moodle folder, to help get you oriented:<br />
<br />
:''config.php'' - contains basic settings. This file does not come with Moodle - you will create it.<br />
:''install.php'' - the script you will run to create config.php<br />
:''version.php'' - defines the current version of Moodle code<br />
:''index.php'' - the front page of the site<br />
:''admin/'' - code to administrate the whole server<br />
:''auth/'' - plugin modules to authenticate users<br />
:''blocks/'' - plugin modules for the little side blocks on many pages<br />
:''calendar/'' - all the code for managing and displaying calendars<br />
:''course/'' - code to display and manage courses<br />
:''doc/'' - help documentation for Moodle (eg this page)<br />
:''files/'' - code to display and manage uploaded files<br />
:''lang/'' - texts in different languages, one directory per language<br />
:''lib/'' - libraries of core Moodle code<br />
:''login/'' - code to handle login and account creation<br />
:''mod/'' - all the main Moodle course modules are in here<br />
:''pix/'' - generic site graphics<br />
:''theme/'' - theme packs/skins to change the look of the site.<br />
:''user/'' - code to display and manage users<br />
<br />
== Setting-up your system==<br />
To ensure that Moodle will install successfully, you need to check that the web server settings are correct, then create a blank database for Moodle to use and finally create a directory on your hard disk for Moodle to save your materials and other files you upload into your courses.<br />
<br />
=== Check web server settings ===<br />
<br />
*Firstly, make sure that your web server is set up to use index.php as a default page (perhaps in addition to index.html, default.htm and so on). In Apache, this is done using a DirectoryIndex parameter in your httpd.conf file. Mine usually looks like this:<br />
<br />
'''DirectoryIndex''' index.php index.html index.htm<br />
<br />
:Just make sure index.php is in the list (and preferably towards the start of the list, for efficiency).<br />
<br />
*Secondly, '''if you are using Apache 2''', then you should turn on the ''AcceptPathInfo'' variable, which allows scripts to be passed arguments like <nowiki>http://server/file.php/arg1/arg2</nowiki>. This is essential to allow relative links between your resources, and also provides a performance boost for people using your Moodle web site. You can turn this on by adding these lines to your httpd.conf file.<br />
<br />
'''AcceptPathInfo''' on<br />
<br />
*Thirdly, Moodle requires a number of PHP settings to be active for it to work. '''On most servers these will already be the default settings'''. However, some PHP servers (and some of the more recent PHP versions) may have things set differently. These are defined in PHP's configuration file (usually called '''php.ini'''):<br />
<br />
magic_quotes_gpc = 1 (preferred but not necessary)<br />
magic_quotes_runtime = 0 (necessary)<br />
file_uploads = 1<br />
session.auto_start = 0<br />
session.bug_compat_warn = 0<br />
<br />
:You may also want to set other, optional php.ini file settings while you are already editing it. For instance, you may want to reset the maximum upload size of file attachments, which usually defaults to 2M(egabytes). For instance, to set these to 16 Megabytes:<br />
<br />
post_max_size = 16M<br />
upload_max_filesize = 16M<br />
<br />
<br />
==== Using a .htaccess file ====<br />
<br />
Use the above if you can directly edit your server's files, but if you are setting-up Moodle on a webhost, or don't have access to '''httpd.conf''' or '''php.ini''' on your server, or you have Moodle on a server with other applications that require different settings, then don't worry, you can often still override the default settings. This only works on Apache servers and only when Overrides have been allowed in the main Apache configuration.<br />
<br />
* Create a file called '''.htaccess''' in Moodle's main directory that contains lines like the following. <br />
<br />
DirectoryIndex index.php index.html index.htm<br />
<br />
<IfDefine APACHE2><br />
'''AcceptPathInfo''' on<br />
</IfDefine><br />
<br />
php_flag magic_quotes_gpc 1<br />
php_flag magic_quotes_runtime 0<br />
php_flag file_uploads 1<br />
php_flag session.auto_start 0<br />
php_flag session.bug_compat_warn 0<br />
<br />
* Optionally, you can also do things like define the maximum size for uploaded files:<br />
<br />
LimitRequestBody 0<br />
php_value upload_max_filesize 2M<br />
php_value post_max_size 2M<br />
<br />
* The easiest thing to do is just copy the sample file from lib/htaccess and edit it to suit your needs. It contains further instructions. For example, in a Unix shell:<br />
<br />
cp lib/htaccess .htaccess<br />
<br />
=== Creating an empty database ===<br />
<br />
You need to create an empty database (eg "''moodle''") in your database system along with a special user (eg "moodleuser") that has access to that database (and that database only). You could use the "root" user if you wanted to for a test server, but this is not recommended for a production system: if hackers manage to discover the password then your whole database system would be at risk, rather than just one database.<br />
<br />
::'''Warning''': Bear in mind that currently (as of 1.7.x -- see http://moodle.org/mod/forum/discuss.php?d=58552#265945) Moodle doesn't work with MySQL 5.x's new strict mode (STRICT_TRANS_TABLES and/or STRICT_ALL_TABLES) setting. So if you are using MySQL 5.x, edit MySQL's configuration file (called "my.ini" in Windows and "my.cnf" on Unix/Linux) and comment out that option or set it to sql-mode="" (single quotes). You have to restart MySQL after changing this setting. <br><br> If you do not have access to your server, use PHPMyAdmin (or another MySQL client) and enter the command SET @@global.sql_mode="" (single quotes); (note the semi-colon).<br />
<br />
====Using a hosted server====<br />
If you are using a webhost, they will probably have a control panel web interface for you to create your database.<br />
<br />
The '''[http://www.cpanel.com/ cPanel]''' system is one of the most popular of these. To create a database in cPanel,<br />
<br />
# Click on the "'''MySQL Databases'''" icon.<br />
# Type "moodle" in the database field and click "'''Add Database'''".<br />
# Type a username and password (not one you use elsewhere) in the respective fields and click "'''Add User'''".<br />
# Now use the "'''Add User to Database'''" button to give this new user account "'''ALL'''" rights to the new database.<br />
# Note that the username and database names may be prefixed by your cPanel account name. When entering this information into the Moodle installer - use the full names.<br />
<br />
====Using the command line====<br />
<br />
If you have access to Unix or Windows command lines then you can do the same sort of thing by typing commands. You should do this using the MySQL Client program<br />
<br />
Here are some example MySQL client command lines (the red part is for Moodle 1.6 and later, leave it out for Moodle 1.5.x or earlier):<br />
<br />
# mysql -u root -p<br />
> CREATE DATABASE moodle <font color="red">DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci</font>; <br />
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER ON moodle.*<br />
TO moodleuser@localhost IDENTIFIED BY 'yourpassword'; <br />
> quit <br />
# mysqladmin -u root -p reload<br />
<br />
If you are using MySQL 4.0.2 or later, you need to specify CREATE TEMPORARY TABLES as well in the GRANT statement:<br />
<br />
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,<br />
DROP,INDEX,ALTER ON moodle.* <br />
TO moodleuser@localhost IDENTIFIED BY 'yourpassword'; <br />
<br />
And some example command lines for PostgreSQL:<br />
<br />
# su - postgres<br />
> psql -c "create user moodleuser createdb;" template1<br />
> psql -c "create database moodle <font color="red">with encoding 'unicode'</font>;" -U moodleuser template1<br />
> psql -c "alter user moodleuser nocreatedb;" template1<br />
> psql -c "alter user moodleuser with encrypted password 'yourpassword';" template1<br />
> su - root<br />
# /etc/init.d/postgresql reload<br />
<br />
If the Postgres create database command above (>psql -c "create database moodle...") gives an error message you may want to try:<br />
psql -c "create database moodle with template=template1 encoding = 'unicode' owner = moodleuser <br> location = '/var/mydata';"<br />
<br />
=== Creating the data directory (moodledata) ===<br />
<br />
Moodle will also need some space on your server's hard disk to store uploaded files, such as course documents and user pictures. The Moodle installer tries hard to create this directory for you but if it fails then you will have to create a directory for this purpose manually.<br />
<br />
'''Security warning''': For security purposes, it's best that this directory is NOT accessible directly via the web. The easiest way to do this is to simply locate it OUTSIDE the web directory, but if you must have it in the web directory (and you are using Apache) then protect it by creating a file in the data directory called '''.htaccess''', containing this line:<br />
<br />
deny from all<br />
<br />
'''Permissions''': To make sure that Moodle can save uploaded files in this directory, check that the web server software has permission to read, write and execute in this directory. On Unix machines, this means setting the owner of the directory to be something like "nobody" or "apache", and then giving that user read, write and execute permissions. To do this you could use:<br />
<br />
chown -R nobody:nobody moodledata<br />
<br />
Remember by default, moodle will issue a warning about moodle data directories created inside the web directory, but otherwise this directory can be located where you wish. You can later move or change the location of this directory, but if you do, be sure to edit the setting in the '''config.php''' file that sets this; e.g. if moodledata is under a directory called data, then it would look like this:<br />
<br />
$CFG->dataroot = '/data/moodledata';<br />
<br />
'''CPanel and webhosts''': On cPanel systems you can use the "File Manager" to find the folder, click on it, then choose "Change Permissions". On many shared hosting servers, you will probably need to restrict all file access to your "group" (to prevent other webhost customers from looking at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files). Speak to your server administrator if you are having trouble setting this up securely. In particular it will not be possible to create a usable data directory on sites that use a PHP feature known as "'''Safe Mode'''".<br />
<br />
== Run the installer script to create config.php ==<br />
<br />
To run the installer script (install.php), just try to access your Moodle main URL using a web browser, or access '''<nowiki>http://yourserver/install.php</nowiki>''' directly.<br />
<br />
(The Installer will try to set a session cookie. If you get a popup warning in your browser make sure you accept that cookie!)<br />
<br />
Moodle will detect that configuration is necessary and will lead you through some screens to help you create a new configuration file called '''config.php'''. At the end of the process Moodle will try and write the file into the right location, otherwise you can press a button to download it from the installer and then upload '''config.php''' into the main Moodle directory on the server.<br />
<br />
Along the way the installer will test your server environment and give you suggestions about how to fix any problems. For most common issues these suggestions should be sufficient, but if you get stuck, check in the Installation Forum for more help. <br />
<br />
== Go to the admin page to continue configuration ==<br />
<br />
Once the basic config.php has been correctly created in the previous step, trying to access the front page of your site will take you the "admin" page for the rest of the configuration.<br />
<br />
The first time you access this admin page, you will be presented with a GPL "shrink wrap" agreement with which you must agree before you can continue with the setup.<br />
<br />
Now Moodle will start setting up your database and creating tables to store data. Firstly, the main database tables are created. You should see a number of SQL statements followed by status messages (in green or red) that look like this:<br />
<br />
{| border=1<br />
|<nowiki>CREATE TABLE course ( id int(10) unsigned NOT NULL auto_increment, category int(10) unsigned NOT NULL default '0', password varchar(50) NOT NULL default '', fullname varchar(254) NOT NULL default '', shortname varchar(15) NOT NULL default '', summary text NOT NULL, format tinyint(4) NOT NULL default '1', teacher varchar(100) NOT NULL default 'Teacher', startdate int(10) unsigned NOT NULL default '0', enddate int(10) unsigned NOT NULL default '0', timemodified int(10) unsigned NOT NULL default '0', PRIMARY KEY (id)) TYPE=MyISAM</nowiki><br />
<br />
<font color="green">SUCCESS</font><br />
|}<br />
<br />
...and so on, followed by: <font color="green">Main databases set up successfully.</font><br />
<br />
If you don't see these, then there must have been some problem with the database or the configuration settings you defined in config.php. Check that PHP isn't in a restricted "Safe Mode" (commercial web hosts sometimes have safe mode turned on). You can check PHP variables by creating a little file containing '''<?php phpinfo() ?>''' and looking at it through a browser. Check all these and try this page again.<br />
<br />
Scroll down the very bottom of the page and press the "Continue" link.<br />
<br />
You should now see a form where you can define more configuration variables for your installation, such as the default language, SMTP hosts and so on. Don't worry too much about getting everything right just now - you can always come back and edit these later on using the admin interface. The defaults are designed to be useful and secure for most sites. Scroll down to the bottom and click "Save changes".<br />
<br />
If (and only if) you find yourself getting stuck on this page, unable to continue, then your server probably has what I call the "buggy referrer" problem. This is easy to fix: just turn off the "secureforms" setting, then try to continue again.<br />
<br />
Next you will see more pages that print lots of status messages as they set up all the tables required by the various Moodle module. As before, they should all be <font color="green">green</font>.<br />
<br />
Scroll down the very bottom of the page and press the "Continue" link.<br />
<br />
The next page is a form where you can define parameters for your Moodle site and the front page, such as the name, format, description and so on. Fill this out (you can always come back and change these later) and then press "Save changes".<br />
<br />
Finally, you will then be asked to create a top-level administration user for future access to the admin pages. Fill out the details with your own name, email etc and then click "Save changes". Not all the fields are required, but if you miss any important fields you'll be re-prompted for them.<br />
<br />
'''Make sure you remember the username and password you chose for the administration user account, as they will be necessary to access the administration page in future.'''<br />
<br />
(If for any reason your install is interrupted, or there is a system error of some kind that prevents you from logging in using the admin account, you can usually log in using the default username of "'''admin'''", with password "'''admin'''".)<br />
<br />
Once successful, you will be returned to the home page of your new site! Note the administration links that appear down the left hand side of the page (these items also appear on a separate Admin page) - these items are only visible to you because you are logged in as the admin user. All your further administration of Moodle can now be done using this menu, such as:<br />
<br />
* creating and deleting courses<br />
* creating and editing user accounts<br />
* administering teacher accounts<br />
* changing site-wide settings like themes etc<br />
<br />
But you are not done installing yet! There is one very important thing still to do (see the next section on cron).<br />
<br />
== Set up cron ==<br />
<br />
Please refer to the [[Cron|Cron instructions]].<br />
<br />
== Set up backups ==<br />
<br />
Please refer to the [[Backup | Backup instructions]].<br />
<br />
== Create a new course ==<br />
<br />
Now that Moodle is running properly, you can try creating a new course to play with.<br />
<br />
Select "Create a new course" from the Admin page (or the admin links on the home page).<br />
<br />
Fill out the form, paying special attention to the course format. You don't have to worry about the details too much at this stage, as everything can be changed later by the teacher. Note that the yellow help icons are everywhere to provide contextual help on any aspect.<br />
<br />
Press "Save changes", and you will be taken to a new form where you can assign teachers to the course. You can only add existing user accounts from this form - if you want to create a new teacher account then either ask the teacher to create one for themselves (see the login page), or create one for them using the "Add a new user" on the Admin page.<br />
<br />
Once done, the course is ready to customize, and is accessible via the "Courses" link on the home page.<br />
<br />
==See also==<br />
<br />
* [[Installation FAQ]]<br />
*[[Complete install packages]] might be an easier first time installs on some systems<br />
* [[Installing Apache, MySQL and PHP]] - Open source programs that can run Moodle on the web or on a desktop<br />
* [[Upgrading Moodle]]<br />
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=42688 Selecting a web host for Moodle] forum discussion<br />
* [[masquerading|Masquerading]] - Running Moodle behind a masquerading/NAT firewall<br />
<br />
[[Category:Core]]<br />
[[Category:Administrator]]<br />
[[Category:Installation]]<br />
<br />
[[cs:Instalace]]<br />
[[de:Installieren von Moodle]]<br />
[[es:Instalación de moodle]]<br />
[[fr:Installation de Moodle]]<br />
[[ja:Moodleのインストール]]<br />
[[nl:Installatiegids]]<br />
[[ru:Установка Moodle]]<br />
[[zh:安装Moodlezh:]]</div>Phr