<?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=Lsaavedr</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=Lsaavedr"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/Special:Contributions/Lsaavedr"/>
	<updated>2026-08-20T06:01:20Z</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_Debian&amp;diff=42852</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42852"/>
		<updated>2008-08-28T11:22:02Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Word Search */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
&lt;br /&gt;
==== Virus checking ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;
May have to run it again to configure properly, for this, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /var/moodledata/quarantinedir&lt;br /&gt;
# chown www-data:www-data /var/moodledata/quarantinedir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Word Reading====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LaTeX ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install tetex-extra imagemagick&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Spell ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install aspell-es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Compression ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install zip unzip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42835</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42835"/>
		<updated>2008-08-28T00:04:06Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
&lt;br /&gt;
==== Virus checking ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;
May have to run it again to configure properly, for this, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /var/moodledata/quarantinedir&lt;br /&gt;
# chown www-data:www-data /var/moodledata/quarantinedir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Word Search ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== LaTeX ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install tetex-extra imagemagick&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Spell ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install aspell-es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Compression ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install zip unzip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42834</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42834"/>
		<updated>2008-08-28T00:03:23Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
&lt;br /&gt;
==== Virus checking ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;
May have to run it again to configure properly, for this, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /var/moodledata/quarantinedir&lt;br /&gt;
# chown www-data:www-data /var/moodledata/quarantinedir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Word Search ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== LaTeX ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install tetex-extra imagemagick&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The tetex-extra package will support write in LaTeX into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Spell ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install aspell-es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The aspell-es package will support spell spanish into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Compression ====&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install zip unzip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The zip and unzip package will support compression into Moodle.&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42833</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42833"/>
		<updated>2008-08-28T00:01:09Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
# aptitude install 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;
The clamav package will support virus checking on file uploads into Moodle. May have to run it again to configure properly, for this type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /var/moodledata/quarantinedir&lt;br /&gt;
# chown www-data:www-data /var/moodledata/quarantinedir&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The antiword package will support search in doc files into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install tetex-extra imagemagick&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The tetex-extra package will support write in LaTeX into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install aspell-es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The aspell-es package will support spell spanish into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install zip unzip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The zip and unzip package will support compression into Moodle.&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42832</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42832"/>
		<updated>2008-08-28T00:00:54Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
# aptitude install 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;
The clamav package will support virus checking on file uploads into Moodle. May have to run it again to configure properly, for this type:&lt;br /&gt;
&amp;lt;pres&amp;gt;&lt;br /&gt;
# mkdir /var/moodledata/quarantinedir&lt;br /&gt;
# chown www-data:www-data /var/moodledata/quarantinedir&lt;br /&gt;
&amp;lt;/pres&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The antiword package will support search in doc files into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install tetex-extra imagemagick&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The tetex-extra package will support write in LaTeX into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install aspell-es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The aspell-es package will support spell spanish into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install zip unzip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The zip and unzip package will support compression into Moodle.&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42830</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42830"/>
		<updated>2008-08-27T23:08:56Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
# aptitude install 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;
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;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The antiword package will support search in doc files into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install tetex-extra imagemagick&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The tetex-extra package will support write in LaTeX into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install aspell-es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The aspell-es package will support spell spanish into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install zip unzip&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The zip and unzip package will support compression into Moodle.&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42829</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42829"/>
		<updated>2008-08-27T22:57:13Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
# aptitude install 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;
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;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The antiword package will support search in doc files into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install tetex-extra imagemagick&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The tetex-extra package will support write in LaTeX into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install aspell-es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The aspell-es package will support spell spanish into Moodle.&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42828</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42828"/>
		<updated>2008-08-27T22:56:19Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
# aptitude install 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;
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;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The antiword package will support search in doc files into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install tetex-extra imagemagick&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The tetex-extra package will support write in LaTeX into Moodle.&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install aspell-es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The aspell-es package will support spell Spanish into Moodle :P.&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42827</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42827"/>
		<updated>2008-08-27T22:49:22Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
# aptitude install 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;
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;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The antiword package will support search in doc files into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install tetex-extra&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The tetex-extra package will support write in LaTeX into Moodle.&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install aspell-es&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The aspell-es package will support spell Spanish into Moodle :P.&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42826</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42826"/>
		<updated>2008-08-27T22:47:26Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
# aptitude install 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;
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;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The antiword package will support search in doc files into Moodle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install tetex-extra&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The tetex-extra package will support write in LaTeX into Moodle.&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42825</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42825"/>
		<updated>2008-08-27T22:46:58Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
# aptitude install 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;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The antiword package will support search in doc files into Moodle.&lt;br /&gt;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install tetex-extra&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tetex-extra package will support write in LaTeX into Moodle.&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42764</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42764"/>
		<updated>2008-08-27T07:20:48Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
# aptitude install 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;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The antiword package will support search in doc files into Moodle.&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42763</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42763"/>
		<updated>2008-08-27T07:19:42Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
