如何在 Ubuntu 上卸载 Moodle?

如何在 Ubuntu 上卸载 Moodle?

我尝试通过运行以下命令在 Ubuntu 上卸载 Moodle:

sudo apt-get remove moodle 

但我得到的结果是:

package moodle is not installed, so not removed 

但我仍然可以访问它。

我想尝试全新安装的 Moodle。

答案1

要删除 moodle,您要做的就是删除其代码目录、数据目录和数据库。

您将在其中config.php找到变量$CFG->dbtype,该变量表明该安装使用了哪种数据库引擎,并且变量$CFG->dbname将告诉您应该删除哪个数据库。

同样,config.php您还将找到数据配置的位置以及代码路径设置的位置 - 要检查的变量是:$CFG->dataroot$CFG->dirroot​​。如果您完全不知道在哪里寻找 moodle 安装,您必须在 apache/nginx(或其他 http 服务器)配置中检查它。

但是为了测试全新的 moodle 安装,您不必删除旧的安装 - 您可以在旧的安装旁边安装一个新的安装,正确配置它,为全新安装创建一个新的数据库,并配置您的 http 服务器以指向该安装。

建议不要从任何发行版的存储库安装 moodle,而是从 moodle 的 git 中获取,并根据您想要使用的 moodle 版本选择正确的分支。

答案2

卸载看起来非常简单:这些说明直接复制自moodle 网站

**Webhost/manual installation:** If you have installed Moodle manually or have installed onto a webhost, follow these steps:

Delete the moodle database using this mysql command (or delete using your mysql client, e.g. PHPMyAdmin):

    sql>DROP DATABASE moodle;

In the above example replace 'moodle' with the name of the moodle database you created when installing.

Delete the moodledata directory. If you, or your users, have uploaded materials into this directory take a copy of these before deleting this directory.

Delete the moodle directory itself. This will delete all of the moodle PHP script files.

**XAMPP windows installation:** If you have installed Moodle on windows through the XAMPP package, follow these steps:

Open cmd.exe and navigate to this directory within your installation directory:

    server/mysql/bin

Run this command, replacing USERNAME with your database username (the default is "root") and DATABASE with your database name (the default is "moodle"):

    mysqladmin.exe -u USERNAME -p drop DATABASE

Enter your database password at the prompt (the default is "" [blank]).

Enter "y" to confirm the database drop.

Delete the moodledata directory. If you, or your users, have uploaded materials into this directory take a copy of these before deleting this directory.

Delete the moodle directory itself. This will delete all of the moodle PHP script files

答案3

在你的终端上:sudo /opt/lampp/apps/moodle/uninstall

相关内容