Install Moodle and Basic Configuration

In this step, we will download and extract the Moodle source code into the web directory, create the database and DB user for Moodle, configure folder permissions, and run the Moodle installation wizard in the browser.

  1. Run sudo apt install git unzip -y to install git, unzip, and necessary utilities.
  2. Follow the steps below to download Moodle from GitHub.
    role
  • Enter the command: role

  • Install Moodle from git using the command.

role1 role1

  • Moodle has been installed.
  1. Create the moodledata directory.

role1

  • Grant permissions to the web directory role1
  1. Create a Database for Moodle.
  • Log in to MariaDB role1
  • Create database & user with the commands below:
  • CREATE DATABASE moodledb DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER ‘moodleuser’@’localhost’ IDENTIFIED BY ‘StrongPassword123!’; GRANT ALL PRIVILEGES ON moodledb.* TO ‘moodleuser’@’localhost’; FLUSH PRIVILEGES; EXIT;

createpolicy

  • Database created successfully.
  1. Access the browser to install Moodle (e.g.: http://54.255.26.77).
  • You will see the Moodle installation interface createpolicy createpolicy createpolicy
  • By default, the /var/www directory does not allow the web server (user www-data) to create subdirectories → so Moodle cannot create /var/www/moodledata.
  • You need to create the /var/www/moodledata directory in the terminal and assign appropriate permissions.
  • Run the command: createpolicy createpolicy
  • Click continue to install createpolicy

At the type section, select Improved MySQL (native/mysqli) createpolicy createpolicy

  • Fill in the required information except for the last 2 lines, then click next createpolicy Check the requirements for installing Moodle then continue createpolicy
  • Successful installation will look like the image below createpolicy
  • Continue to the admin page createpolicy
  • After updating your profile with basic information, you will be redirected to the homepage createpolicy

You have now completed setting up Moodle for the system on an EC2 Instance of AWS