<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Installing_Moodle_on_Debian_based_distributions</id>
	<title>Installing Moodle on Debian based distributions - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Installing_Moodle_on_Debian_based_distributions"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Installing_Moodle_on_Debian_based_distributions&amp;action=history"/>
	<updated>2026-05-06T20:58:17Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Installing_Moodle_on_Debian_based_distributions&amp;diff=3961&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Installing_Moodle_on_Debian_based_distributions&amp;diff=3961&amp;oldid=prev"/>
		<updated>2024-10-18T06:40:31Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 06:40, 18 октября 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Installing_Moodle_on_Debian_based_distributions&amp;diff=175&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Installing_Moodle_on_Debian_based_distributions&amp;diff=175&amp;oldid=prev"/>
		<updated>2024-10-14T16:47:12Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;a href=&quot;http://wiki.mipt.ru/index.php?title=Installing_Moodle_on_Debian_based_distributions&amp;amp;diff=175&amp;amp;oldid=3960&quot;&gt;Внесённые изменения&lt;/a&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Installing_Moodle_on_Debian_based_distributions&amp;diff=3960&amp;oldid=prev</id>
		<title>1&gt;Emmarichardson: Added a couple of required php extensions and settings.</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Installing_Moodle_on_Debian_based_distributions&amp;diff=3960&amp;oldid=prev"/>
		<updated>2024-05-22T21:36:41Z</updated>

		<summary type="html">&lt;p&gt;Added a couple of required php extensions and settings.&lt;/p&gt;
&lt;a href=&quot;http://wiki.mipt.ru/index.php?title=Installing_Moodle_on_Debian_based_distributions&amp;amp;diff=3960&amp;amp;oldid=174&quot;&gt;Внесённые изменения&lt;/a&gt;</summary>
		<author><name>1&gt;Emmarichardson</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Installing_Moodle_on_Debian_based_distributions&amp;diff=174&amp;oldid=prev</id>
		<title>1&gt;Tim@horizoneducationnetwork.org: clean up</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Installing_Moodle_on_Debian_based_distributions&amp;diff=174&amp;oldid=prev"/>
		<updated>2022-05-20T14:18:51Z</updated>

		<summary type="html">&lt;p&gt;clean up&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Installing Moodle as a Debian package==&lt;br /&gt;
