Professional Documents
Culture Documents
com/blog/how-to-install-moodle-on-ubuntu-18-04/
1 de 13 18/06/2020, 14:57
How to Install Moodle on Ubuntu 18.04 | LinuxHostSupport https://linuxhostsupport.com/blog/how-to-install-moodle-on-ubuntu-18-04/
# lsb_release -a
2 de 13 18/06/2020, 14:57
How to Install Moodle on Ubuntu 18.04 | LinuxHostSupport https://linuxhostsupport.com/blog/how-to-install-moodle-on-ubuntu-18-04/
# apt install apache2 libapache2-mod-php mysql-server php-mysql php-gd php-intl php-xmlrpc php-soap php-cli p
# a2enmod rewrite
# systemctl restart apache2
# nano /etc/apache2/sites-available/yourdomain.com.conf
<VirtualHost *:80>
DocumentRoot /var/www/html/moodle/
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ServerAdmin admin@yourdomain.com
<Directory /var/www/html/moodle/>
Options +FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/yourdomain.com-error.log
CustomLog /var/log/apache2/yourdomain.com-access.log combined
</VirtualHost>
# a2ensite yourdomain.com
3 de 13 18/06/2020, 14:57
How to Install Moodle on Ubuntu 18.04 | LinuxHostSupport https://linuxhostsupport.com/blog/how-to-install-moodle-on-ubuntu-18-04/
apt install nginx mysql-server php-mysql php-gd php-intl php-xmlrpc php-soap php-cli php-zip php-mbstring php
# nano /etc/nginx/sites-available/yourdomain.com.conf
server {
listen 80;
root /var/www/html/moodle;
index index.php index.html index.htm;
server_name yourdomain.com www.yourdomain.com;
location / {
try_files $uri $uri/ =404;
}
location /dataroot/ {
internal;
alias /var/www/html/moodledata/;
}
location ~ [^/]\.php(/|$) {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
# ln -s /etc/nginx/sites-available/yourdomain.com.conf /etc/nginx/sites-enabled/
# mysql_secure_installation
4 de 13 18/06/2020, 14:57
How to Install Moodle on Ubuntu 18.04 | LinuxHostSupport https://linuxhostsupport.com/blog/how-to-install-moodle-on-ubuntu-18-04/
Enter current password for root (enter for none): Just press the [Enter] key, as no password is set by defaul
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
# mysql -u root -p
mysql> quit
# wget https://download.moodle.org/download.php/direct/stable36/moodle-3.6.2.tgz
5 de 13 18/06/2020, 14:57
How to Install Moodle on Ubuntu 18.04 | LinuxHostSupport https://linuxhostsupport.com/blog/how-to-install-moodle-on-ubuntu-18-04/
6 de 13 18/06/2020, 14:57
How to Install Moodle on Ubuntu 18.04 | LinuxHostSupport https://linuxhostsupport.com/blog/how-to-install-moodle-on-ubuntu-18-04/
7 de 13 18/06/2020, 14:57
How to Install Moodle on Ubuntu 18.04 | LinuxHostSupport https://linuxhostsupport.com/blog/how-to-install-moodle-on-ubuntu-18-04/
8 de 13 18/06/2020, 14:57
How to Install Moodle on Ubuntu 18.04 | LinuxHostSupport https://linuxhostsupport.com/blog/how-to-install-moodle-on-ubuntu-18-04/
9 de 13 18/06/2020, 14:57
How to Install Moodle on Ubuntu 18.04 | LinuxHostSupport https://linuxhostsupport.com/blog/how-to-install-moodle-on-ubuntu-18-04/
10 de 13 18/06/2020, 14:57
How to Install Moodle on Ubuntu 18.04 | LinuxHostSupport https://linuxhostsupport.com/blog/how-to-install-moodle-on-ubuntu-18-04/
11 de 13 18/06/2020, 14:57
How to Install Moodle on Ubuntu 18.04 | LinuxHostSupport https://linuxhostsupport.com/blog/how-to-install-moodle-on-ubuntu-18-04/
12 de 13 18/06/2020, 14:57
How to Install Moodle on Ubuntu 18.04 | LinuxHostSupport https://linuxhostsupport.com/blog/how-to-install-moodle-on-ubuntu-18-04/
13 de 13 18/06/2020, 14:57