Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing Moodle on AWS LightSail

Installing Moodle on AWS LightSail

Start with a new LightSail Instance running Ubuntu 20.04

  • Update
sudo apt update
  • Install Apache
sudo apt-get install apache2
  • Install PHP and required extensions
sudo apt-get install php7.4
sudo apt-get install php-mysql
sudo apt-get install php-xml
sudo apt-get install php-iconv
sudo apt-get install php-mbstring
sudo apt-get install php-curl
sudo apt-get install php-xmlrpc
sudo apt-get install php-soap
sudo apt-get install php-ctype
sudo apt-get install php-zip
sudo apt-get install php-gd
sudo apt-get install php-simplexml
sudo apt-get install php-spl
sudo apt-get install php-pcre
sudo apt-get install php-dom
sudo apt-get install php-fpm
sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php7.4-fpm
sudo apt-get install php7.4-intl
sudo apt-get install php-json
sudo systemctl reload apache2
  • Create data directory
cd /var/www/
sudo mkdir data
sudo chown -R www-data:www-data data
sudo chmod a+w data
  • Download Moodle and extract
cd /tmp
wget https://download.moodle.org/download.php/direct/stable310/moodle-3.10.tgz
cd /var/www/
sudo mv html html-orig
sudo tar xfvz /tmp/moodle-3.10.tgz 
sudo mv moodle html
sudo chown -R www-data:www-data html

Setup certbot and get new SSL certificate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment