Zum Inhalt springen

Moodle/Update: Unterschied zwischen den Versionen

Aus Foxwiki
Die 5 zuletzt angesehenen Seiten:  MIME-Type » Netzwerk/L2/Port/Security » Projektantrag » NIS2 » Moodle/Update
K Textersetzung - „==== Dokumentation ====“ durch „=== Dokumentation ===“
K Textersetzung - „line>“ durch „line copy>“
 
Zeile 4: Zeile 4:


=== Verzeichnisstruktur  ===
=== Verzeichnisstruktur  ===
<syntaxhighlight lang="bash" highlight="1,3" line>
<syntaxhighlight lang="bash" highlight="1,3" line copy>
tree -d -L 2
tree -d -L 2
├── backup
├── backup
Zeile 18: Zeile 18:


=== Konfiguration auslesen ===
=== Konfiguration auslesen ===
<syntaxhighlight lang="bash" highlight="1" line>
<syntaxhighlight lang="bash" highlight="1" line copy>
grep '$CFG->db' moodle/config.php
grep '$CFG->db' moodle/config.php
  $CFG->dbname    = 'dbname';
  $CFG->dbname    = 'dbname';
Zeile 25: Zeile 25:
</syntaxhighlight>
</syntaxhighlight>


<syntaxhighlight lang="bash" highlight="1-3" line>
<syntaxhighlight lang="bash" highlight="1-3" line copy>
export dbname='dbname'
export dbname='dbname'
export dbuser='dbuser'
export dbuser='dbuser'
Zeile 33: Zeile 33:
== Datensicherung ==
== Datensicherung ==
=== Datenbank ===
=== Datenbank ===
<syntaxhighlight lang="bash" highlight="1" line>
<syntaxhighlight lang="bash" highlight="1" line copy>
mysqldump --user="$dbuser" --password="$dbpass" $dbname | gzip > ../backup/"$dbname"_$(date -I).sql.gz
mysqldump --user="$dbuser" --password="$dbpass" $dbname | gzip > ../backup/"$dbname"_$(date -I).sql.gz
</syntaxhighlight>
</syntaxhighlight>


; Kontrolle
; Kontrolle
<syntaxhighlight lang="bash" highlight="1" line>
<syntaxhighlight lang="bash" highlight="1" line copy>
zless ../backup/"$dbname"_$(date -I).sql.gz
zless ../backup/"$dbname"_$(date -I).sql.gz
</syntaxhighlight>
</syntaxhighlight>


=== Dateisystem ===
=== Dateisystem ===
<syntaxhighlight lang="bash" highlight="1" line>
<syntaxhighlight lang="bash" highlight="1" line copy>
tar -czf ../backup/moodle_$(date -I).tar.gz moodle
tar -czf ../backup/moodle_$(date -I).tar.gz moodle
</syntaxhighlight>
</syntaxhighlight>


; Kontrolle
; Kontrolle
<syntaxhighlight lang="bash" highlight="1" line>
<syntaxhighlight lang="bash" highlight="1" line copy>
tar -tvf ../backup/moodle_$(date -I).tar.gz moodle
tar -tvf ../backup/moodle_$(date -I).tar.gz moodle
</syntaxhighlight>
</syntaxhighlight>
Zeile 54: Zeile 54:
== Durchführung ==
== Durchführung ==
=== Verzeichnis umbenennen ===
=== Verzeichnis umbenennen ===
<syntaxhighlight lang="bash" highlight="1-7" line>
<syntaxhighlight lang="bash" highlight="1-7" line copy>
mv moodle moodle.bak
mv moodle moodle.bak
</syntaxhighlight>
</syntaxhighlight>


=== Download ===
=== Download ===
<syntaxhighlight lang="bash" highlight="1" line>
<syntaxhighlight lang="bash" highlight="1" line copy>
wget https://download.moodle.org/download.php/direct/stable405/moodle-latest-405.zip
wget https://download.moodle.org/download.php/direct/stable405/moodle-latest-405.zip
</syntaxhighlight>
</syntaxhighlight>


