Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vishnumitraha/2e2cd4747e48fae0c38e2bd03e34c647 to your computer and use it in GitHub Desktop.
Save vishnumitraha/2e2cd4747e48fae0c38e2bd03e34c647 to your computer and use it in GitHub Desktop.
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

@vishnumitraha
Copy link
Author

vishnumitraha commented Aug 3, 2021

wget https://download.moodle.org/download.php/direct/stable311/moodle-3.11.2.tgz
cd /var/www/
sudo mv html html-orig
sudo tar xfvz /tmp/moodle-3.11.2.tgz
sudo mv moodle html
sudo chown -R www-data:www-data html

@vishnumitraha
Copy link
Author

timedatectl set-timezone Asia/Kolkata

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