Moodle: Ubuntu 20.04 - Instalasi Moodle, OpenLiteSpeed, MariaDB, PHP 7.4

From OnnoWiki
Jump to: navigation, search

Instalasi OpenLiteSpeed

Setup Database

Kalau Operasional

Setup root password (jika di perlukan saja)

mysql
mysql> SET PASSWORD FOR root@localhost=PASSWORD('123456');
mysql> SET PASSWORD FOR root@localhost=PASSWORD('password');

Setup database operasonal dengan username & password akses

# mysql -u root -p
Enter password:
create database moodle;
ALTER DATABASE moodle charset=utf8mb4;
ALTER DATABASE moodle CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
grant INSERT,SELECT on root.* to moodle@localhost;
grant CREATE, INSERT, SELECT, DELETE, UPDATE on moodle.* to moodle@localhost identified by "moodlepassword";
grant CREATE, INSERT, SELECT, DELETE, UPDATE on moodle.* to moodle identified by "moodlepassword";
exit

Kalau hanya Latihan

Password root 123456

# mysql -u root -p123456
create database moodle;
ALTER DATABASE moodle charset=utf8mb4;
ALTER DATABASE moodle CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
grant ALL on moodle.* to root@localhost;
grant ALL on moodle.* to moodle@localhost identified by "moodle";
grant ALL on moodle.* to moodle identified by "moodle";
exit
/etc/init.d/mysql restart

Siapkan folder moodledata

Download language pack

sudo su
cd /usr/local/src
wget https://download.moodle.org/download.php/direct/langpack/3.10/id.zip


Install language pack

apt -y install unzip
cd /usr/local/src
mkdir -p /usr/local/lsws/Example/moodledata/lang
cp id.zip /usr/local/lsws/Example/moodledata/lang
cd /usr/local/lsws/Example/moodledata/lang
unzip id.zip
chmod -Rf 777 /usr/local/lsws/Example/
chown -Rf www-data: /usr/local/lsws/Example/

Install Moodle

Download

cd /usr/local/src
wget https://download.moodle.org/download.php/direct/stable310/moodle-latest-310.tgz

Ekstrak

cd /usr/local/src
cp moodle-latest-310.tgz /usr/local/lsws/Example/html/
cd /usr/local/lsws/Example/html/
tar zxvf moodle-latest-310.tgz
chown -Rf www-data: /usr/local/lsws/Example/moodledata/
chmod -Rf 777 /usr/local/lsws/Example/moodle	
chown -Rf www-data: /usr/local/lsws/Example/moodle

Restart openlitespeed

sudo /usr/local/lsws/bin/lswsctrl restart


Lanjutkan dengan konfigurasi via web

http://localhost/moodle
http://ip-address/moodle


Language       -> id  -> Selanjutnya
Web Address           http://ip-address/moodle
Moodle Directory      /usr/local/lsws/Example/html/moodle
Data Directory        /var/moodledata/
Confirm paths         -> Selanjutnya
Choose database driver
Type -> MySQL         -> Selanjutnya
Database settings
  MariaDB (native/mariadb)
  Database host      localhost
  Database name      moodle
  Database user      moodle
  Database password  moodle
  Tables prefix      mdl_ 
  unix socket (check) -> Selanjutnya
Installation      -> Lanjut
Server checks     -> Selanjutnya
Installation
  Nama Pengguna
  Password 
  Nama Depan
  Nama akhir
  Alamat Email
  Kota
  Pilih Negara             -> Perbaharui Profile

Installation
  Nama lengkap situs
  Nama singkat untuk situs (mis. kata tunggal)
  Keterangan halaman depan -> Save Changes


Edit config.php

vi /usr/local/lsws/Example/html/moodle/config.php 
$CFG->dbtype    = 'mariadb';

Akses Moodle

http://localhost/moodle/
http://ip-address/moodle/


Youtube

Referensi


Pranala Menarik