How to Install Moodle with Nginx on Ubuntu 22.04

Поделиться
HTML-код
  • Опубликовано: 3 сен 2023
  • Moodle is a free and open-source Learning Management System and CMS written in PHP. It allows tutors and instructors to create courses for their students and provides long-distance education and other online learning programs more accessible. Moodle offers a simple, user-friendly and custom dashboard that helps users access current, past, or future courses and review pending work. It is designed for teachers and educators who aim to provide technology-savvy education.
    This tutorial will show you how to install Moodle with Nginx on Ubuntu 22.04.
    Useful Links:
    VPS/VDS - www.mivocloud.com/
    WARNING - ANGLED BRACKETS AREN'T ALLOWED IN DESCRIPTION SO BE ATTENTIVE TO THE VIDEO IN NANO EDITOR
    Commands Used:
    apt-get install nginx mariadb-server -y
    apt install software-properties-common ca-certificates lsb-release apt-transport-https -y
    add-apt-repository ppa:ondrej/php
    apt update
    apt install php7.4 php7.4-fpm php7.4-common php7.4-mysql php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-soap php7.4-xmlrpc php7.4-gd php7.4-xml php7.4-cli php7.4-zip unzip git curl -y
    nano /etc/php/7.4/fpm/php.ini
    systemctl restart php7.4-fpm
    mysql
    CREATE DATABASE moodledb;
    CREATE USER 'moodle'@'localhost' IDENTIFIED BY 'password';
    GRANT ALL ON moodledb.* TO 'moodle'@'localhost' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
    EXIT;
    nano /etc/mysql/mariadb.conf.d/50-server.cnf
    innodb_file_format = Barracuda
    innodb_file_per_table = 1
    innodb_large_prefix = ON
    systemctl restart mariadb
    cd /var/www/html
    git clone -b MOODLE_400_STABLE git://git.moodle.org/moodle.git moodle
    mkdir -p /var/www/html/moodledata
    chown -R www-data:www-data /var/www/html/moodle
    chmod -R 755 /var/www/html/*
    chown www-data:www-data /var/www/html/moodledata
    nano /etc/nginx/conf.d/moodle.conf
    server {
    listen 80;
    root /var/www/html/moodle;
    index index.php index.html index.htm;
    server_name moodle.example.com;
    client_max_body_size 100M;
    autoindex off;
    location / {
    try_files $uri $uri/ =404;
    }
    location /dataroot/ {
    internal;
    alias /var/www/html/moodledata/;
    }
    location ~ [^/].php(/|$) {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php7.4-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }
    }
    nginx -t
    systemctl restart nginx
    systemctl status nginx
    nano moodle/config.php
  • НаукаНаука

Комментарии • 6

  • @sword_excalibur
    @sword_excalibur 9 месяцев назад

    А как привязать домен, ссл сертификат?

    • @MivoCloud
      @MivoCloud  9 месяцев назад

      Приветствую! Имеется ввиду на сервер или что именно?

  • @agustin2574
    @agustin2574 27 дней назад

    Hola, no pude entrar a mi servidor desde otra computadora que no sea donde cree el servidor sabes que es?
    Hello I couldn’t get into my server from another pc that it wasn’t where I create the server, can you help me?

    • @MivoCloud
      @MivoCloud  26 дней назад

      Greetings! I need more information to understand your problem. Are you unable to log in to our server or are you renting from someone else? Or did you just do the server separately and try to connect remotely?

    • @agustin2574
      @agustin2574 26 дней назад

      The third option, I make the server on one pc but if I try to enter from another don’t let me in

    • @MivoCloud
      @MivoCloud  26 дней назад

      @@agustin2574 This is not the best solution because you need to understand and know a lot. Opening ports, installing connectivity, and more. However, if there is no rental option, then you should familiarize yourself with how to open ports and give access to a remote connection.