Assalamualaikum,wr,wb.
Sudah lama tidak nulis, oke mulai nulis lagi dan kali ini akan berbagi cara install moodle 3 di Linux Debian 10 menggunakan Nginx,Php-Fpm,mariadb.
Hal pertama yg perlu dilakukan adalah install osnya dulu :) , silahkan installasi os Debian 10 terlebih dahulu dengan install polos. Saya harap yang membaca blog saya ini sudah menginstall Debian 10.
Baik untuk selanjutnya silahkan login root:
INSTALL WEBSERVER NGINX
# apt-get install nginx
Kemudian start nginx dan buat otomatis boot nginx.
# systemctl start nginx.service
# systemctl enable nginx.service
Selanjutnya intsall PHP-FPM7.4
# apt-get install sudo
# apt-get install apt-transport-https lsb-release ca-certificates
# wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
# echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
# apt-get update
# apt-get upgrade
# apt-get install php7.4-fpm
# apt-get install aspell graphviz clamav php7.4-common php7.4-mbstring php7.4-xmlrpc php7.4-soap php7.4-gd php7.4-xml php7.4-intl php7.4-mysql php7.4-cli php7.4-ldap php7.4-zip php7.4-curl
# pico /etc/php/7.4/fpm/php.ini
file_uploads = On
allow_url_fopen = On
memory_limit = 128M
upload_max_filesize = 8M
max_execution_time = 60
post_max_size = 8M
cgi.fix_pathinfo = 0
Kemudian Jalankan PHP-FPM
# systemctl enable php7.4-fpm
# systemctl start php7.4-fpm
Install Database MariaDB
# apt-get install mariadb-server mariadb-client
# systemctl start mysql.service
# systemctl enable mysql.service
# mysql_secure_installation
Enter current password for root (enter for none): Enter
Set root password? [Y/n]: Y
New password: Masukkan Password
Re-enter new password: Ulangi Password
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
Selanjutnya silahkan Anda konfigurasi MariadDB
# pico /etc/mysql/mariadb.conf.d/50-server.cnf
tambahan konfigurasi berikut di bawah baris [mysqld]
default_storage_engine = innodb
innodb_file_per_table = 1
innodb_file_format = Barracuda
innodb_large_prefix = 1
# systemctl restart mariadb.service
Selanjutnya buat database dan user database untuk moodle
# mysql -u root -p
# CREATE DATABASE lmsdb;
# CREATE USER 'lmsuser'@'localhost' IDENTIFIED BY 'lms';
# GRANT ALL ON lmsdb.* TO 'lmsuser'@'localhost' IDENTIFIED BY 'lms' WITH GRANT OPTION;
# FLUSH PRIVILEGES;
# exit
Selanjutnya buat directory moodle data di /var/moodledata
# mkdir /var/moodledata
# chown -R www-data:www-data /var/moodledata
# chmod 777 /var/moodledata
Jika sudah dicopy silahkan paste config dibawah ini :
server {
listen 80;
listen [::]:80;
root /var/www/html/moodle;
index index.php index.html index.htm;
server_name lms.darmajaya.ac.id;
return 301 https://lms.darmajaya.ac.id$request_uri;
location / {
try_files $uri $uri/ =404;
proxy_read_timeout 150;
}
location ~ [^/]\.php(/|$) {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 150;
include fastcgi_params;
}
}
Jika sudah Exit kemudian Save.
# cd /tmp
# wget https://download.moodle.org/download.php/stable310/moodle-3.10.1.tgz
# tar -zxvf moodle-latest-310.tgz
# mv moodle /var/www/html/moodle
# systemctl restart nginx.service
Selanjutnya silahkan install moodle, dengan membuka alamat ip / domain Anda
-Silahkan pilih bahasa installasinya, jika sudah click next.
-Silahkan isikan website address, moodle directory ( /var/www/moodle/ ) , data directory (/var/moodledata/) , kemudian next.
- Pilih database driver mariadb, kemudian next
- isikan configurasi database
- Silahkan continue untuk setuju lisensi
- kemudian masuk kehalaman pengecekan sistem, jika sudah ok semua klik continue
- Anda akan diminta install module , klik continue
- selanjutnya isikan profil admin baik nama user dan password admin
- Selanjutnya isikan prihal website moodle Anda.