Cara Pasang Moodle 3.6 Pada Debian 9

Pasang pakej-pakej yang diperlukan

apt install php7.0 libapache2-mod-php7.0 php7.0-mysql php-common php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline apache2 apache2-utils mysql-server php7.0-curl php7.0-gd php7.0-intl php7.0-zip php7.0-xml

Sediakan database

Dalam tag [server] /etc/mysql/mariadb.conf.d/50-server.cnf, tambahkan

innodb_large_prefix = ON

Simpan dan restart mariadb

systemctl restart mariadb

mysql -u root -p
create database moodle;
update mysql.user set plugin = 'mysql_native_password' where User='root';
SET GLOBAL innodb_file_format = barracuda;
\q

Pasang moodle

cd /var/www
tar -xvf /home/user1/moodle-latest-36.tgz
chown www-data /var/www/moodle
chown -R root /var/www/moodle
chmod -R 0755 /var/www/moodle
chown www-data /var/www/moodle
cd moodle/admin/cli/
sudo -u www-data /usr/bin/php install.php

Contoh setting apache2

# cat /etc/apache2/sites-available/000-default.conf

# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin [email protected]
DocumentRoot /var/www/moodle
Alias /moodle /var/www/moodle

order allow,deny
allow from all

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)