Install Moodle di Centos-Apache2-PHP7.4-Mariadb
Referensi https://techsbucket.com/how-to-install-moodle-lms-on-centos-8-moodle-step-by-step/
Update Centos 8[edit | edit source]
yum update -y
sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
Install software pendukung[edit | edit source]
dnf install nano
dnf install unzip
dnf install openssh-server
systemctl start sshd
systemctl enable sshd
Install Apache Server
yum install httpd
systemctl start apache.service
systemctl enable apache.service
Install PHP 7.4[edit | edit source]
Update Repiository[edit | edit source]
dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm
jika ada masalah
dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm --skip-broken
lihat yang terinstal
dnf module list php
aktifkan PHP7.4
dnf module reset php
dnf module enable php:7.4
untuk pastikan cek lagi dengan
dnf module list php
Install extension php 7.4[edit | edit source]
dnf install php php-ldap php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-curl php-zip php-common php-fpm php php-opcache php-curl php-mysqlnd php-intl
systemctl enable --now php-fpm
dnf install epel-release
Install MariaDB Database Server
Secara default repository mariadb yang terinstal di centos8adalah mariadb 10.3, untuk moodle dibutuhkan minimal mariadb 10.4
Maka kita update repositorynya dengan cara
nano /etc/yum.repos.d/MariaDB.repo
copy script di bawah ini, dan masukkan di MariaDB.repo
# MariaDB 10.5 CentOS repository list - created 2020-08-21 23:57 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos8-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
yum install mariadb-server
systemctl start mariadb
systemctl enable mariadb
Secure instalation maridb
mysql_secure_installation
Pilih no jika minta rubah socket
- Enter current password for root (enter for none):
- Set root password? [Y/n]
- New password :
- Re-enter new password :
- Remove anonymous users? [Y/n] :
- Disallow root login remotely? [Y/n] :
- Remove test database and access to it? [Y/n] :
- Reload privilege tables now? [Y/n] :
Buat database Moodle
mysql -u root -p
CREATE DATABASE moodle;
CREATE USER 'moodle'@'localhost' IDENTIFIED BY 'moodle';
GRANT ALL ON moodle.* TO 'moodle'@'localhost' IDENTIFIED BY 'moodle' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
Install Moodle[edit | edit source]
Download moodle sebagai manusia dan copy kan ke /var/www/html
karena folder var/www/html tidak bisa langsung copy file dari luar localhost,
Maka kita cpy saja dulu ke folder /var/tmp
scp moodle-latest-401.zip [email protected]: /var/tmp
cd /var//tmp
mv scp moodle-latest-401.zip /var/www/html
cd /var/www/html
unzip moodle-latest-401.zip
chmod -R 777 moodle
chown -R apache:apache moodle
Buat folder moodledata
cd /var/www
mkdir moodledata
chmod -R 777 moodledata
chown -R apache:apache moodledata
systemctl restart httpd
Lanjutkan dengan konfigurasi via web
http://localhost/moodle http://ip-address/moodle