Difference between revisions of "Instalasi Moodle di Debian"

From OnnoWiki
Jump to navigation Jump to search
Line 32: Line 32:
 
  service apache2 restart
 
  service apache2 restart
  
 +
==Setup Database==
  
Siapkan [[database]] untuk [[Moodle]], disini akan digunakan
 
[[database]] dengan nama moodle, user [[database]] dengan nama moodle
 
dan password untuk akses [[database]] adalah moodle.
 
Sedang [[password]] root [[MySQL]] di set sebagai [[password]].
 
Perintah yang digunakan untuk mengkonfigurasi adalah
 
  
  mysql
+
  mysqladmin -u root password "mySecurePassword"
  mysql> SET PASSWORD FOR root@localhost=PASSWORD('password');
+
  mysql -u root -p
  
Jika password Root [[MySQL]] [[database]] sudah di set maka
+
CREATE DATABASE moodle;
kita dapat langsung mengkonfigurasi [[MySQL]] menggunakan perintah
+
ALTER DATABASE moodle charset=utf8;
 +
exit;
  
  # mysql -u root -p
+
  /etc/init.d/mysql restart
Enter password:
 
create database moodle;
 
ALTER DATABASE moodle charset=utf8;
 
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
 
  
atau untuk latihan dapat menggunakan
 
  
# mysql -u root -p123456
 
  
create database moodle;
 
ALTER DATABASE moodle charset=utf8;
 
grant ALL on root.* to moodle@localhost;
 
grant ALL on moodle.* to moodle@localhost identified by "moodle";
 
grant ALL on moodle.* to moodle identified by "moodle";
 
exit
 
  
 
Siapkan folder /var/moodledata untuk mengcopykan terjemahan [[Moodle]]
 
Siapkan folder /var/moodledata untuk mengcopykan terjemahan [[Moodle]]

Revision as of 11:30, 4 December 2017

Pertama-tama siapkan beberapa fasiltas pendukung Moodle seperti MySQL-server, PHP dll, antara lain dapat di install melalui perintah


Untuk Debian Jeese

apt-get install apache2 php5 mysql-server php5-mysql libapache2-mod-php5 php5-gd php5-curl php5-xmlrpc php5-intl -y

Edit

vi /etc/php5/apache2/php.ini
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension=mysql.so 
extension=gd.so
;
memory_limit = 128M
post_max_size = 80M
upload_max_filesize = 80M

Restart Apache

/etc/init.d/apache2 restart

atau

service apache2 stop
service apache2 start
service apache2 restart

Setup Database

mysqladmin -u root password "mySecurePassword"
mysql -u root -p
CREATE DATABASE moodle;
ALTER DATABASE moodle charset=utf8;
exit;
/etc/init.d/mysql restart



Siapkan folder /var/moodledata untuk mengcopykan terjemahan Moodle dalam bahasa Indonesia. Terjemahan moodle dalam bahasa Indonesia dapat di ambil dari situs Moodle di http://www.moodle.org di bagian download. Tepatnya di

https://download.moodle.org/download.php/direct/langpack/2.9/id.zip
https://download.moodle.org/download.php/direct/langpack/3.0/id.zip
https://download.moodle.org/download.php/direct/langpack/3.1/id.zip

Kemudian lakukan

mkdir /var/moodledata
mkdir /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.www-data /var/moodledata/lang/

Ambil source code aplikasi Moodle yang terbaru dari situs Moodle http://www.moodle.org. Misalnya menggunakan

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

Lakukan perintah berikut untuk mengcopy dan mengextract source code pada folder Web, Untuk menjalankan Moodle versi 2.0 ke atas perlu mengubah lumayan di MySQL agar mendukung unicode


cp moodle-latest-31.tgz /var/www/html/
cd /var/www/html/
tar zxvf moodle-latest-31.tgz
chown -Rf www-data.www-data /var/moodledata/
chmod -Rf 777 /var/www/html/moodle	
chown -Rf www-data.www-data /var/www/html/moodle

Lanjutkan proses konfigurasi moodle menggunakan Web dengan cara mengakses ke alamat,

http://localhost/moodle


Edit php.ini

Upload file besar

Edit php.ini

vi /etc/php5/apache2/php.ini

atau untuk PHP 7.0

vi /etc/php/7.0/apache2/php.ini

Edit

upload_max_filesize = 100M


Kalau iseng

WARNING: ini tidak di perlukan.

PHP.ini settings:

vi /etc/php5/cli/php.ini

atau untuk PHP 7.0

vi /etc/php/7.0/apache2/php.ini


Pastikan

[opcache]
opcache.enable = 1
opcache.memory_consumption = 128
opcache.max_accelerated_files = 4000
opcache.revalidate_freq = 60

; Required for Moodle
opcache.use_cwd = 1
opcache.validate_timestamps = 1
opcache.save_comments = 1
opcache.enable_file_override = 0

; If something does not work in Moodle
;opcache.revalidate_path = 1 ; May fix problems with include paths
;opcache.mmap_base = 0x20000000 ; (Windows only) fix OPcache crashes with event id 487

; Experimental for Moodle 2.6 and later
;opcache.fast_shutdown = 1
;opcache.enable_cli = 1 ; Speeds up CLI cron
;opcache.load_comments = 0 ; May lower memory use, might not be compatible with add-ons and other apps.

Untuk Versi 2.1 ke atas

Lakukan beberapa konfigurasi untuk Moodle yang akan kita operasikan. Beberapa parameter yang perlu di set adalah,

Language       -> id  -> Selanjutnya
Confirm paths         -> Selanjutnya
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      -> Selanjutnya
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

Untuk Versi < 2.1

Lakukan beberapa konfigurasi untuk Moodle yang akan kita operasikan. Beberapa parameter yang perlu di set adalah,

Language 	-> id
Web Address 	-> http://ip-address/moodle
Type		mysql
Host Server	localhost
Database	moodleNow you need to configure the database where most Moodle data will be stored. Database may be created if database user has needed permissions, username and password must already exist. Table prefix is optional.
Pengguna	moodle
Password	moodle
Tables prefix	mdl_
[check] Unattended operation
Nama Pengguna		admin
Password baru		Admin123456!
Nama Depan		admin
Nama akhir		admin
Alamat Email		email@host
Kota			Jakarta
Pilih Negara		Indonesia
Nama Lengkap Situs	------
nama Singkat Situs	------

lengkapi username dan password untuk administrator. Pada contoh digunakan username admin dengan passNow you need to configure the database where most Moodle data will be stored. Database may be created if database user has needed permissions, username and password must already exist. Table prefix is optional.word Admin123456!

Selesai sudah proses instalasi Moodle, kita dapat mengoperasikan moodle dengan mengakses

http://localhost/moodle/


Referensi

Pranala Menarik