cara install lms moodle di rhel

 



1. Install paket yang dibutuhkan

Jalankan sebagai root:

dnf install -y httpd mariadb-server php php-mysqlnd php-gd php-intl php-xml php-mbstring php-opcache php-cli unzip wget

👉 Ini akan menginstal:

  • Apache HTTP Server (web server)
  • MariaDB (database)
  • PHP (backend LMS)

2. Start & enable service

systemctl enable --now httpd
systemctl enable --now mariadb

Cek:

systemctl status httpd
systemctl status mariadb

3. Setup database Moodle

Masuk MariaDB:

mysql

Lalu jalankan:

CREATE DATABASE moodle;
CREATE USER 'moodleuser'@'localhost' IDENTIFIED BY '123';
GRANT ALL PRIVILEGES ON moodle.* TO 'moodleuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

4. Download Moodle (LMS)

cd /var/www/html
wget https://download.moodle.org/latest.zip
unzip latest.zip
mv moodle-* moodle

Buat folder data:

mkdir /var/www/moodledata
chown -R apache:apache /var/www/moodledata
chown -R apache:apache /var/www/html/moodle

5. Setting Apache Virtual Host (domain lms.17-tkja.lab)

Buat file:

nano /etc/httpd/conf.d/moodle.conf

Isi:

<VirtualHost *:80>
ServerName lms.17-tkja.lab
DocumentRoot /var/www/html/moodle

<Directory /var/www/html/moodle>
AllowOverride All
Require all granted
</Directory>

ErrorLog /var/log/httpd/moodle_error.log
CustomLog /var/log/httpd/moodle_access.log combined
</VirtualHost>

Restart Apache:

systemctl restart httpd

6. Setup DNS (BIND9 / named)

Kalau kamu pakai DNS server sendiri:

Tambahkan di zone:

lms.27-tkja.lab IN A 10.100.100.128

Restart DNS:

systemctl restart named

👉 Ini yang bikin domain bisa diakses.


7. Firewall

firewall-cmd --permanent --add-service=http
firewall-cmd --reload

8. SELinux (penting di RHEL)

setsebool -P httpd_can_network_connect 1
chown -R apache:apache /var/www/html/moodle

9. Akses di browser

Buka:

http://lms.17-tkja.lab

Lalu setup Moodle:

  • Database: moodle
  • User: moodleuser
  • Password: yang kamu buat

Komentar

Postingan populer dari blog ini

Logging in ke Mikrotik RB (952-5AC2ND) Menggunakan Win Box

Instalasi Redhat Di Virtual Box 7.2.2

instalasi debian 11 di virtualbox