=== Archiv entpacken ===
=== Archiv entpacken ===
<syntaxhighlight lang="bash" highlight="1" line>
<syntaxhighlight lang="bash" highlight="1" line copy>
unzip moodle-latest-405.zip
unzip moodle-latest-405.zip
</syntaxhighlight>
</syntaxhighlight>
Zeile 70: Zeile 70:
<!--
<!--
=== Daten übertragen ===
=== Daten übertragen ===
<syntaxhighlight lang="bash" highlight="1-7" line>
<syntaxhighlight lang="bash" highlight="1-7" line copy>
cp -au moodle.bak/question/type/multichoiceset/ moodle/question/type/
cp -au moodle.bak/question/type/multichoiceset/ moodle/question/type/
cp -au moodle.bak/course/format/tiles moodle/course/format/
cp -au moodle.bak/course/format/tiles moodle/course/format/
Zeile 81: Zeile 81:


=== Zugriffsrechte korrigieren ===
=== Zugriffsrechte korrigieren ===
<syntaxhighlight lang="bash" highlight="1" line>
<syntaxhighlight lang="bash" highlight="1" line copy>
sudo chown -Rc web76:client1 moodle
sudo chown -Rc web76:client1 moodle
</syntaxhighlight>
</syntaxhighlight>
Zeile 90: Zeile 90:


=== Erweiterungen aktualisieren ===
=== Erweiterungen aktualisieren ===
<syntaxhighlight lang="bash" highlight="1-4" line>
<syntaxhighlight lang="bash" highlight="1-4" line copy>
cp -a moodle.bak/mod/cardbox moodle/mod
cp -a moodle.bak/mod/cardbox moodle/mod
cp -a moodle.bak/blocks/featuredcourses moodle/blocks
cp -a moodle.bak/blocks/featuredcourses moodle/blocks

Aktuelle Version vom 11. Mai 2025, 13:44 Uhr

Moodle/Update - Software-Aktualisierung

Beschreibung

Verzeichnisstruktur

tree -d -L 2
├── backup
└── web
    └── moodle

Version

Aktuelle und neue Version ermitteln

https://seminare.foxtom.de/admin/index.php

seminare.foxtom.de/admin

Konfiguration auslesen

grep '$CFG->db' moodle/config.php
 $CFG->dbname    = 'dbname';
 $CFG->dbuser    = 'dbuser';
 $CFG->dbpass    = 'dbpass';
export dbname='dbname'
export dbuser='dbuser'
export dbpass='dbpass'

Datensicherung

Datenbank

mysqldump --user="$dbuser" --password="$dbpass" $dbname | gzip > ../backup/"$dbname"_$(date -I).sql.gz
Kontrolle
zless ../backup/"$dbname"_$(date -I).sql.gz

Dateisystem

tar -czf ../backup/moodle_$(date -I).tar.gz moodle
Kontrolle
tar -tvf ../backup/moodle_$(date -I).tar.gz moodle

Durchführung

Verzeichnis umbenennen

mv moodle moodle.bak

Download

wget https://download.moodle.org/download.php/direct/stable405/moodle-latest-405.zip

Archiv entpacken

unzip moodle-latest-405.zip


Zugriffsrechte korrigieren

sudo chown -Rc web76:client1 moodle


Erweiterungen aktualisieren

cp -a moodle.bak/mod/cardbox moodle/mod
cp -a moodle.bak/blocks/featuredcourses moodle/blocks
cp -a moodle.bak/theme/stream moodle/theme
cp -a moodle.bak/question/type/multichoiceset moodle/question/type/

https://seminare.foxtom.de/admin/plugins.php



Anhang

Siehe auch

Dokumentation

Links

Projekt

Weblinks

  1. https://docs.moodle.org/405/de/Aktualisierung_von_Moodle