• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

How to Install Moodle on Ubuntu Server 16.04

How VPS by How VPS
January 1, 2020
in Linux
0
0
SHARES
22
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Preparation
    1. Step 1
    2. Step 2
    3. Step 3
    4. Step 4
    5. Step 5
  3. Conclusion
  4. Want to contribute?


Moodle is a popular, robust open-source learning platform to create personalized learning environments supported by a global community of people that powers learning environments worldwide. In this guide you will learn how to install and setup Moodle on your Ubuntu 16.04 server instance.

Prerequisites

  • A 1GB Ubuntu Server 16.04 server instance.
  • The typical LAMP stack (Apache, MySQL and PHP).

Preparation

Step 1

  1. Update the OS packages: apt-get update
  2. Install the required PHP modules: apt-get install aspell graphviz php7.0-curl php7.0-gd php7.0-intl php7.0-ldap php7.0-mysql php7.0-pspell php7.0-xml php7.0-xmlrpc php7.0-zip
  3. Restart the Apache web server: service apache2 restart

Step 2

Download Moodle via Curl from the official Moodle distribution server.

  1. Download the Moodle files: curl -L https://download.moodle.org/download.php/direct/stable32/moodle-latest-32.tgz > moodle.tgz
  2. Extract the Moodle files from the downloaded archive and place them in the default Apache document root: sudo tar -xvzf moodle.tgz -C /var/www/html

Step 3

We are now going to create a directory for Moodle outside the web root folder to store course related data. This is a more secure approach compared to storing the course data inside the Moodle root directory:

  1. Create the directory: mkdir /var/moodledata
  2. Change the ownership of the directory so the web server user has access to it: chown -R www-data /var/moodledata
  3. Set the proper permissions of the directory: chmod -R 0770 /var/moodledata

Step 4

Now we need to create the MySQL database that Moodle will use to store its data. We’ll configure MySQL to follow the structure which Moodle expects. and create a user for the database.

Open up the MySQL config file.

nano /etc/mysql/mysql.conf.d/mysqld.cnf

Under the “Basic Settings” section, add the following lines.

default_storage_engine = innodb
innodb_file_per_table = 1
innodb_file_format = Barracuda

Save the config file and restart MySQL.

service mysql-server restart

Now we can create the database.

Login to MySQL.

mysql -u root -p

Enter the root password when prompted which you specified during the MySQL setup.

Step 5

Enter the following command to create the database.

CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Create the database user permissions for the database.

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodler'@'localhost' IDENTIFIED BY 'YourMoodlePassword';

Exit the MySQL CLI.

quit;

Note: You should use a secure password for your database.

Conclusion

Congratulations! You now have a successful installation of Moodle running on your Ubuntu Server 16.04 instance. To complete the installation, open your browser and navigate to http://YOUR_SERVER_IP/moodle. This should be very straightforward but you can always refer to the official installation guide.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How To Install Rancher on Ubuntu 14.04

Next Post

How To Compile squid3 on Ubuntu 12.04

Next Post

How To Compile squid3 on Ubuntu 12.04

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet