如何在 Moodle 中将数据根映射到 Azure 存储
How to map dataroot to Azure Storage in Moodle
将 Moodle 部署到 Azure Web 应用程序中。创建了一个 Azure 存储帐户和一个容器,将 Web 应用程序链接到 Azure 存储帐户,现在有一个连接字符串,类似于 `
CUSTOMCONNSTR_MS_StorAccConStr =
DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=prefix/longkey+someverylongkey/suffix==
如何将数据根位置映射到 Azure 存储?
正如 Moodle_site_moodle_directory 提到的 moodledata 文件夹:
"moodledata" is a folder that contains user files, course files, site language, cached and other information. It is created in the Moodle install process. It should be located outside of the "moodle" folder and is called by default "moodledata".
此外,在 moodle 论坛中 discuss 关于 dataroot
文件夹:
Dataroot is a folder (aka directory) not a file, many files are stored within it. When setting your dataroot in your config.php this should be a reference to a file-system location that the webserver can read and write to, you simply cannot do this over HTTP.
据我了解,您可以在 Azure VM 上托管 Moodle 并从托管 moodle 网站的 Azure VM 装载 Azure File Storage,然后您可以利用装载的文件共享作为 dataroot
。
这里有一些教程,你可以参考一下:
1.Install Azure VM 上的 Moodle
访问 bitnami 以启动托管在 Azure VM 上的免费演示版 Moodle。或者登录Azure Portal,在"Marketplace > Everything" blade下输入关键字"moodle",选择Moodle创建如下:
2.Create 您的文件共享并从您的 VM 安装它
Mount the file share from an Azure virtual machine running Windows
Mount the file share from an Azure virtual machine running Linux
3.Change 数据根位置
https://docs.moodle.org/20/en/Creating_Moodle_site_data_directory
将 Moodle 部署到 Azure Web 应用程序中。创建了一个 Azure 存储帐户和一个容器,将 Web 应用程序链接到 Azure 存储帐户,现在有一个连接字符串,类似于 `
CUSTOMCONNSTR_MS_StorAccConStr = DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=prefix/longkey+someverylongkey/suffix==
如何将数据根位置映射到 Azure 存储?
正如 Moodle_site_moodle_directory 提到的 moodledata 文件夹:
"moodledata" is a folder that contains user files, course files, site language, cached and other information. It is created in the Moodle install process. It should be located outside of the "moodle" folder and is called by default "moodledata".
此外,在 moodle 论坛中 discuss 关于 dataroot
文件夹:
Dataroot is a folder (aka directory) not a file, many files are stored within it. When setting your dataroot in your config.php this should be a reference to a file-system location that the webserver can read and write to, you simply cannot do this over HTTP.
据我了解,您可以在 Azure VM 上托管 Moodle 并从托管 moodle 网站的 Azure VM 装载 Azure File Storage,然后您可以利用装载的文件共享作为 dataroot
。
这里有一些教程,你可以参考一下:
1.Install Azure VM 上的 Moodle
访问 bitnami 以启动托管在 Azure VM 上的免费演示版 Moodle。或者登录Azure Portal,在"Marketplace > Everything" blade下输入关键字"moodle",选择Moodle创建如下:
2.Create 您的文件共享并从您的 VM 安装它
Mount the file share from an Azure virtual machine running Windows
Mount the file share from an Azure virtual machine running Linux
3.Change 数据根位置
https://docs.moodle.org/20/en/Creating_Moodle_site_data_directory