Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Wiki Musakarta
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Lms
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
# 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.
Summary:
Please note that all contributions to Wiki Musakarta may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
My wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width