Cara Install Moodle di Ubuntu 18.04
Moodle adalah perangkat lunak open source berbasis web untuk e-learning atau membuat kelas belajar secara online. Moodle banyak diterapkan di sekolah dan perguruan tinggi termasuk di Indonesia.
Proyek Moodle dipimpin oleh Moodle HQ di mana secara finansial didukung oleh lebih dari 80 perusahaan mitra Moodle.
Fitur Moodle antara lain:
- Modern, easy to use interface
- Personalised Dashboard
- Collaborative tools and activities
- All-in-one calendar
- Convenient file management
- Simple and intuitive text editor
Daftar fitur Moodle secara lengkap baca di sini.
0.Perangkat Lunak yang digunakan
Perangkat lunak yang digunakan di tutorial ini adalah:
- OS: Ubuntu 18.04
- Web server: Apache 2.4
- PHP Engine: PHP v7.2
- Database: MariaDB 10.1
- Moodle: Moodle v3.8
- Subomain: moodle.defnex.com
- SSL: Let’s Encrypt
1.Install Apache
Update Ubuntu terlebih dahulu
1 2 | apt update apt upgrade -y |
Install Apache web server
1 2 | apt install apache2 -y systemctl status apache2 |
2.Install PHP
Install PHP
1 | apt install php php-common php-pspell php-curl php-gd php-intl php-mysql php-xml php-xmlrpc php-ldap php-zip php-soap php-mbstring libapache2-mod-php -y |
3.Install MariaDB
Install MariaDB database
1 2 3 | apt install mariadb-server -y systemctl status mariadb mysql_secure_installation |
Jawab pertanyaannya
1 2 3 4 5 | Set root password? [Y/n] y Remove anonymous users? [Y/n] y Disallow root login remotely? [Y/n] y Remove test database and access to it? [Y/n] y Reload privilege tables now? [Y/n] y |
Konfigurasi MariaDB
1 | vim /etc/mysql/mariadb.conf.d/50-server.cnf |
Tambahkan konfigurasinya di bawah [mysqld]
1 2 3 4 | default_storage_engine = innodb innodb_file_per_table = 1 innodb_file_format = Barracuda innodb_large_prefix = 1 |
Restart MariaDB
1 2 | systemctl restart mariadb systemctl status mariadb |
Membuat database untuk Moodle
1 2 3 4 5 6 7 | mysql -u root -p CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'usrmoodle'@'localhost' IDENTIFIED BY 'secret'; GRANT ALL PRIVILEGES ON moodle.* TO 'usrmoodle'@'localhost'; FLUSH PRIVILEGES; exit |
4.Download Moodle
Download Moodle v3.8
1 2 | wget https://download.moodle.org/download.php/direct/stable38/moodle-latest-38.tgz tar xzvf moodle-latest-38.tgz |
Membuat folder untuk Moodle
1 2 3 4 | mkdir -p /var/www/moodle/data mv moodle /var/www/moodle/web chown -R www-data:www-data /var/www/moodle chmod -R 755 /var/www/moodle |
Konfigurasi virtual host untuk moodle.defnex.com
1 2 | cd /etc/apache2/sites-available/ vim moodle.defnex.com.conf |
Masukkan konfigurasi virtual host
1 2 3 4 5 6 7 8 9 10 11 | <VirtualHost *:80> ServerName moodle.defnex.com DocumentRoot /var/www/moodle/web <Directory /var/www/moodle/web> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> ErrorLog /var/log/apache2/moodle.defnex.com_error.log CustomLog /var/log/apache2/moodle.defnex.com_requests.log combined </VirtualHost> |
Aktifkan virtual host dan restart Apache
1 2 3 | a2ensite moodle.defnex.com.conf systemctl restart apache2 systemctl status apache2 |
5.Install SSL Let’s Encrypt
Download certbot-auto
1 2 3 4 | cd curl -O https://dl.eff.org/certbot-auto mv certbot-auto /usr/local/bin/certbot-auto chmod 0755 /usr/local/bin/certbot-auto |
Request SSL untuk subdomain moodle.defnex.com
1 | certbot-auto --apache -d moodle.defnex.com |
Install packages, Do you want to continue? [Y/n], jawab y
1 2 3 | Need to get 66.4 MB of archives. After this operation, 194 MB of additional disk space will be used. Do you want to continue? [Y/n] y |
Masukkan alamat email
1 | Enter email address (used for urgent renewal and security notices) (Enter 'c' to cancel): hai@musaamin.web.id |
Setujui ToS
1 2 3 | Please read the Terms of Service at https://letsencrypt.org/documents/ LE-SA-v1.2-November-15-2017.pdf. You must agree in order to register with the ACME server at https://acme-v02.api.letsencrypt.org/directory - - - - - - - - - - - - - - - - - - - - - - - - - - - (A)gree/(C)ancel: A |
Persetujuan untuk dikirimi informasi mengenai Let’s Encrypt, bisa jawab Y atau N.
1 2 3 | Would you be willing to share your email address with the Electronic Frontier Foundation, a founding partner of the Let's Encrypt project and the non-profit organization that develops Certbot? We'd like to send you email about our work encrypting the web, EFF news, campaigns, and ways to support digital freedom. - - - - - - - - - - - - - - - - - - - - - - - - - - - (Y)es/(N)o: N |
Sertifikat SSL dibuat, mengubah dan menambahkan konfigurasi virtual host untuk SSL.
1 2 3 | Obtaining a new certificate Performing the following challenges: http-01 challenge for moodle.defnex.com |
Kemudian pilih 2 untuk redirect HTTP ke HTTPS.
1 2 3 4 5 6 | Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1: No redirect - Make no further changes to the webserver configuration. 2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for new sites, or if you're confident your site works on HTTPS. You can undo this change by editing your web server's configuration. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2 |
Install SSL untuk moodle.defnex.com selesai
1 | Congratulations! You have successfully enabled https://moodle.defnex.com |
Sertifikat SSL hanya berlaku selama 90 hari, renew untuk memperbarui sertifikat SSL
1 | cerbot-auto renew |
6.Install Moodle
Browse https://moodle.defnex.com
Pemilihan bahasa, Next
Data directory isi dengan /var/www/moodle/data
Database driver, Type pilih MariaDB (native/mariadb)
Masukkan nama database, user database, dan password database
Konfirmasi lisensi, Continue
Pemeriksaan server apakah server sudah siap untuk install Moodle
Installation berjalan
Membuat akun administrator
Masukkan Full site name, Short name for site dan Front page summary
Jika berhasil, langsung masuk ke dashboard administrator
Selamat mencoba 🙂
terimakasih pak
pada bagian Konfigurasi MySQL file 50-server.cnf di server saya tidak ada pak, dir mariadb.conf.d kosong, posisi 10.3.23-MariaDB Debian Buster, apakah ada saran pak?
cari file config yang ada opsi [mysqld]