# aptitude install 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;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The clamav package will support search in doc files into Moodle.&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42723</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42723"/>
		<updated>2008-08-26T09:53:33Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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;
# aptitude install 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;
&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install antiword&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42716</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42716"/>
		<updated>2008-08-26T05:34:42Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Other Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;
* Moodle [[Security]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42715</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42715"/>
		<updated>2008-08-26T05:30:02Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Other Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42714</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42714"/>
		<updated>2008-08-26T05:29:17Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Other Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Step-by-step_Install_Guide_for_Ubuntu| Step-by-step Install Guide for Ubuntu]]&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;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42713</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42713"/>
		<updated>2008-08-26T05:27:21Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Other Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;
&lt;br /&gt;
== Other Resources ==&lt;br /&gt;
&lt;br /&gt;
* [wiki:Step-by-step_Install_Guide_for_Ubuntu]&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;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42712</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42712"/>
		<updated>2008-08-26T05:25:29Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;
&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;br /&gt;
[[Category:Installation|Debian]]&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42711</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42711"/>
		<updated>2008-08-26T05:22:33Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Bug lighttpd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug&#039;s lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42708</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42708"/>
		<updated>2008-08-26T04:52:08Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install MySQL (skip Postgresql) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42707</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42707"/>
		<updated>2008-08-26T04:41:03Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install Apache (skip lighttpd) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
Install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42706</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42706"/>
		<updated>2008-08-26T04:40:40Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install web server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install apache2 libapache2-mod-php5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install apache2 with php5 enabled.&lt;br /&gt;
&lt;br /&gt;
And install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42705</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42705"/>
		<updated>2008-08-26T04:19:23Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install Apache */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install Apache (skip lighttpd) ====&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;
# aptitude install apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install libapache2-mod-php5 php5-gd&lt;br /&gt;
# aptitude 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;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42704</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42704"/>
		<updated>2008-08-26T04:18:51Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install web server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&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;
# aptitude install apache2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install libapache2-mod-php5 php5-gd&lt;br /&gt;
# aptitude 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;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42703</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42703"/>
		<updated>2008-08-26T04:08:30Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install MySQL (skip Postgresql) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42702</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42702"/>
		<updated>2008-08-26T03:41:23Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install Database */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude install mysql-server php5-mysql&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;
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;
# 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 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;&lt;br /&gt;
&amp;gt; GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY &#039;NewMoodleDatabasePassword&#039;;&lt;br /&gt;
&amp;gt; GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY &#039;MoodleBackupPassword&#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;
The above also creates a backup user moodlebackup so that you can use &#039;&#039;mysqldump&#039;&#039; to make database backups without accident.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42701</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42701"/>
		<updated>2008-08-26T03:37:03Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Bug lighttpd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- ---Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42700</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42700"/>
		<updated>2008-08-26T03:36:37Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Bug lighttpd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- -Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42699</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42699"/>
		<updated>2008-08-26T03:36:16Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Bug lighttpd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
---- Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42698</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42698"/>
		<updated>2008-08-26T03:35:31Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Bug cgi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug lighttpd =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
--- Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42697</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42697"/>
		<updated>2008-08-26T03:35:02Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install lighttpd (skip apache) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
===== Bug cgi =====&lt;br /&gt;
&lt;br /&gt;
This is for me, since we saw an bug exists in fastcgi, but also another bug exists on having used cgi, if it is enabled,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the installation can that it does not work, and if it works, the use is going to be terrible.&lt;br /&gt;
&lt;br /&gt;
--- Luis Saavedra.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42696</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42696"/>
		<updated>2008-08-26T03:12:53Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install lighttpd (skip apache) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php5&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod fastcgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42695</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42695"/>
		<updated>2008-08-26T03:12:00Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install lighttpd (skip apache) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable FastCGI scripts for php5, for this we need change 10-fastcgi.conf file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/lighttpd/conf-available/10-fastcgi.conf | sed s/&#039;php4&#039;/&#039;php5&#039;/g &amp;gt; 10-fastcgi.conf&lt;br /&gt;
# mv 10-fastcgi.conf /etc/lighttpd/conf-available/10-fastcgi.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then enable FastCGI module in lighttpd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42694</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42694"/>
		<updated>2008-08-26T03:00:07Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install Postgresql (skip MySQL) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable CGI scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42692</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42692"/>
		<updated>2008-08-26T01:46:23Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* 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.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable CGI scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;. You&#039;ll need to enter the password that you just created.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&lt;br /&gt;
=== Install other software ===&lt;br /&gt;
On the command line, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install 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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42691</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42691"/>
		<updated>2008-08-26T01:43:56Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable CGI scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;. You&#039;ll need to enter the password that you just created.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&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 php5-xmlrpc&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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42688</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42688"/>
		<updated>2008-08-25T21:15:49Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Configure Moodle website */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable CGI scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;. You&#039;ll need to enter the password that you just created.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42687</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42687"/>
		<updated>2008-08-25T21:15:36Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install Moodle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable CGI scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;. You&#039;ll need to enter the password that you just created.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Configure Moodle website ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ifconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
