<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/501/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sea</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/501/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sea"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/501/en/Special:Contributions/Sea"/>
	<updated>2026-04-23T17:23:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/501/en/index.php?title=RedHat_Linux_installation&amp;diff=2712</id>
		<title>RedHat Linux installation</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/501/en/index.php?title=RedHat_Linux_installation&amp;diff=2712"/>
		<updated>2005-11-23T18:14:35Z</updated>

		<summary type="html">&lt;p&gt;Sea: /* STEP 7: Set up the cron job. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note : These instructions apply to RedHat version 8. They have also been found to work for RedHat 9.0 and for Fedora Core 1 and 2. Fedora Core 3 requires the php-gd package in addition to php. I see no reason why they should not work for later versions, but....&lt;br /&gt;
&lt;br /&gt;
FIRST: RTFM!! Please read carefully the Moodle installation documentation at http://moodle.org/doc/?file=install.html&lt;br /&gt;
&lt;br /&gt;
Redhat installation considerations: There are many installation options available when installing Redhat. I assume that you are installing on a server and will have selected a Server type install. There is however no reason why this should not work on a desktop or Workstation installation.&lt;br /&gt;
&lt;br /&gt;
==STEP 1: Make sure you have installed the following packages.==&lt;br /&gt;
(You will need to select the option to customize the default set of packages on installation OR bring up the package manager by putting disk 1 back in the drive for an existing system):&lt;br /&gt;
&lt;br /&gt;
* X Windows System (not vital but easier)&lt;br /&gt;
* Gnome or KDE desktop environment (as above)&lt;br /&gt;
* Server Configuration Tools&lt;br /&gt;
* Web Server&lt;br /&gt;
** Click &amp;quot;Details&amp;quot; and make sure all PHP modules are ticked (except ODBC and PGSQL, they&#039;re not neccesary)&lt;br /&gt;
** make sure not to miss the MYSQL-PHP module (not installed by default)&lt;br /&gt;
* SQL Database&lt;br /&gt;
** Click &amp;quot;Details&amp;quot; and tick MySQL server box&lt;br /&gt;
* Also make sure you set up the firewall. You probably only need to enable HTTP (and perhaps FTP and SSH) access to your server machine, unless you know different.&lt;br /&gt;
&lt;br /&gt;
==STEP 2: Download Moodle...==&lt;br /&gt;
(I will install under /usr/moodle, data in /usr/moodle_data)&lt;br /&gt;
&lt;br /&gt;
* Download your favourite version of Moodle from moodle.org (.zip archive is easiest)&lt;br /&gt;
* as Root create folder under /usr and copy zip&lt;br /&gt;
** su&lt;br /&gt;
** mkdir /usr/moodle&lt;br /&gt;
** mkdir /usr/moodle_data&lt;br /&gt;
** cp moodle_111.zip /usr/moodle&lt;br /&gt;
* If you prefer you can install the CVS version directly for all the latest features. Instead of downloading and copying the zip file..&lt;br /&gt;
** cd /usr/moodle&lt;br /&gt;
** cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/moodle login&lt;br /&gt;
** cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/moodle co moodle&lt;br /&gt;
&lt;br /&gt;
==STEP 3: Unpack and set file permission etc.==&lt;br /&gt;
&lt;br /&gt;
* Still as root we unpack moodle and rename to something appropiate (I have multiple moodle installs, hence this setup). I will call this install mymoodle.&lt;br /&gt;
** cd /usr/moodle&lt;br /&gt;
** unzip moodle_111.zip&lt;br /&gt;
** mv moodle mymoodle&lt;br /&gt;
*** (optional step - I have more than one install under /usr/moodle)&lt;br /&gt;
** mkdir /usr/moodle_data/mymoodle&lt;br /&gt;
*** (same name as the moodle install above)&lt;br /&gt;
** chown -R apache:apache /usr/moodle&lt;br /&gt;
*** (! Giving Apache full rights to your Moodle programs is not secure. Check out the forums for recomendations on how to secure a production environment.)&lt;br /&gt;
** chown -R apache:apache /usr/moodle_data&lt;br /&gt;
&lt;br /&gt;
==STEP 4: Setup config.php==&lt;br /&gt;
&lt;br /&gt;
* Still as root copy and edit the config file, you should know the host/domain name for your server&lt;br /&gt;
** cd /usr/moodle/mymoodle&lt;br /&gt;
** cp config-dist.php config.php&lt;br /&gt;
** vi config.php (or whatever your favourite editor is!)&lt;br /&gt;
* Your config.php settings should be something like...&lt;br /&gt;
** dbtype = &amp;quot;mysql&amp;quot;&lt;br /&gt;
** dbhost = &amp;quot;localhost&amp;quot;&lt;br /&gt;
** dbname = &amp;quot;mymoodle&amp;quot;&lt;br /&gt;
** dbuser = &amp;quot;moodleuser&amp;quot;&lt;br /&gt;
** dbpass = &amp;quot;moodlepass&amp;quot; (&amp;lt;-- better make this something of your own)&lt;br /&gt;
** prefix = &amp;quot;&amp;quot;&lt;br /&gt;
*** (keep the default &#039;mdl_&#039; prefix if you plan on sharing the database with other applications)&lt;br /&gt;
** wwwroot = &amp;quot;http://myhost.mydomain/mymoodle&amp;quot;&lt;br /&gt;
*** (If you only want to try moodle out and will not be accessing it from other machines you can use &amp;quot;http://localhost/mymoodle&amp;quot;)&lt;br /&gt;
** dirroot = &amp;quot;/usr/moodle/mymoodle&amp;quot;&lt;br /&gt;
** dataroot = &amp;quot;/usr/moodle_data/mymoodle&amp;quot;&lt;br /&gt;
* Save your changes and exit from the editor&lt;br /&gt;
&lt;br /&gt;
==STEP 5: Setup MySQL==&lt;br /&gt;
&lt;br /&gt;
* First you need to get the MySQL daemon running, it is not running by default.&lt;br /&gt;
** On the Desktop find and launch &amp;quot;Services&amp;quot; (on KDE and Gnome it&#039;s under System Settings=&amp;gt;Server Settings=&amp;gt;Services, but you might have to hunt around).&lt;br /&gt;
** Tick the box for MySQL and (with it selected) press the Start icon - ensure it starts up&lt;br /&gt;
** Choose &amp;quot;Save Changes&amp;quot; from the menu, and exit the program.&lt;br /&gt;
* If you haven&#039;t yet, as root, change the MySQL root password&lt;br /&gt;
** mysqladmin -u root password mysqlpass (&amp;lt;-- should change this to something of your own)&lt;br /&gt;
* Next, set up the MySQL database (see http://moodle.org/doc/?file=install.html#database for more details)&lt;br /&gt;
* Launch MySQL as root&lt;br /&gt;
** mysql -u root -p&lt;br /&gt;
*** (at the password prompt, enter the password from above)&lt;br /&gt;
* At the &#039;&amp;gt;&#039; MySQL prompt, enter the following commands (MySQL commands are ended with a &#039;;&#039;)&lt;br /&gt;
** CREATE DATABASE mymoodle;&lt;br /&gt;
*** (the name &#039;mymoodle&#039; is the same name as the database from Step 4)&lt;br /&gt;
** GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER ON mymoodle.*&lt;br /&gt;
*** (as above, &#039;mymoodle&#039; is from Step 4)&lt;br /&gt;
** TO moodleuser@localhost IDENTIFIED BY &#039;moodlepass&#039;;&lt;br /&gt;
*** (&#039;moodleuser&#039; and &#039;moodlepass&#039; are from Step 4)&lt;br /&gt;
** quit&lt;br /&gt;
* Still as root, reload MySQL&lt;br /&gt;
** mysqladmin -p reload&lt;br /&gt;
* (! Consider MySQL security - not covered here. If you run a firewall, you don&#039;t have too much to worry about.)&lt;br /&gt;
&lt;br /&gt;
==STEP 6: Setup Apache==&lt;br /&gt;
&lt;br /&gt;
* Edit the Apache configuration file at /etc/httpd/conf/httpd.conf&lt;br /&gt;
* Right at the end of the file add the following lines: (once again &#039;mymoodle&#039; as from Step 3)&lt;br /&gt;
** &amp;lt;Directory &amp;quot;/usr/moodle/mymoodle&amp;quot;&amp;gt;&lt;br /&gt;
** DirectoryIndex index.php&lt;br /&gt;
** AcceptPathInfo on&lt;br /&gt;
** AllowOverride None&lt;br /&gt;
** Options None&lt;br /&gt;
** Order allow,deny&lt;br /&gt;
** Allow from all&lt;br /&gt;
** &amp;lt;/Directory&amp;gt;&lt;br /&gt;
** Alias /mymoodle &amp;quot;/usr/moodle/mymoodle&amp;quot;&lt;br /&gt;
* Don&#039;t insert a space in &amp;quot;allow,deny&amp;quot; (common mistake!)&lt;br /&gt;
* You might also want to run through the rest of the config file and make some other (obvious) changes - administrator email and suchlike. Not vital though.&lt;br /&gt;
* Run the Services application (same as for Mysql) - tick and start &amp;quot;httpd&amp;quot;, then save changes and exit.&lt;br /&gt;
&lt;br /&gt;
==STEP 7: Set up the cron job.==&lt;br /&gt;
&lt;br /&gt;
* As root user type the command:&lt;br /&gt;
** crontab -e&lt;br /&gt;
* Add the following line (you need to know vi, &#039;o&#039; adds a line in vi):&lt;br /&gt;
** */5 * * * /usr/bin/wget -g -O /dev/null http://localhost/mymoodle/admin/cron.php&lt;br /&gt;
*** (change the URL as appropriate for your site)&lt;br /&gt;
* Save the file and exit (in vi that is &amp;lt;Esc&amp;gt;, then &#039;:wq&#039;)&lt;br /&gt;
&lt;br /&gt;
==THAT&#039;S IT!! Try your new installation...==&lt;br /&gt;
&lt;br /&gt;
http://myhost.mydomain/mymoodle/admin&lt;br /&gt;
&lt;br /&gt;
or, if you are running the browser on the same machine&lt;br /&gt;
&lt;br /&gt;
http://localhost/mymoodle/admin&lt;br /&gt;
&lt;br /&gt;
If anybody tries this and comes unstuck either update this page or contact me at howard.miller@udcf.gla.ac.uk and I will try to help AND make the instructions better :-)&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Sea</name></author>
	</entry>
</feed>