Difference between revisions of "Moodle: Debian 11.2 - Instalasi Moodle, Apache2, MariaDB, PHP 7.4"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 38: | Line 38: | ||
Restart apache2 | Restart apache2 | ||
− | + | su | |
− | + | systemctl restart apache2.service | |
− | + | systemctl enable apache2.service | |
− | |||
− | |||
− | |||
− | |||
==Install MariaDB== | ==Install MariaDB== | ||
− | + | su | |
+ | apt -y install mariadb-server | ||
Restart & Enable | Restart & Enable | ||
− | + | su | |
− | + | systemctl start mariadb | |
+ | systemctl enable mariadb | ||
Secure Installation | Secure Installation | ||
− | + | su | |
+ | mysql_secure_installation | ||
Enter current password for root (enter for none): | Enter current password for root (enter for none): | ||
Line 68: | Line 67: | ||
Reload privilege tables now? [Y/n] y | Reload privilege tables now? [Y/n] y | ||
− | Cek & Test | + | Cek & Test (optional) |
− | + | su | |
+ | mysql -u root -p | ||
CREATE DATABASE testdb; | CREATE DATABASE testdb; | ||
Line 106: | Line 106: | ||
# mysql -u root -p123456 | # mysql -u root -p123456 | ||
+ | |||
+ | SET PASSWORD FOR root@localhost=PASSWORD('123456'); | ||
create database moodle; | create database moodle; | ||
Line 121: | Line 123: | ||
Download language pack lewat web | Download language pack lewat web | ||
− | https://download.moodle.org/download.php | + | https://download.moodle.org/download.php/langpack/4.0/id.zip |
transfer menggunakan scp ke | transfer menggunakan scp ke | ||
Line 142: | Line 144: | ||
Download oleh manusia dari | Download oleh manusia dari | ||
− | https://download.moodle.org/download.php/ | + | https://download.moodle.org/download.php/stable400/moodle-latest-400.tgz |
+ | https://download.moodle.org/download.php/stable400/moodle-4.0.1.tgz | ||
Copykan menggunakan scp ke | Copykan menggunakan scp ke | ||
Line 152: | Line 155: | ||
cd /usr/local/src | cd /usr/local/src | ||
− | cp moodle-latest- | + | cp moodle-latest-400.tgz /var/www/html/ |
cd /var/www/html/ | cd /var/www/html/ | ||
− | tar zxvf moodle-latest- | + | tar zxvf moodle-latest-400.tgz |
chown -Rf www-data: /var/moodledata/ | chown -Rf www-data: /var/moodledata/ | ||
chmod -Rf 777 /var/www/html/moodle | chmod -Rf 777 /var/www/html/moodle | ||
Line 171: | Line 174: | ||
Confirm paths -> Selanjutnya | Confirm paths -> Selanjutnya | ||
Choose database driver | Choose database driver | ||
− | Type -> | + | Type -> MariaDB -> Selanjutnya |
Database settings | Database settings | ||
Improved MySQL (mariadb) | Improved MySQL (mariadb) |
Latest revision as of 03:51, 15 June 2022
Update Repo
su apt update
Install Apache2
su apt -y install apache2
Install PHP 7.4
su apt update apt -y install php7.4
Install extension
su 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-intl php7.4-cli \ imagemagick git zip libgd-dev libapache2-mod-php
Edit
su 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 = 5000 max_input_time = 1000
Restart apache2
su systemctl restart apache2.service systemctl enable apache2.service
Install MariaDB
su apt -y install mariadb-server
Restart & Enable
su systemctl start mariadb systemctl enable mariadb
Secure Installation
su mysql_secure_installation
Enter current password for root (enter for none): Set root password? [Y/n] y New password: Re-enter new 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
Cek & Test (optional)
su mysql -u root -p
CREATE DATABASE testdb; CREATE USER 'testuser' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON testdb.* TO 'testuser'; FLUSH PRIVILEGES; exit
Install Moodle
Setup Database
Kalau Operasional
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
Kalau hanya Latihan
Password root 123456
# mysql -u root -p123456
SET PASSWORD FOR root@localhost=PASSWORD('123456');
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/mariadb restart
Siapkan folder /var/moodledata/
Download language pack lewat web
https://download.moodle.org/download.php/langpack/4.0/id.zip
transfer menggunakan scp ke
/usr/local/src
Install language pack
cd /usr/local/src mkdir -p /var/moodledata/lang cp id.zip /var/moodledata/lang cd /var/moodledata/lang unzip id.zip chmod -Rf 777 /var/moodledata/lang/ chown -Rf www-data: /var/moodledata/lang/
Install Moodle
Download oleh manusia dari
https://download.moodle.org/download.php/stable400/moodle-latest-400.tgz https://download.moodle.org/download.php/stable400/moodle-4.0.1.tgz
Copykan menggunakan scp ke
/usr/local/src
Install
cd /usr/local/src cp moodle-latest-400.tgz /var/www/html/ cd /var/www/html/ tar zxvf moodle-latest-400.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 -> MariaDB -> Selanjutnya Database settings Improved MySQL (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
Akses Moodle
http://localhost/moodle/ http://ip-address/moodle/
Youtube
- YOUTUBE: Instalasi web server Apache2 PHP7.4 Percona5.7
- YOUTUBE: MOODLE instalasi server e-learning moodle