Skip to content

Instantly share code, notes, and snippets.

@nanusdad
Last active December 21, 2023 16:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nanusdad/1bad23140e3612f3d1212df028efa5b9 to your computer and use it in GitHub Desktop.
Save nanusdad/1bad23140e3612f3d1212df028efa5b9 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

@muhammaddadu
Copy link

wget https://download.moodle.org/download.php/direct/stable403/moodle-latest-403.tgz for latest release

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