Skip to main content

Cara Install Moodle di CentOS 8 dengan NGINX dan MySQL

Pada tutorial kali ini kita akan menginstall Moodle di CentOS 8. Yang akan kita gunakan disini adalah LEMP, Linux, Nginx, MySQL dan PHP. Disini silakan siapkan dengan CentOS 8 yang siap pakai, dengan RAM minimal 512MB dan diskspace sekitar 5GB-an.


Silakan install stack LEMP terlebih dulu:


dnf install php-common php-iconv php-curl php-mbstring php-xmlrpc php-soap php-zip php-gd php-xml php-intl php-json libpcre3 libpcre3-dev graphviz aspell ghostscript clamav mysql
kemudian login ke mysql dan create database untuk Moodle:
mysql -u root -p
MariaDB [(none)]> CREATE DATABASE moodledb;
MariaDB [(none)]> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodledb.* TO 'moodleadmin'@'localhost' IDENTIFIED BY '[email protected]';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit
setelah itu kita pergi ke Moodle dan download dari sana https://download.moodle.org/.
# wget -c https://download.moodle.org/download.php/direct/stable39/moodle-latest-39.tgz
# tar -xzvf  moodle-latest-39.tgz
# mv moodle /var/www/html/
# chmod 775 -R /var/www/html/moodle
# chown nginx:nginx -R /var/www/html/moodle
kemudian kita perlu menyiapkan folder data untuk Moodle,
# mkdir -p /var/www/html/moodledata
# chmod 770 -R /var/www/html/moodledata
# chown :nginx -R /var/www/html/moodledata
edit file config.php:
# cd /var/www/html/moodle/
# cp config-dist.php config.php
# vim config.php
ubah:
$CFG->dbtype    = 'mariadb';      // 'pgsql', 'mariadb', 'mysqli', 'sqlsrv' or 'oci'
$CFG->dblibrary = 'native';     // 'native' only at the moment
$CFG->dbhost    = 'localhost';  // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname    = 'moodledb';     // database name, eg moodle
$CFG->dbuser    = 'moodleadmin';   // your database username
$CFG->dbpass    = '[email protected]zzwd0L2';   // your database password
$CFG->prefix    = 'mdl_';       // prefix to use for all table names
dan juga ganti variable wwwroot dan dataroot:
$CFG->wwwroot   = 'http://learning.web.id';
$CFG->dataroot  = '/var/www/html/moodledata';
jangan gembira dulu, kita harus bikin vhost NGINX untuk moodle, misal di file:
/etc/nginx/conf.d/moodle.conf
dengan isi:
server{
   listen 80;
    server_name learning.testprojects.me;
    root        /var/www/html/moodle;
    index       index.php;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ ^(.+\.php)(.*)$ {
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        fastcgi_index           index.php;
        fastcgi_pass            php-fpm;
        include                 /etc/nginx/mime.types;
        include                 fastcgi_params;
        fastcgi_param           PATH_INFO       $fastcgi_path_info;
        fastcgi_param           SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
kemudian test config NGINX tersebut dan restart nginx serta php-fpm:
# nginx -t
# systemctl restart nginx
# systemctl restart php-fpm
setelah itu lanjutkan dengan membuka browser dan buka URL wwwroot kita. lanjutkan instalasi lewat browser sampai selesai.

Comments

Popular posts from this blog

How to Install Traefik in Debian (Without Docker)

 Download the suitable version of Traefik for your system from here: https://github.com/traefik/traefik/releases as an example, we'll be download the linux 64 bit version: wget https://github.com/traefik/traefik/releases/download/v2.8.7/traefik_v2.8.7_linux_amd64.tar.gz extract those package: tar -xzvf traefik_v2.8.7_linux_amd64.tar.gz set the traefik as executable and move the traefik binary to linux bin folder

Create AdminLTE Dashboard with NextJS

Sure, you can create an AdminLTE dashboard in a Next.js project using TypeScript. Here's a step-by-step guide:  Create a Next.js Project with TypeScript:  If you haven't already, create a new Next.js project with TypeScript by running the following commands: npx create-next-app my-adminlte-dashboard --use-npm --typescript cd my-adminlte-dashboard Install Dependencies: 

Cara Disable Antimalware Service Executable di Windows 10

Disadari atau tidak, Windows 10 (dan juga windows-windows lainnya) hadir dengan banyak sekali aplikasi bloatware (aplikasi yang tidak perlu-perlu amat dimiliki oleh end user). Contohnya, adalah aplikasi yang seharusnya sudah tergantikan fungsinya oleh antivirus, seperti Antimalware Service Executable . Aplikasi ini dicurigai membuat Windows 10 mengalami inefisiensi memori/RAM, memakan resource yang tinggi, dengan Load yang tinggi (tanpa limit terkadang). Nah, berikut adalah cara men-disable nya: Tekan tombol Windows + I untuk membuka apliaksi Windows Setting. Pilih icon menu Update and Security Pilih lagi menu disamping kiri Windows Security Pada jendela baru yang muncul, ada pilihan Virus & Threat protection Klik ini Lalu matikan proses Real-time protection tersebut. Dengan Regedit. Buka dialog regedit, Windows + R dan ketik ‘regedit’ Cari Folder regedit ini HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender Buat sebuah DWORD baru dengan klik kanan