nativeInstallermoodle

Upgrade Bitnami LMS powered by Moodle(TM) LMS

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

NOTE: The Approach A sections referred to below do not apply to Bitnami native installers. Users of Bitnami native installers should refer only to the Approach B sections.

It is strongly recommended that you create a backup before starting the update process. If you have important data, it is advisable that you create and try to restore a backup to ensure that everything works properly.

Upgrade Bitnami LMS powered by Moodle(TM) LMS following these steps, depending on your installation type:

Approach A: Bitnami installations using system packages

  • Move your current Moodle LMS files:

      $ sudo mv /bitnami/moodle /bitnami/moodle.backup
    
  • Download the new Moodle LMS version from the Moodle website. Do this by clicking the package download link on the Web page or using the command below with a direct download URL (the VERSION placeholder in the command refers to the Moodle LMS version number).

      $ wget http://download.moodle.org/download.php/direct/stableVERSION/moodle-latest-VERSION.y.tgz
    
  • Create a new folder and uncompress the files:

      $ sudo mkdir /bitnami/moodle
      $ sudo tar -xzvf moodle-latest-VERSION.tgz -C /bitnami/moodle --strip 1
    
  • Copy your previous configuration file and your modules or themes:

      $ sudo cp -a /bitnami/moodle.backup/config.php /bitnami/moodle/
      $ sudo cp -a /bitnami/moodle.backup/theme/MY_THEME /bitnami/moodle/theme/
      $ sudo cp -a /bitnami/moodle.backup/mod/MY_MOD /bitnami/moodle/mod/
    

    NOTE: Replace the MY_THEME and MY_MOD placeholders with the directory or path names for your downloaded and installed themes and modules (these are different from the ones shipped by Bitnami).

  • Configure file permissions as follows:

    IMPORTANT: To change permissions file, in case you have installed the solution as root, use MYUSER:daemon as system user and group, respectively. Otherwise, simply use MYUSER:MYUSER.

      $ sudo chown daemon:daemon -LR installdir/moodle
      $ sudo chmod -R g+rwX installdir/moodle
      $ sudo chown root installdir/moodle/config.php
      $ sudo chmod 640 installdir/moodle/config.php
    
  • Execute the following commands to check that the file permissions were configured properly:

      $ ls -la /opt/bitnami/moodle/
      $ ls -la /opt/bitnami/moodle/blocks/
    

    The output should reflect that the files and directories listed are owned by the daemon user and daemon group.

  • Navigate to the application from a browser and follow the steps to upgrade the database to the latest version.

    NOTE: If you want to install modules or plugins from the Moodle administration panel, refer to the migration steps.

Approach B (Self-contained Bitnami installations

  • Move your current Moodle LMS files:

      $ sudo mv installdir/apps/moodle/htdocs/ installdir/apps/moodle/htdocs.backup
    
  • Download the new Moodle LMS version from the Moodle website. Do this by clicking the package download link on the Web page or using the command below with a direct download URL (the VERSION placeholder in the command refers to the Moodle LMS version number).

      $ wget http://download.moodle.org/download.php/direct/stableVERSION/moodle-latest-VERSION.y.tgz
    
  • Create a new folder and uncompress the files:

      $ sudo mkdir installdir/apps/moodle/htdocs/
      $ sudo tar -xzvf moodle-latest-VERSION.tgz -C installdir/apps/moodle/htdocs/ --strip 1
    
  • Copy your previous configuration file and your modules or themes:

      $ sudo cp -a installdir/apps/moodle/htdocs.backup/config.php installdir/apps/moodle/htdocs/
      $ sudo cp -a installdir/apps/moodle/htdocs.backup/theme/MY_THEME installdir/apps/moodle/htdocs/theme/
      $ sudo cp -a installdir/apps/moodle/htdocs.backup/mod/MY_MOD installdir/apps/moodle/htdocs/mod/
    

    NOTE: Replace the MY_THEME and MY_MOD placeholders with the directory or path names for your downloaded and installed themes and modules (these are different from the ones shipped by Bitnami).

  • Configure file permissions as follows:

    IMPORTANT: To change permissions file, in case you have installed the solution as root, use MYUSER:daemon as system user and group, respectively. Otherwise, simply use MYUSER:MYUSER.

      $ sudo chown bitnami:daemon -R installdir/apps/moodle/htdocs/
      $ sudo find installdir/apps/moodle/htdocs/ -type f -exec chmod 664 {} \;
      $ sudo find installdir/apps/moodle/htdocs/ -type d -exec chmod 775 {} \;
    
  • Navigate to the application from a browser and follow the steps to upgrade the database to the latest version.

    NOTE: If you want to install modules or plugins from the Moodle administration panel, refer to the migration steps.

Last modification June 16, 2021