Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
KeenWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Ubuntu
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== 4 Specific Moodle requirements== Moodle needs to store files in a specific directory accessible only by the web server. It also needs to change some php configuration settings and set up a cron task. This could be done using a text editor but echo and sed, a text replacement tool, simplifies the process. * Create the moodledata directory outside your web server's document root * Set the owner and group recursively to the webserver for moodledata * Set the moodledata directory permissions so only the web server can read, write, and access them. * Set the moodledata file permissions so only the web server can read and write them. * Set file permissions for the moodle directory to read, write and execute for all during the install * Set the maximum number of input variables that PHP will accept in a single request in the php.ini config files in /etc/php/8.3/apache2 and /etc/php/8.3/cli * Call the cron.php in the moodle admin directory to run every minute sudo mkdir -p /var/www/moodledata sudo chown -R www-data:www-data /var/www/moodledata sudo find /var/www/moodledata -type d -exec chmod 700 {} \; sudo find /var/www/moodledata -type f -exec chmod 600 {} \; sudo chown -R www-data:www-data /var/www/html/moodle sudo sed -i 's/.*max_input_vars =.*/max_input_vars = 5000/' /etc/php/8.3/apache2/php.ini sudo sed -i 's/.*max_input_vars =.*/max_input_vars = 5000/' /etc/php/8.3/cli/php.ini sudo sed -i 's/.*post_max_size =.*/post_max_size = 256M/' /etc/php/8.3/apache2/php.ini sudo sed -i 's/.*post_max_size =.*/post_max_size = 256M/' /etc/php/8.3/cli/php.ini sudo sed -i 's/.*upload_max_filesize =.*/upload_max_filesize = 256M/' /etc/php/8.3/apache2/php.ini sudo sed -i 's/.*upload_max_filesize =.*/upload_max_filesize = 256M/' /etc/php/8.3/cli/php.ini echo "* * * * * /usr/bin/php /var/www/html/moodle/admin/cli/cron.php >/dev/null" | crontab -u www-data -
Summary:
Please note that all contributions to KeenWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
KeenWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)