&lt;br /&gt;
Moodle used to be included as a Debian package.  It is not recommended to install using any kind of installer with Moodle.  In the long run you will be much better to install manually (or using git) so that the code is original without any alteration.&lt;br /&gt;
&lt;br /&gt;
==Installing moodle from .tgz(.tar.gz) or .zip file==&lt;br /&gt;
&lt;br /&gt;
===Step 1: Install required packages===&lt;br /&gt;
After installing your Debian distro, install these packages (if you&amp;#039;ve not already done so). See [[Installing Apache, MySQL and PHP]] or refer to the respective user manuals. Using apt-get, aptitude or synaptic you can install these very easily.&lt;br /&gt;
* Web Server (Apache highly recommended)&lt;br /&gt;
* Database Server (MySQL or PostgreSQL recommended)&lt;br /&gt;
* PHP, PHP-MySQL mod (or mod for your database)&lt;br /&gt;
* Various PHP modules necessary for Moodle&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;LAMP in Debian&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Setting up a LAMP in Debian is very easy. Once you get used to Debian administration including installation and configuration are much simpler compared to other linux distros. The following describes how to install apache, php and mysql on the Debian distribution. &lt;br /&gt;
&lt;br /&gt;
For installation of the necessary packages the easiest option to use apt-get through the command line interface.  Debian has easy access to a Root Terminal&lt;br /&gt;
&lt;br /&gt;
Use the following command to install apache2, php5 and mysql (Note: Debian is now shipping with MariaDB as default database server - I have included instructions on how to install MySQL community edition instead.)&lt;br /&gt;
MySQL Server Package install:&lt;br /&gt;
&amp;lt;code&amp;gt;wget https://dev.mysql.com/get/mysql-apt-config_0.8.6-1_all.deb&lt;br /&gt;
mysql-apt-config_0.8.6-1_all.deb&lt;br /&gt;
apt-get install gdebi-core&lt;br /&gt;
gdebi mysql-apt-config_0.8.6-1_all.deb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Update Repositories:&lt;br /&gt;
&amp;lt;code&amp;gt;apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install LAMP:&lt;br /&gt;
&amp;lt;code&amp;gt;apt-get install apache2 php7.1 mysql-server php7.1-mysql libapache2-mod-php7.1 php7.1-gd php7.1-curl php7.1-xmlrpc php7.1-intl php7.1-zip php7.1-mbstring &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mentioned packages are installed along with the dependencies depending on what was already installed on your Debian system.&lt;br /&gt;
&lt;br /&gt;
Now you may fire up a browser and type localhost to check whether the apache2 default page is shown,&lt;br /&gt;
&lt;br /&gt;
If you are familiar with apache settings, you can edit the apache configuration files using the text editor gedit or nano by typing:&lt;br /&gt;
 gedit /etc/apache2/apache2.conf&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;nano /etc/apache2/apache2.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, for a basic install, you should not need to mess with this file.&lt;br /&gt;
&lt;br /&gt;
Now we must make a few changes in the php7.1 configuration file. Open it using&lt;br /&gt;
&lt;br /&gt;
 gedit /etc/php/7.1/apache2/php.ini&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;nano /etc/php/7.1/apache2/php.ini&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
add the entries &lt;br /&gt;
 extension=mysql.so &lt;br /&gt;
 extension=gd.so&lt;br /&gt;
&lt;br /&gt;
Sometimes these entries are provided as example lines being commented out . You can remove the commenting to activate the entries.&lt;br /&gt;
Then make the following changes (adjust to your preference)&lt;br /&gt;
This will allocated more memory and allow files to be uploaded up to 80MB.  This should be enough for most multi-media files.  Hard drive space is cheap and the default is only 2MB.  It is recommended that you change the settings to the following values:&lt;br /&gt;
&lt;br /&gt;
 memory_limit = 40M&lt;br /&gt;
 post_max_size = 80M&lt;br /&gt;
 upload_max_filesize = 80M&lt;br /&gt;
&lt;br /&gt;
To test the php installation, you can create a text file named phpinfo.php with the contents &amp;lt;?phpinfo()?&amp;gt;&lt;br /&gt;
and save it at /var/www. Restart apache with the command below. Now access this file through the browser localhost/phpinfo to check the installation of php.&lt;br /&gt;
&lt;br /&gt;
You can restart apache 2 by &lt;br /&gt;
 /etc/init.d/apache2 restart&lt;br /&gt;
or&lt;br /&gt;
service apache2 restart&lt;br /&gt;
&lt;br /&gt;
===Step 2: Setup MySQL Database===&lt;br /&gt;
&lt;br /&gt;
Set a secure root password for the database (you might have already done this in the initial install process)&lt;br /&gt;
&lt;br /&gt;
 mysqladmin -u root password &amp;quot;mySecurePassword&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that on a secure production server, you will want to create a different user than root to access the database.&lt;br /&gt;
&lt;br /&gt;
Now log in&lt;br /&gt;
&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
&lt;br /&gt;
Enter your password&lt;br /&gt;
&lt;br /&gt;
Create the Moodle database&lt;br /&gt;
 mysql&amp;gt; CREATE DATABASE moodle CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;&lt;br /&gt;
(this should set the database up correctly to work with Moodle)&lt;br /&gt;
&lt;br /&gt;
Then exit the database&lt;br /&gt;
 mysql&amp;gt; exit;&lt;br /&gt;
&lt;br /&gt;
You can restart mysql by &lt;br /&gt;
 /etc/init.d/mysql restart&lt;br /&gt;
&lt;br /&gt;
===Step 3: Download moodle===&lt;br /&gt;
Download moodle from http://download.moodle.org/?lang=en.&lt;br /&gt;
&lt;br /&gt;
===Step 4: Unpack file===&lt;br /&gt;
* For zip file, use &amp;#039;&amp;#039;&amp;#039;unzip &amp;lt;your_file&amp;gt;&amp;#039;&amp;#039;&amp;#039;. For tgz(tar.gz), use &amp;#039;&amp;#039;&amp;#039;tar -zxvf &amp;lt;your-file&amp;gt;&amp;#039;&amp;#039;&amp;#039;. You can also use any of the GUI front-ends such as file-roller or ark or just let Debian unzip it with Archive Manager. You will get a folder moodle (or moodle-2.8.1 or something similar).  It will probably be located in your Downloads folder unless you told the Archive Manager or the Download utility to save it somewhere else.  We will presume it is in your Download folder.&lt;br /&gt;
&lt;br /&gt;
From terminal type&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /home/YourUSERNAME/Downloads&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;mv moodle /var/www&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also copy instead of moving it in case you want a backup of the code on your machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;cp -R moodle /var/www&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will probably need to do this as root (no problem if you are using the Root Terminal!)&lt;br /&gt;
&lt;br /&gt;
===Step 5: Create a data directory and set Moodle directory permissions===&lt;br /&gt;
Switch to the correct directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /var/www&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a directory for user and course files &lt;br /&gt;
 mkdir moodledata&lt;br /&gt;
&lt;br /&gt;
Set ownership and permissions so that Apache can access the files&lt;br /&gt;
&lt;br /&gt;
 chown -R www-data:www-data moodle&lt;br /&gt;
 chown -R www-data:www-data moodledata&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;pre&amp;gt;chmod -R 755 moodle&amp;lt;/pre&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod -R 755 moodledata&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On a production server, you may want to tighten up privileges.&lt;br /&gt;
&lt;br /&gt;
===Step 6: Change Apache to use Moodle as the web site===&lt;br /&gt;
&lt;br /&gt;
Note that the server comes with Apache running and looking at the /var/www directory.  But there is nothing in that folder, so one just gets a redirect.  Edit as follows to have it point at Moodle instead:&lt;br /&gt;
&lt;br /&gt;
gedit /etc/apache2/sites-available/default&lt;br /&gt;
or&lt;br /&gt;
 &amp;lt;pre&amp;gt;nano /etc/apache2/sites-available/default&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On about line 4, change DocumentRoot &amp;quot;/var/www/html&amp;quot; to&lt;br /&gt;
&lt;br /&gt;
 DocumentRoot &amp;quot;/var/www/moodle&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On about line 10, change &amp;lt;Directory &amp;quot;/var/www/html/&amp;quot;&amp;gt; to&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Directory &amp;quot;/var/www/moodle/&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Around line 17, comment out the line for the default page:&lt;br /&gt;
&lt;br /&gt;
 # RedirectMatch ^/$ /apache2-default/&lt;br /&gt;
&lt;br /&gt;
You can change other values like ServerAdmin if appropriate.  For all changes, you should restart Apache for the new settings to take effect.&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/apache2 restart&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
===Step 7: Finally install===&lt;br /&gt;
* Go to http://localhost/moodle and follow the instructions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Step 8: Setup Moodle===&lt;br /&gt;
&lt;br /&gt;
If you are only going to test Moodle on your internal network, just enter the local IP address as the web address.  You can find the local IP address under DHCP by typing&lt;br /&gt;
&lt;br /&gt;
 ifconfig eth0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have a web address that points to your server, use that instead.&lt;br /&gt;
&lt;br /&gt;
From a browser on another machine, enter&lt;br /&gt;
&lt;br /&gt;
 http:// ----- your web address -----&lt;br /&gt;
&lt;br /&gt;
* For the database user, enter root&lt;br /&gt;
&lt;br /&gt;
* For Password, enter the password for the database that you created earlier&lt;br /&gt;
&lt;br /&gt;
Continue through the dialogs until installed. &lt;br /&gt;
&lt;br /&gt;
===Install cron===&lt;br /&gt;
&lt;br /&gt;
Moodle needs a periodic call to do maintenance work like sending out emails, cleaning up the database, updating feeds, etc.  To run the cron every 10 minutes, do the following&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;crontab -u www-data -e&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add this line and save.&lt;br /&gt;
&amp;lt;pre&amp;gt;*/10 * * * * /usr/bin/php /var/www/moodle/admin/cli/cron.php  &amp;gt;/dev/null&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use CNTL-X to save&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
[[es:Instalando Moodle en distribuciones basadas en Debian]]&lt;br /&gt;
[[ja:Debian GNU/Linuxのインストール]]&lt;br /&gt;
[[pl:Instalacja Moodle w Debianie]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--- Categories --&amp;gt;&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>1&gt;Tim@horizoneducationnetwork.org</name></author>
	</entry>
</feed>