This script is for installing Moodle LMS on LAPP stack (Linux, Apache, PostgreSQL, PHP) in CentOS 8. It will also create a database and database user to be used by Moodle.
- Download the source code or use
git clone
if you already havegit
installed.# git clone https://github.com/rashidrazak/moodle-installer.git
- Put it in
/root
directory, or any other directory. Doesn't really matter.# cp -r moodle-installer /root
- Copy the
.env-sample
to a new file and rename it as.env
.# cd /root/moodle-installer # cp .env-sample .env
- Fill in the details in
.env
file correctly. - Make
install_lapp.sh
executable:# chmod +x install_lapp.sh
- Run the script to install LAPP and Moodle LMS.
# ./install_lapp.sh
- When the script is done, you may visit your URL to see the newly installed Moodle.
- This script has been tested on a freshly provisioned Linode VPS running CentOS 8.
- This script is only meant for provisioning Moodle LMS and LAPP stack in an empty server.
- DO NOT use it if you have any other things installed on your server. This script is meant for getting Moodle up and running quickly on a fresh server.
This script will install the followings:
Packages | Version | Remarks |
---|---|---|
Apache | 2.4.46 | httpd |
PostgreSQL | 10.6 | psql |
PHP | 7.2 | php |
Moodle | 3.9.2 |
- Install Apache
- Install PostgreSQL
- Install PHP
- Install Moodle LMS
- Create a new user with superuser privilege
- Make script more dynamic with checking for pre-installed packages
- Support for Apache virtual host
- Support for SSL and auto SSL installation
- Make single-file executable from curl