Lms: Difference between revisions
No edit summary |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
== | |||
# Tutorial Instalasi Moodle di Ubuntu 22.04 dengan Nginx dan MariaDB | |||
## Persiapan | |||
1. **Perbarui Sistem:** | |||
```sh | |||
sudo apt update && sudo apt upgrade -y | |||
``` | |||
2. **Instal Dependensi:** | |||
```sh | |||
sudo apt install -y nginx mariadb-server php-fpm php-mysql php-xml php-zip php-gd php-intl php-curl php-mbstring php-soap php-xmlrpc php-json php-bcmath unzip | |||
``` | |||
## Konfigurasi MariaDB | |||
1. **Amankan Instalasi MariaDB:** | |||
```sh | |||
sudo mysql_secure_installation | |||
``` | |||
Ikuti instruksi dan setel kata sandi root serta pengaturan keamanan lainnya. | |||
2. **Buat Database dan Pengguna untuk Moodle:** | |||
```sh | |||
sudo mysql -u root -p | |||
``` | |||
Masukkan perintah berikut di prompt MariaDB: | |||
```sql | |||
CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |||
CREATE USER 'moodleuser'@'localhost' IDENTIFIED BY 'password_kuat'; | |||
GRANT ALL PRIVILEGES ON moodle.* TO 'moodleuser'@'localhost'; | |||
FLUSH PRIVILEGES; | |||
EXIT; | |||
``` | |||
## Instalasi dan Konfigurasi Nginx | |||
1. **Instal Nginx:** | |||
```sh | |||
sudo apt install nginx -y | |||
``` | |||
2. **Konfigurasi Nginx untuk Moodle:** | |||
Buat file konfigurasi Nginx untuk Moodle: | |||
```sh | |||
sudo nano /etc/nginx/sites-available/moodle | |||
``` | |||
Tambahkan konfigurasi berikut: | |||
```nginx | |||
server { | |||
listen 80; | |||
server_name example.com; | |||
root /var/www/moodle; | |||
index index.php index.html index.htm; | |||
client_max_body_size 100M; | |||
location / { | |||
try_files $uri $uri/ =404; | |||
} | |||
location ~ \.php$ { | |||
include snippets/fastcgi-php.conf; | |||
fastcgi_pass unix:/var/run/php/php-fpm.sock; | |||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |||
include fastcgi_params; | |||
} | |||
location ~* \.php$ { | |||
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; | |||
fastcgi_index index.php; | |||
include fastcgi_params; | |||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |||
} | |||
} | |||
``` | |||
Simpan dan keluar. | |||
3. **Aktifkan Konfigurasi Nginx:** | |||
```sh | |||
sudo ln -s /etc/nginx/sites-available/moodle /etc/nginx/sites-enabled/ | |||
sudo nginx -t | |||
sudo systemctl restart nginx | |||
``` | |||
## Instalasi Moodle | |||
1. **Unduh dan Ekstrak Moodle:** | |||
```sh | |||
cd /var/www | |||
sudo wget https://download.moodle.org/stable39/moodle-latest-39.tgz | |||
sudo tar -zxvf moodle-latest-39.tgz | |||
sudo mv moodle /var/www/moodle | |||
sudo chown -R www-data:www-data /var/www/moodle | |||
sudo chmod -R 755 /var/www/moodle | |||
``` | |||
2. **Buat Direktori Data Moodle:** | |||
```sh | |||
sudo mkdir /var/moodledata | |||
sudo chown -R www-data:www-data /var/moodledata | |||
sudo chmod -R 755 /var/moodledata | |||
``` | |||
## Konfigurasi PHP | |||
1. **Edit File Konfigurasi PHP:** | |||
```sh | |||
sudo nano /etc/php/7.4/fpm/php.ini | |||
``` | |||
Ubah parameter berikut: | |||
```ini | |||
post_max_size = 100M | |||
upload_max_filesize = 100M | |||
max_execution_time = 300 | |||
max_input_time = 300 | |||
memory_limit = 128M | |||
``` | |||
Simpan dan keluar. | |||
2. **Restart PHP-FPM:** | |||
```sh | |||
sudo systemctl restart php7.4-fpm | |||
``` | |||
## Penyelesaian Instalasi Moodle | |||
1. **Akses Moodle:** | |||
Buka browser dan akses `http://example.com`. Anda akan dibawa ke halaman instalasi Moodle. | |||
2. **Ikuti Wizard Instalasi:** | |||
- Pilih bahasa. | |||
- Verifikasi persyaratan server. | |||
- Masukkan detail database: | |||
- Database: `moodle` | |||
- Username: `moodleuser` | |||
- Password: `password_kuat` | |||
- Konfigurasikan administrator dan selesaikan instalasi. | |||
## Kesimpulan | |||
Setelah mengikuti langkah-langkah di atas, Moodle Anda seharusnya telah terinstal dan dikonfigurasi dengan baik di server Ubuntu 22.04 menggunakan Nginx dan MariaDB. Anda sekarang dapat mulai menggunakan Moodle untuk kebutuhan pembelajaran daring Anda. | |||
--- | |||
Anda dapat menyalin dan menempelkan teks ini ke halaman MediaWiki Anda. Pastikan untuk menyesuaikan detail seperti `example.com` dan `password_kuat` sesuai dengan konfigurasi Anda. | |||
Latest revision as of 15:07, 27 June 2024
- Tutorial Instalasi Moodle di Ubuntu 22.04 dengan Nginx dan MariaDB
- Persiapan
1. **Perbarui Sistem:**
```sh sudo apt update && sudo apt upgrade -y ```
2. **Instal Dependensi:**
```sh sudo apt install -y nginx mariadb-server php-fpm php-mysql php-xml php-zip php-gd php-intl php-curl php-mbstring php-soap php-xmlrpc php-json php-bcmath unzip ```
- Konfigurasi MariaDB
1. **Amankan Instalasi MariaDB:**
```sh sudo mysql_secure_installation ``` Ikuti instruksi dan setel kata sandi root serta pengaturan keamanan lainnya.
2. **Buat Database dan Pengguna untuk Moodle:**
```sh sudo mysql -u root -p ``` Masukkan perintah berikut di prompt MariaDB: ```sql CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'moodleuser'@'localhost' IDENTIFIED BY 'password_kuat'; GRANT ALL PRIVILEGES ON moodle.* TO 'moodleuser'@'localhost'; FLUSH PRIVILEGES; EXIT; ```
- Instalasi dan Konfigurasi Nginx
1. **Instal Nginx:**
```sh sudo apt install nginx -y ```
2. **Konfigurasi Nginx untuk Moodle:**
Buat file konfigurasi Nginx untuk Moodle:
```sh
sudo nano /etc/nginx/sites-available/moodle
```
Tambahkan konfigurasi berikut:
```nginx
server {
listen 80;
server_name example.com;
root /var/www/moodle;
index index.php index.html index.htm;
client_max_body_size 100M;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* \.php$ {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
```
Simpan dan keluar.
3. **Aktifkan Konfigurasi Nginx:**
```sh sudo ln -s /etc/nginx/sites-available/moodle /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl restart nginx ```
- Instalasi Moodle
1. **Unduh dan Ekstrak Moodle:**
```sh cd /var/www sudo wget https://download.moodle.org/stable39/moodle-latest-39.tgz sudo tar -zxvf moodle-latest-39.tgz sudo mv moodle /var/www/moodle sudo chown -R www-data:www-data /var/www/moodle sudo chmod -R 755 /var/www/moodle ```
2. **Buat Direktori Data Moodle:**
```sh sudo mkdir /var/moodledata sudo chown -R www-data:www-data /var/moodledata sudo chmod -R 755 /var/moodledata ```
- Konfigurasi PHP
1. **Edit File Konfigurasi PHP:**
```sh sudo nano /etc/php/7.4/fpm/php.ini ``` Ubah parameter berikut: ```ini post_max_size = 100M upload_max_filesize = 100M max_execution_time = 300 max_input_time = 300 memory_limit = 128M ``` Simpan dan keluar.
2. **Restart PHP-FPM:**
```sh sudo systemctl restart php7.4-fpm ```
- Penyelesaian Instalasi Moodle
1. **Akses Moodle:**
Buka browser dan akses `http://example.com`. Anda akan dibawa ke halaman instalasi Moodle.
2. **Ikuti Wizard Instalasi:**
- Pilih bahasa.
- Verifikasi persyaratan server.
- Masukkan detail database:
- Database: `moodle`
- Username: `moodleuser`
- Password: `password_kuat`
- Konfigurasikan administrator dan selesaikan instalasi.
- Kesimpulan
Setelah mengikuti langkah-langkah di atas, Moodle Anda seharusnya telah terinstal dan dikonfigurasi dengan baik di server Ubuntu 22.04 menggunakan Nginx dan MariaDB. Anda sekarang dapat mulai menggunakan Moodle untuk kebutuhan pembelajaran daring Anda.
---
Anda dapat menyalin dan menempelkan teks ini ke halaman MediaWiki Anda. Pastikan untuk menyesuaikan detail seperti `example.com` dan `password_kuat` sesuai dengan konfigurasi Anda.