look for your server’s ip address on the 2nd line. On another computer open a web browser and put in your server address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://yourIP/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42686</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42686"/>
		<updated>2008-08-25T21:12:17Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install Moodle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable CGI scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;. You&#039;ll need to enter the password that you just created.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42685</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42685"/>
		<updated>2008-08-25T21:09:36Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install Postgresql (skip MySQL) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable CGI scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&lt;br /&gt;
$ exit&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;moodleuser&#039;. You&#039;ll need to enter the password that you just created.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42635</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42635"/>
		<updated>2008-08-25T12:07:02Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install Moodle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable CGI scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&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;moodleuser&#039;. You&#039;ll need to enter the password that you just created.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# mkdir /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/moodledata&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42634</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42634"/>
		<updated>2008-08-25T12:03:21Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable CGI scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&lt;br /&gt;
&lt;br /&gt;
==== Install Postgresql (skip MySQL) ====&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&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;moodleuser&#039;. You&#039;ll need to enter the password that you just created.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Moodle ===&lt;br /&gt;
&lt;br /&gt;
Log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/www&lt;br /&gt;
# wget http://download.moodle.org/stable19/moodle-latest-19.tgz&lt;br /&gt;
# tar -xzf moodle-latest-19.tgz&lt;br /&gt;
# chown www-data.www-data /var/www/moodle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42630</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42630"/>
		<updated>2008-08-25T11:47:37Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install Debian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable CGI scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&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;moodleuser&#039;. You&#039;ll need to enter the password that you just created.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42629</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42629"/>
		<updated>2008-08-25T11:47:09Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable CGI scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Install Database ===&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;
# aptitude 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;moodleuser&#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createuser -D -A -P moodleuser&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;moodleuser&#039;. You&#039;ll need to enter the password that you just created.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ createdb -E utf8 -O moodleuser moodle&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# su - postgres&lt;br /&gt;
$ psql template1&lt;br /&gt;
# ALTER USER postgres WITH PASSWORD &#039;NewAdminDatabasePassword&#039;;&lt;br /&gt;
# \q&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&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;
# nano /etc/postgresql/8.1/main/pg_hba.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart the database so everything is fine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/postgresql-8.1 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42628</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42628"/>
		<updated>2008-08-25T11:41:37Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install lighttpd (skip apache) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;br /&gt;
&lt;br /&gt;
We need enable CGI scripts:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and install php5 with some modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install php5-cgi php5-gd php5-curl php5-xmlrpc php5-cli&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Press Y to continue the install.&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42627</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42627"/>
		<updated>2008-08-25T11:36:58Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install web server ===&lt;br /&gt;
&lt;br /&gt;
==== Install lighttpd (skip apache) ====&lt;br /&gt;
&lt;br /&gt;
At this point we&#039;ll need to log in again to the server as root and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude install lighttpd&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 enable CGI scripts&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lighty-enable-mod cgi&lt;br /&gt;
# /etc/init.d/lighttpd force-reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42625</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42625"/>
		<updated>2008-08-25T11:24:34Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install Debian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account and edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42624</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42624"/>
		<updated>2008-08-25T11:23:36Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install Debian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account.&lt;br /&gt;
&lt;br /&gt;
Edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42623</id>
		<title>Step-by-step Install Guide for Debian</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/test/index.php?title=Step-by-step_Install_Guide_for_Debian&amp;diff=42623"/>
		<updated>2008-08-25T11:23:20Z</updated>

		<summary type="html">&lt;p&gt;Lsaavedr: /* Install Debian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What you need to start ==&lt;br /&gt;
&lt;br /&gt;
*[http://www.debian.org/CD/http-ftp/#Debian etch CD-1]&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 Debian ===&lt;br /&gt;
&lt;br /&gt;
Follow the official guide: &lt;br /&gt;
&lt;br /&gt;
http://www.debian.org/releases/stable/installmanual&lt;br /&gt;
&lt;br /&gt;
Log in the root account.&lt;br /&gt;
&lt;br /&gt;
Edit the &#039;&#039;/etc/apt/sources.list&#039;&#039; file adding the official repository nearest to your connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# nano /etc/apt/sources.list  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, from chili:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
deb http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://security.debian.org/ etch/updates main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
deb http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
deb-src http://ftp.cl.debian.org/debian/ etch main contrib&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to get all the security updates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# aptitude update&lt;br /&gt;
&lt;br /&gt;
# aptitude dist-upgrade&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And reboot to run on the new kernel! (if it is the case)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# reboot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lsaavedr</name></author>
	</entry>
</feed>