Instalasi Moodle 3.9+, Apache2, Percona8.0, PHP7.4

Saya anggap anda sudah bisa menginstall Ubuntu 20.04 di server anda.

Update Repo

sudo apt update

Install Apache2

apt -y install apache2
sudo ufw allow 'Apache'

Install PHP 7.4

sudo apt -y install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt -y install php7.4

Install extension

sudo apt -y install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc \
php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev \
php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap \
php7.4-zip php7.4-cli php7.4-intl \
imagemagick git zip libgd-dev libapache2-mod-php 

Edit

sudo vi /etc/php/7.4/apache2/php.ini
upload_max_filesize = 100M
post_max_size = 48M
memory_limit = 512M
max_execution_time = 600
max_input_vars = 3000
max_input_time = 1000

Restart apache2

sudo systemctl restart apache2.service

Install Percona

wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
sudo apt install gdebi sudo gdebi percona-release_latest.focal_all.deb
sudo percona-release setup ps80
sudo apt-install install percona-server-server

Edit

sudo vi /etc/mysql/percona-server.conf.d/mysqld.cnf
[mysqld]
max_allowed_packet=32M

Install Moodle

Setup Database

Setup root password (jika di perlukan saja)

mysql
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


Restart mysql:
/etc/init.d/mysql restart

Install Moodle

Download

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

Install

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

Lanjutkan dengan konfigurasi via web

http://localhost/moodle
http://ip-address/moodle
Language       -> id  -> Selanjutnya
Web Address           http://ip-address/moodle
Moodle Directory      /var/www/html/moodle
Data Directory        /var/moodledata/
Confirm paths         -> Selanjutnya
Choose database driver
Type -> MySQL         -> Selanjutnya
Database settings
  Improved MySQL (native/mysqli)
  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

Akses Moodle

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

Referensi :

https://www.percona.com/doc/percona-server/LATEST/installation/apt_repo.html

https://lms.onnocenter.or.id/wiki/index.php?title=Moodle:Ubuntu_20.04-_Instalasi_Moodle,_Apache2,_Percona5.7,_PHP7.4&action=edit

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

− 4 = 2