Difference between revisions of "USB OFFLINE: Ubuntu 24.04 Install Moodle, Apache2, MariaDB, PHP 8"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (Created page with "==Update Repo== sudo apt update sudo apt -y install software-properties-common ca-certificates lsb-release \ apt-transport-https unzip mariadb-server ==Install Apache2==...") |
Onnowpurbo (talk | contribs) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
− | ==Install PHP 8. | + | ==Install PHP 8.3 Extension== |
sudo su | sudo su | ||
− | apt -y install php8. | + | apt -y install php8.3-common php8.3-mysql php8.3-xml php8.3-xmlrpc \ |
− | php8. | + | php8.3-curl php8.3-gd php8.3-imagick php8.3-cli php8.3-dev \ |
− | php8. | + | php8.3-imap php8.3-mbstring php8.3-opcache php8.3-soap \ |
− | php8. | + | php8.3-zip php8.3-intl php8.3-cli \ |
imagemagick git zip libgd-dev libapache2-mod-php \ | imagemagick git zip libgd-dev libapache2-mod-php \ | ||
− | php8. | + | php8.3 php8.3-common libapache2-mod-php8.3 php8.3-cli |
Edit | Edit | ||
− | sudo vi /etc/php/8. | + | sudo vi /etc/php/8.3/apache2/php.ini |
upload_max_filesize = 100M | upload_max_filesize = 100M | ||
post_max_size = 48M | post_max_size = 48M | ||
memory_limit = 512M | memory_limit = 512M | ||
+ | max_input_time = 1000 | ||
+ | max_input_vars = 5000 | ||
max_execution_time = 600 | max_execution_time = 600 | ||
− | |||
− | |||
− | Switch ke PHP8. | + | |
+ | |||
+ | Switch ke PHP8.3 | ||
sudo update-alternatives --config php | sudo update-alternatives --config php | ||
− | There | + | There is 1 choice for the alternative php (providing /usr/bin/php). |
Selection Path Priority Status | Selection Path Priority Status | ||
------------------------------------------------------------ | ------------------------------------------------------------ | ||
− | + | * 0 /usr/bin/php8.3 83 auto mode | |
− | + | 1 /usr/bin/php8.3 83 manual mode | |
− | + | ||
+ | Press <enter> to keep the current choice[*], or type selection number: | ||
− | |||
− | |||
− | |||
Atau kalau cuma ada 1 PHP | Atau kalau cuma ada 1 PHP | ||
− | There is only one alternative in link group php (providing /usr/bin/php): /usr/bin/php8. | + | There is only one alternative in link group php (providing /usr/bin/php): /usr/bin/php8.3 |
Nothing to configure. | Nothing to configure. | ||
Line 133: | Line 133: | ||
Download oleh manusia dari | Download oleh manusia dari | ||
− | https://download.moodle.org/download.php/ | + | https://download.moodle.org/download.php/stable404/moodle-latest-404.tgz |
Copykan menggunakan scp ke | Copykan menggunakan scp ke | ||
Line 143: | Line 143: | ||
cd /usr/local/src | cd /usr/local/src | ||
− | cp moodle-latest- | + | cp moodle-latest-404.tgz /var/www/html/ |
cd /var/www/html/ | cd /var/www/html/ | ||
− | tar zxvf moodle-latest- | + | tar zxvf moodle-latest-404.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 |
Latest revision as of 12:48, 29 April 2024
Update Repo
sudo apt update sudo apt -y install software-properties-common ca-certificates lsb-release \ apt-transport-https unzip mariadb-server
Install Apache2
apt -y install apache2
Install PHP 8.3 Extension
sudo su apt -y install php8.3-common php8.3-mysql php8.3-xml php8.3-xmlrpc \ php8.3-curl php8.3-gd php8.3-imagick php8.3-cli php8.3-dev \ php8.3-imap php8.3-mbstring php8.3-opcache php8.3-soap \ php8.3-zip php8.3-intl php8.3-cli \ imagemagick git zip libgd-dev libapache2-mod-php \ php8.3 php8.3-common libapache2-mod-php8.3 php8.3-cli
Edit
sudo vi /etc/php/8.3/apache2/php.ini
upload_max_filesize = 100M post_max_size = 48M memory_limit = 512M max_input_time = 1000 max_input_vars = 5000 max_execution_time = 600
Switch ke PHP8.3
sudo update-alternatives --config php
There is 1 choice for the alternative php (providing /usr/bin/php). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/bin/php8.3 83 auto mode 1 /usr/bin/php8.3 83 manual mode Press <enter> to keep the current choice[*], or type selection number:
Atau kalau cuma ada 1 PHP
There is only one alternative in link group php (providing /usr/bin/php): /usr/bin/php8.3 Nothing to configure.
Restart apache2
sudo systemctl restart apache2.service sudo systemctl enable apache2.service
Install MariaDB
sudo apt -y install mariadb-server
Restart & Enable
sudo systemctl start mariadb sudo systemctl enable mariadb
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 moodle.* to root@localhost; grant CREATE, INSERT, SELECT, DELETE, UPDATE on moodle.* to usermoodle@localhost identified by "moodlepassword"; grant CREATE, INSERT, SELECT, DELETE, UPDATE on moodle.* to usermoodle 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
service mysqld start service mysqld restart
systemctl restart mysqld systemctl enable mysqld
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/stable404/moodle-latest-404.tgz
Copykan menggunakan scp ke
/usr/local/src
Install
cd /usr/local/src cp moodle-latest-404.tgz /var/www/html/ cd /var/www/html/ tar zxvf moodle-latest-404.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 (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