<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/310/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dsblank</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/310/en/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dsblank"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/Special:Contributions/Dsblank"/>
	<updated>2026-04-19T10:00:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/310/en/index.php?title=RedHat_Linux_installation&amp;diff=35552</id>
		<title>RedHat Linux installation</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/310/en/index.php?title=RedHat_Linux_installation&amp;diff=35552"/>
		<updated>2008-05-02T13:32:47Z</updated>

		<summary type="html">&lt;p&gt;Dsblank: &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. In addition, later distributions of Fedora (after 7) contain a moodle yum package. Installation is as easy as &#039;&#039;&#039;yum install moodle&#039;&#039;&#039;.&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;
== 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;
== Configure hostname and domain name==&lt;br /&gt;
&lt;br /&gt;
Type system-config-network to open the GUI editor.  Click on the DNS tab. In the &amp;quot;DNS Search Path&amp;quot; fill in your domain name for example myuniversity.edu. Now ensure the &amp;quot;Hostname&amp;quot; contains the computer name you will use and click activate to make changes&lt;br /&gt;
&lt;br /&gt;
== 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@uk.cvs.moodle.org:/cvsroot/moodle login&lt;br /&gt;
** cvs -z3 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co moodle&lt;br /&gt;
&lt;br /&gt;
== 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;
== 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 = &#039;/usr/moodle/mymoodle&#039;&lt;br /&gt;
** dataroot = &#039;/usr/moodle_data/mymoodle&#039;&lt;br /&gt;
* Save your changes and exit from the editor&lt;br /&gt;
&lt;br /&gt;
== 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;
** flush privileges;&lt;br /&gt;
** quit&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;
== 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;
== Set up the cron job ==&lt;br /&gt;
&lt;br /&gt;
As root user edit the /etc/crontab file using vi (or another editor) OR you can add a line to the root user&#039;s &amp;quot;personal&amp;quot; crontab (don&#039;t do both!).&lt;br /&gt;
&lt;br /&gt;
* If you wish to place an entry in your root user&#039;s crontab use:&lt;br /&gt;
** crontab -e&lt;br /&gt;
** Add the following line:&lt;br /&gt;
*** */5 * * * * /usr/bin/wget -O /dev/null http://localhost/mymoodle/admin/cron.php&lt;br /&gt;
**** (change the URL as appropriate for your site)&lt;br /&gt;
---&lt;br /&gt;
* If you wish to add an entry in /etc/crontab:&lt;br /&gt;
* Open the /etc/crontab file in an editor (vi).&lt;br /&gt;
* Add the following line:&lt;br /&gt;
** */5 * * * * root /usr/bin/wget -O /dev/null http://localhost/mymoodle/admin/cron.php&lt;br /&gt;
*** (change the URL as appropriate for your site)&lt;br /&gt;
---&lt;br /&gt;
* In either case, don&#039;t forget to save the file and exit (in vi that is &amp;lt;Esc&amp;gt;, then &#039;:wq&#039;)&lt;br /&gt;
&lt;br /&gt;
== 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;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[pl:Instalacja_w_RedHat]]&lt;/div&gt;</summary>
		<author><name>Dsblank</name></author>
	</entry>
</feed>