]> git.mjollnir.org Git - moodle.git/commitdiff
Brought the install procedure up to date
authormartin <martin>
Fri, 9 Aug 2002 06:25:50 +0000 (06:25 +0000)
committermartin <martin>
Fri, 9 Aug 2002 06:25:50 +0000 (06:25 +0000)
doc/install.html

index 88256ebef29c4fe47f58f92c6a09ccefffce3d5f..4b98d5c66ca9d03204ce1b92101cc19621bef949 100755 (executable)
   <LI><A HREF="#course">Create a new course</A></LI>\r
 </OL>\r
 <H3><A NAME="requirements"></A>Requirements</H3>\r
-<P>Moodle is primarily developed in Linux and MacOSX environments using PHP, Apache \r
-  and MySQL. However, it has been designed to run on as many platforms as possible.</P>\r
+<P>Moodle is primarily developed in Linux using PHP, Apache and MySQL, and regularly \r
+  tested under Windows XP and Mac OS X environments.</P>\r
 <P>All you should need are:</P>\r
 <UL>\r
   <LI>a working installation of <A HREF="http://www.php.net/">PHP</A> (version \r
     4.1.0 or better), including the <A HREF="http://www.boutell.com/gd/">GD</A> \r
     library for manipulating images.</LI>\r
-  <LI>a working database server (<A HREF="http://www.mysql.com/">MySQL</A>, PostgreSQL, \r
-    MSSQL, Oracle, Interbase, Foxpro, Access, ADO, Sybase, DB2 or ODBC).</LI>\r
+  <LI>a working database server (<A HREF="http://www.mysql.com/">MySQL</A> for \r
+    now, but soon it will support PostgreSQL, MSSQL, Oracle, Interbase, Foxpro, \r
+    Access, ADO, Sybase, DB2 or ODBC).</LI>\r
 </UL>\r
 <P>The quickest way to satisfy these requirements on Windows platforms is to download \r
   <A HREF="http://www.phpgeek.com/">PHPTriad</A> or <A HREF="http://www.foxserv.net/">FoxServ</A>, \r
-  which will install Apache, PHP, and MySQL for you.</P>\r
+  which will install Apache, PHP, and MySQL for you. On Mac OS X I highly recommend \r
+  the <a href="http://fink.sourceforge.net/">fink</a> project.</P>\r
 <P>&nbsp;</P>\r
 <H3><A NAME="downloading"></A>Download</H3>\r
 <P>There are two ways to get Moodle, as a compressed package and via CVS. These \r
@@ -49,7 +51,8 @@
 <P>Here is a quick summary of the contents of the Moodle folder, to help get you \r
   oriented:</P>\r
 <BLOCKQUOTE> \r
-  <P>config.php - the only file you need to edit to get started <BR>\r
+  <P>config.php - the only file you need to edit to get started<br>\r
+    version.php - defines the current version of Moodle code<BR>\r
     index.php - the front page of the site</P>\r
   <UL>\r
     <LI>admin/ - code to administrate the whole server </LI>\r
 <P>Moodle will also need some space on your hard disk to store uploaded files, \r
   such as course documents and user pictures.</P>\r
 <P>Create a directory for this purpose somewhere <B>away</B> from the web server \r
