<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/test/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dbr4good</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/test/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dbr4good"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/Special:Contributions/Dbr4good"/>
	<updated>2026-08-16T21:25:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Ubuntu&amp;diff=26962</id>
		<title>Step-by-step Install Guide for Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Ubuntu&amp;diff=26962"/>
		<updated>2007-09-13T15:09:02Z</updated>

		<summary type="html">&lt;p&gt;Dbr4good: /* Install other software */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.ubuntu.com/products/GetUbuntu/download#lts Ubuntu 6.06 LTS server CD]&lt;br /&gt;
*A test x86 desktop computer, keyboard, monitor, mouse, and firewalled internet connection.&lt;br /&gt;
*One hour of time. (seriously!)&lt;br /&gt;
&lt;br /&gt;
== Directions ==&lt;br /&gt;
&lt;br /&gt;
=== Install Ubuntu ===&lt;br /&gt;
Start computer and use F12 to boot from CD.&lt;br /&gt;
&lt;br /&gt;
Select &#039;&#039;&#039;Install to hard drive&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Select your &#039;&#039;&#039;language&#039;&#039;&#039;, &#039;&#039;&#039;country&#039;&#039;&#039;, and &#039;&#039;&#039;keyboard layout&#039;&#039;&#039; (i.e. English, United States, American English)&lt;br /&gt;
&lt;br /&gt;
Select &#039;&#039;&#039;[http://help.ubuntu.com/6.06/ubuntu/serverguide/C/network-configuration.html manually configure]&#039;&#039;&#039; and set an IP address (or autoconfig if you don&#039;t know). &lt;br /&gt;
&lt;br /&gt;
Enter your servername (i.e. moodletest)&lt;br /&gt;
&lt;br /&gt;
Select to &#039;&#039;&#039;manually edit the partition table&#039;&#039;&#039;.  I’m doing my testing on a standard 40GB harddrive and will modify these sizes for production.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;table&amp;gt;&lt;br /&gt;
:&amp;lt;tr&amp;gt;&amp;lt;td width=%10&amp;gt;/boot&amp;lt;/td&amp;gt;&amp;lt;td width=%10&amp;gt;ext3&amp;lt;/td&amp;gt;&amp;lt;td align=right width=%10&amp;gt;200MB&amp;lt;/td&amp;gt;&amp;lt;td align=center width=%10&amp;gt;bootable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;([http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ref-guide/s1-grub-whatis.html may need to be under cylinder 1024 on your harddrive to be bootable])&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
:&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;/&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ext3&amp;lt;/td&amp;gt;&amp;lt;td align=right&amp;gt;10GB&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;(files are relatively static)&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
:&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;swap&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=right&amp;gt;4GB&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;(4xRAM if you don&#039;t have much memory, down to 1xRAM if you have gobs of memory)&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
:&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;/var&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ext3&amp;lt;/td&amp;gt;&amp;lt;td align=right&amp;gt;26GB&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;(variable content – uses rest of the drive)&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
:&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Select your &#039;&#039;&#039;timezone&#039;&#039;&#039;. (i.e. Central)&lt;br /&gt;
&lt;br /&gt;
Set clock to &#039;&#039;&#039;Universal Time&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Enter Administrators &#039;&#039;&#039;full name&#039;&#039;&#039;. (i.e. Joe Smith)&lt;br /&gt;
&lt;br /&gt;
Enter &#039;&#039;&#039;account name&#039;&#039;&#039;. (i.e. joesmith)&lt;br /&gt;
&lt;br /&gt;
Enter a secure password.  (‘abcde’ is not a good one!)&lt;br /&gt;
&lt;br /&gt;
Let the computer restart.&lt;br /&gt;
&lt;br /&gt;
Log in your account.&lt;br /&gt;
&lt;br /&gt;
Edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file. Remove the &#039;&#039;#&#039;&#039; mark on lines 22 and 38 to enable access to the universe package source and universe security updates. You will need to re-enter your account password when &#039;&#039;sudo&#039;&#039; asks for it.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
&lt;br /&gt;
sudo apt-get dselect-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Normally you would just use &#039;&#039;[http://help.ubuntu.com/6.06/ubuntu/serverguide/C/apt-get.html sudo apt-get upgrade]&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel!&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install MySQL (skip Postgresql) ===&lt;br /&gt;
At this point we&#039;ll need to log in again to the server and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install mysql-server php5-mysqli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press &#039;&#039;Y&#039;&#039; to continue the install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Replace the following string &#039;&#039;NewRootDatabasePassword&#039;&#039; with a secure password of your own choosing.&lt;br /&gt;
&lt;br /&gt;
There is no space between the &#039;&#039;-p&#039;&#039; and the password on the second command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysqladmin –u root password NewRootDatabasePassword&lt;br /&gt;
&lt;br /&gt;
mysqladmin -u root -h localhost password NewRootDatabasePassword -pNewRootDatabasePassword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now need to create the Moodle database and Moodle user in MySQL.&lt;br /&gt;
&lt;br /&gt;
The mysql command will prompt for your &#039;&#039;NewRootDatabasePassword&#039;&#039; (from above).&lt;br /&gt;
Replace &#039;&#039;NewMoodleDatabasePassword&#039;&#039; with a secure password of your own choosing.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mysql -u root -p&lt;br /&gt;
&amp;gt; CREATE DATABASE moodle;&lt;br /&gt;
&amp;gt; GRANT ALL ON moodle.* TO moodle@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; FLUSH PRIVILEGES;&lt;br /&gt;
&amp;gt; QUIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Postgresql (skip MySQL) ===&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install postgresql-8.1 php5-pgsql&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We now need to create the database user &#039;moodle&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo -u postgres createuser -D -A -P moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Enter in a &#039;&#039;NewMoodleDatabasePassword here&#039;&#039;, then answer &#039;N&#039; to the question.&lt;br /&gt;
&lt;br /&gt;
We now need to create the database &#039;moodle&#039; for the user &#039;moodle&#039;. You&#039;ll need to enter the password that you just created.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo -u postgres createdb -E utf8 -O moodle moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Let&#039;s now secure the postgresql database with an admin password. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo -u postgres psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Edit the file &#039;/etc/postgresql/8.1/main/pg_hba.conf&#039; and on line 79 change the words &#039;&#039;ident sameuser&#039;&#039; to &#039;&#039;md5&#039;&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Apache ===&lt;br /&gt;
&lt;br /&gt;
The following mod-security, ldap, and odbc libraries are optional.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install apache2 libapache2-mod-php5 php5-gd&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install libapache2-mod-security php5-ldap php5-odbc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install ntp-simple openssh-server unattended-upgrades&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install unzip zip aspell-en aspell-fr aspell-de aspell-es&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install clamav-base clamav-freshclam clamav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press &#039;&#039;Y&#039;&#039; to continue the install after each of these apt-get commands.&lt;br /&gt;
&lt;br /&gt;
The clamav package will support virus checking on file uploads into Moodle. May have to run it again to configure properly.&lt;br /&gt;
&lt;br /&gt;
Additional languages are available for aspell.&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /var/www&lt;br /&gt;
&lt;br /&gt;
sudo wget http://download.moodle.org/stable17/moodle-latest-17.tgz&lt;br /&gt;
&lt;br /&gt;
sudo tar –zxf moodle-latest-17.tgz&lt;br /&gt;
&lt;br /&gt;
sudo mkdir /var/moodledata&lt;br /&gt;
&lt;br /&gt;
sudo chown -R www-data.www-data /var/moodledata /var/www/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now need to edit the location of the default web site.  On lines five and ten, replace &#039;&#039;/var/www/&#039;&#039; with &#039;&#039;/var/www/moodle/&#039;&#039;. Restart Apache.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo nano /etc/apache2/sites-available/default  &lt;br /&gt;
&lt;br /&gt;
sudo /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Moodle website ===&lt;br /&gt;
ifconfig (look for your server’s ip address on the 2nd line)&lt;br /&gt;
&lt;br /&gt;
On another computer open a web browser and put in your server address&lt;br /&gt;
&lt;br /&gt;
Complete the Moodle install using a secure username and password&lt;br /&gt;
&lt;br /&gt;
Go to a bar for a few hours.&lt;br /&gt;
&lt;br /&gt;
Come back and tell your boss that you FINALLY got the test server running.&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* Setting up the [http://www.howtoforge.com/perfect_setup_ubuntu_6.06 Perfect Ubuntu 6.06 server]&lt;br /&gt;
* Ubuntu 6.06 Server Guide - [http://help.ubuntu.com/6.06/ubuntu/serverguide/C/index.html HTML] [http://help.ubuntu.com/6.06/pdf/ubuntu/C/serverguide.pdf PDF]&lt;br /&gt;
* Ubuntu - [http://help.ubuntu.com/community/Security 1] [http://www.computerworld.com/action/article.do?command=printArticleBasic&amp;amp;articleId=9002691  2] security&lt;br /&gt;
* Debian - [http://www.debian.org/security/ 1] [http://www.us.debian.org/doc/user-manuals#securing 2] security&lt;br /&gt;
* Linux - [http://www.linux-sec.net/ 1] [http://www.puschitz.com/SecuringLinux.shtml 2] [http://www.linuxsecurity.com/docs/LDP/Security-HOWTO/ 3] security&lt;br /&gt;
* MySQL - [http://dev.mysql.com/doc/refman/5.0/en/security.html 1] [http://www.securityfocus.com/infocus/1667 2] security&lt;br /&gt;
* Apache - [http://httpd.apache.org/docs/2.0/misc/security_tips.html 1] [http://www.cisecurity.org/bench_apache.html 2] security&lt;br /&gt;
* [http://www.modsecurity.org/documentation/index.html Modsecurity apache2 module]&lt;br /&gt;
* Another [http://help.ubuntu.com/community/MySQLMoodle Ubuntu and Moodle install] document&lt;br /&gt;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;/div&gt;</summary>
		<author><name>Dbr4good</name></author>
	</entry>
</feed>