-  documents directory (we don't want these files to be accessible from the web), \r
-  and ensure that the web server software has permission to write to this directory. \r
-  On Unix machines, this means setting the owner of the directory to be something \r
-  like &quot;nobody&quot; or &quot;apache&quot;.</P>\r
+  documents directory (we don't want these files to be directly accessible from \r
+  the web), and ensure that the web server software has permission to write to \r
+  this directory. On Unix machines, this means setting the owner of the directory \r
+  to be something like &quot;nobody&quot; or &quot;apache&quot;.</P>\r
 <P>&nbsp;</P>\r
 <H3><A NAME="database"></A>Create a database</H3>\r
 <P>You need to create an empty database (eg "moodle") in your database system \r
   along with a special user (eg "moodleuser") that has access to that database \r
   (and that database only. For example, don't use the "root" user for the moodle \r
-  database - it's a security hazard). </P>\r
+  database in a production system - it's a security hazard). </P>\r
 <P>eg for MySQL: </P>\r
 <PRE>\r
    # mysql -u root -p\r
    # mysqladmin -p reload\r
 </PRE>\r
 \r
-<P>&nbsp;</P>\r
+<P>(For MySQL I highly recommend the use of <a href="http://phpmyadmin.sourceforge.net/">phpMyAdmin</a> \r
+  to manage your databases).</P>\r
 <H3><A NAME="config"></A>Edit config.php</H3>\r
-<P>Now you can edit the configuration file, config.php. This file is used by all \r
-  other files in Moodle.</P>\r
-<P>To start with, make a copy of config-dist.php and call it config.php.  We do\r
-   this so that your config.php isn't overwritten in case you upgrade Moodle \r
-   later on.\r
+<P>Now you can edit the configuration file, <strong>config.php</strong>. This \r
+  file is used by all other files in Moodle.</P>\r
+<P>To start with, make a copy of config-dist.php and call it config.php. We do \r
+  this so that your config.php won't be overwritten in case you upgrade Moodle \r
+  later on. \r
 <P>Edit config.php to specify the database details that you just defined, as well as the \r
   site address, file system directory, data directory and so on. The config file \r
   has detailed directions.</P>\r
 <P>&nbsp;</P>\r
 <H3><A NAME="admin"></A>Go to the admin page</H3>\r
 <P>The admin page should now be working at: http://example.com/moodle/admin</P>\r
-<P>Go to this page using your favourite web browser.</P>\r
+<P>If you try and access the front page of your site you'll be taken there automatically \r
+  anyway. </P>\r
 <P>The first time you access this page, Moodle will set up your database and prompt \r
   you for more information.</P>\r
-<P>Firstly, the main database tables are created. You should see a number of statements \r
-  like this (in green):</P>\r
+<P>Firstly, the main database tables are created. You should see a number of SQL \r
+  statements followed by status messages (in green or red) that look like this:</P>\r
 <BLOCKQUOTE> \r
-  <P><FONT COLOR="#006600">SUCCESS: CREATE TABLE course ( id int(10) unsigned \r
-    NOT NULL auto_increment, category int(10) unsigned NOT NULL default '0', password \r
-    varchar(50) NOT NULL default '', fullname varchar(254) NOT NULL default '', \r
-    shortname varchar(15) NOT NULL default '', summary text NOT NULL, format tinyint(4) \r
-    NOT NULL default '1', teacher varchar(100) NOT NULL default 'Teacher', startdate \r
-    int(10) unsigned NOT NULL default '0', enddate int(10) unsigned NOT NULL default \r
-    '0', timemodified int(10) unsigned NOT NULL default '0', PRIMARY KEY (id)) \r
-    TYPE=MyISAM</FONT></P>\r
+  <P>CREATE TABLE course ( id int(10) unsigned NOT NULL auto_increment, category \r
+    int(10) unsigned NOT NULL default '0', password varchar(50) NOT NULL default \r
+    '', fullname varchar(254) NOT NULL default '', shortname varchar(15) NOT NULL \r
+    default '', summary text NOT NULL, format tinyint(4) NOT NULL default '1', \r
+    teacher varchar(100) NOT NULL default 'Teacher', startdate int(10) unsigned \r
+    NOT NULL default '0', enddate int(10) unsigned NOT NULL default '0', timemodified \r
+    int(10) unsigned NOT NULL default '0', PRIMARY KEY (id)) TYPE=MyISAM</P>\r
+  <P><FONT COLOR="#006600">SUCCESS</FONT></P>\r
   <P>...and so on, followed by: <FONT COLOR="#FF0000">Main databases set up successfully</FONT>. \r
   </P>\r
 </BLOCKQUOTE>\r
-<P>If you don't see this, then there must have been some problem with the database \r
-  or the configuration settings you defined in config.php.  Check that PHP isn't \r
-  in a restricted "safe mode" (commercial web hosts often have safe mode turned on).\r
-  You can check PHP variables by creating a little file containing\r
-  &lt? phpinfo ?&gt and looking at it through a browser.  Check all these and try this page again.</P>\r
-<P>Press the &quot;Continue&quot; link at the bottom of the page.</P>\r
+<P>If you don't see these, then there must have been some problem with the database \r
+  or the configuration settings you defined in config.php. Check that PHP isn't \r
+  in a restricted "safe mode" (commercial web hosts often have safe mode turned \r
+  on). You can check PHP variables by creating a little file containing &lt? phpinfo \r
+  ?&gt and looking at it through a browser. Check all these and try this page \r
+  again.</P>\r
+<P>Scroll down the very bottom of the page and press the &quot;Continue&quot; \r
+  link.</P>\r
 <P>Next you will see a similar page that sets up all the tables required by each \r
   Moodle module. As before, they should all be green, otherwise you may be a problem \r
   in the module code.</P>\r
-<P>Press the &quot;Continue&quot; link at the bottom of the page.</P>\r
+<P>Scroll down the very bottom of the page and press the &quot;Continue&quot; \r
+  link.</P>\r
 <P>You should now see a form where you can define more parameters for your Moodle \r
   site, such as the name, the description shown on the front page, and so on. \r
   Fill this out (you can always go back and change these later) and then press \r
   &quot;Update the site&quot;.</P>\r
-<P>Finally, you will then be asked to create an administration user for future \r
-  access to the admin pages. Fill out the details with your own name, email etc \r
-  and then click &quot;Update this user&quot;. You will be returned to the main \r
-  admin page, which contain a number of links arranged in a menu.</P>\r
-<P>Make sure you remember the username and password you chose for the administration \r
-  user, as they will be necessary to access the administration page in future.</P>\r
-<P>All your further configuration of Moodle can now be done using the administration \r
-  page menu, which includes tasks such as:</P>\r
+<P>Finally, you will then be asked to create a top-level administration user for \r
+  future access to the admin pages. Fill out the details with your own name, email \r
+  etc and then click &quot;Update this user&quot;. You will be returned to the \r
+  main admin page, which contain a number of links arranged in a menu (these items \r
+  also appear on the home page when you are logged in as the admin user).</P>\r
+<P><strong>Make sure you remember the username and password you chose for the \r
+  administration user, as they will be necessary to access the administration \r
+  page in future.</strong></P>\r
+<P>All your further administration of Moodle can now be done using the administration \r
+  menu, which includes tasks such as:</P>\r
 <UL>\r
   <LI>creating and deleting courses</LI>\r
+  <LI>creating and editing user accounts</LI>\r
   <LI>administering teacher accounts</LI>\r
   <LI>changing site-wide settings</LI>\r
 </UL>\r
   where this script is run regularly (eg every five minutes). This provides a \r
   &quot;heartbeat&quot; so that the script can perform functions at periods defined \r
   by each module.</P>\r
-<P>For security reasons, this script defines a required password. Edit cron.php \r
-  with a text editor and change the password to something unique. eg </P>\r
-<BLOCKQUOTE> \r
-  <PRE>$PASSWORD = &quot;pword&quot;;\r
-</PRE>\r
-</BLOCKQUOTE>\r
 <P>Test that the script works by running it directly from your browser:</P>\r
 <BLOCKQUOTE> \r
-  <PRE>http://example.com/moodle/admin/cron.php?p=pword</PRE>\r
+  <PRE>http://example.com/moodle/admin/cron.php</PRE>\r
 </BLOCKQUOTE>\r
-<P>Now, you need to set up some of way of running the script automatically. There \r
-  are two main ways of doing this, 'externally' and 'internally'. </P>\r
+<P>Now, you need to set up some of way of running the script automatically and \r
+  regularly. </P>\r
 <BLOCKQUOTE> \r
-  <H4>External cron</H4>\r
-  <P>You can set up a program to call the page just as you did in the example \r
-    above. For example, you can use a Unix utility like 'wget':<BR>\r
-  </P>\r
+  <H4>Running the script from a command line</H4>\r
+  <P>You can call the page from the command line just as you did in the example \r
+    above. For example, you can use a Unix utility like 'wget':</P>\r
   <BLOCKQUOTE> \r
-    <PRE>wget -q -O /dev/null 'http://example.com/moodle/admin/cron.php?p=pword'</PRE>\r
+    <PRE>wget -q -O /dev/null http://example.com/moodle/admin/cron.php</PRE>\r
   </BLOCKQUOTE>\r
   <P>Note in this example that the output is thrown away (to /dev/null).</P>\r
-  <P>To automate the running of this script every 5 minutes you can use Unix <B>cron</B>. \r
-    Edit your cron settings from the commandline using &quot;crontab -e&quot; \r
-    and add a line like:</P>\r
-  <BLOCKQUOTE> \r
-    <PRE>*/5 * * * * wget -q -O /dev/null 'http://example.com/moodle/admin/cron.php?p=pword'\r
+  <P>The same thing using lynx:</P>\r
+  <blockquote> \r
+    <pre>lynx -dump http://example.com/moodle/admin/cron.php &gt; /dev/null</pre>\r
+  </blockquote>\r
+  <P>Alternatively you could use a standalone version of PHP, compiled to be run \r
+    on the command line. The advantage with doing this is that your web server \r
+    logs aren't filled with constant requests to cron.php. The disadvantage is \r
+    that you need to have access to a command-line version of php.</P>\r
+  <blockquote> \r
+    <PRE>/opt/bin/php /web/moodle/admin/cron.php\r
+\r
+\r
+(Windows) C:\apache\php\php.exe C:\apache\htdocs\moodle\admin\cron.php\r
+\r
 </PRE>\r
-  </BLOCKQUOTE>\r
-  <P>On non-Unix platforms you will need to find another way to do this (and let \r
-    me know so I can update this documentation!)</P>\r
-  <H4>Internal cron</H4>\r
-  <P>To run the cron.php script internally, you need a version of PHP compiled \r
-    to be run from the command-line, also called a &quot;cgi&quot; version. On \r
-    a Unix machine, you can now run the script with your password as the first \r
-    parameter, something like this:</P>\r
-  <BLOCKQUOTE>\r
-    <PRE>/opt/bin/php /web/moodle/admin/cron.php pword</PRE>\r
-  </BLOCKQUOTE>\r
-  <P>As before you can automate this using Unix cron (or the equivalent on your \r
-    OS):</P>\r
+  </blockquote>\r
+  <h4>Automatically running the script every 5 minutes</h4>\r
+  <P>On Unix systems: Use <B>cron</B>. Edit your cron settings from the commandline \r
+    using &quot;crontab -e&quot; and add a line like:</P>\r
   <BLOCKQUOTE> \r
-    <PRE>*/5 * * * * (/opt/bin/php /web/moodle/admin/cron.php pword) &amp;&gt; /dev/null\r
-</PRE>\r
+    <PRE>*/5 * * * * wget -q -O /dev/null http://example.com/moodle/admin/cron.php</PRE>\r
   </BLOCKQUOTE>\r
+  <P>On WIndows systems: Use my little Windows Moodle-cron package. (coming soon)</P>\r
+  <P>Other platforms: you will need to find another way to do this (please let \r
+    me know so I can update this documentation).<br>\r
+  </P>\r
 </BLOCKQUOTE>\r
-<P>The advantage with running the script internally is that your web server logs \r
-  aren't filled with constant requests to cron.php. The disadvantage is that you \r
-  need to have access to a command-line version of php.</P>\r
-<P>&nbsp;</P>\r
 <H3><A NAME="course"></A>Create a new course</H3>\r
 <P>Now that Moodle is running properly, you can create a course. </P>\r
 <P>Start on the admin page ( http://example.com/moodle/admin ) and select &quot;Create \r
   a new course&quot;.</P>\r
-<P>Fill out the form, paying special attention to the course format. </P>\r
-<P>If you choose a &quot;weekly&quot; format, then course modules will be arranged \r
-  by &quot;weeks&quot;. The weeks in your course are defined by the start and \r
-  end dates you choose on this form. The idea is that the next time you run this \r
-  course, you can just change the dates and keep the essential course format.</P>\r
-<P>The &quot;non-weekly&quot; format is for courses that don't have a start or \r
-  finish, and so any start/end dates you choose will be ignored.</P>\r
+<P>Fill out the form, paying special attention to the course format.</P>\r
+<P>If you choose a &quot;<strong>weekly</strong>&quot; format, then course modules \r
+  will be arranged in sections called &quot;weeks&quot;. The weeks in your course \r
+  are defined by the start date and the number of weeks you choose on this form. \r
+  The idea is that the next time you run this course, you can just change the \r
+  dates and keep the essential course format.</P>\r
+<P>The &quot;<strong>topics</strong>&quot; format is pretty much the same, except \r
+  it doesn't use &quot;weeks&quot;. Useful when you arrange a course into different-sized \r
+  chunks of time. The start date will not be used on the main course display.</P>\r
+<P>The &quot;<strong>social</strong>&quot; format is for courses that don't have \r
+  a start or finish. It is basically arranged around one big forum and works a \r
+  nice replacement to standard mailing lists. Again the start date will not affect \r
+  the operation of the course - it will only affect the display of logs.</P>\r
 <P>Press &quot;Update this course&quot;, and you will be taken to a new form where \r
-  you can add teachers to the course. You can only add existing user accounts \r
+  you can assign teachers to the course. You can only add existing user accounts \r
   from this form - if you want to create a new teacher account then either ask \r
   the teacher to create one for themselves (see the login page), or create one \r
-  for them using the &quot;Create a user account&quot; on the Admin page.</P>\r
+  for them using the &quot;Add a new user&quot; on the Admin page.</P>\r
 <P>Once done, your course is ready to customise, and is accessible via the &quot;Courses&quot; \r
   link on the home page.</P>\r
 <P>See the &quot;<A HREF="teacher.html">Teacher Manual</A>&quot; for more details \r