ubuntu 部署moodle

通过地址https://download.moodle.org/releases/latest/选择下载,下载两种压缩包都特别慢(有可能无法下载)。
可以使用下面git下载项目

注意图中php、mysql等版本要求,本次采用Ubuntu22.04下 nginx+php8.2+mysql8.4部署

bash 复制代码
mkdir /var/www/moodle
sudo git clone -b MOODLE_500_STABLE git://git.moodle.org/moodle.git /var/www/moodle/
chown -R www-data:www-data /var/www/moodle/
bash 复制代码
server {
    listen 80;
    server_name moodle.xiaohutiger.cn;
    root /var/www/moodle;
    index index.php index.html;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php(/|$) {
      # Split the path info based on URI.
      fastcgi_split_path_info ^(.+\.php)(/.*)$;

      # Note: Store the original path_info. It will be wiped out in a moment by try_files.
      set $path_info $fastcgi_path_info;

      # Look for the php file. If not round then jump to @routed.
      try_files $fastcgi_script_name $fastcgi_script_name/;

      # File was found - pass to fastcgi.
      fastcgi_pass   unix:/run/php/php8.2-fpm.sock;
      include        fastcgi_params;

      # Re-apply the path_info after including fastcgi_params.
      fastcgi_param PATH_INFO $path_info;
      fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
      fastcgi_param DOCUMENT_ROOT $realpath_root;
    }
    }

修改php.ini

bash 复制代码
 max_input_vars = 5000

访问http://moodle.xiaohutiger.cn/,进程页面设置


连接数据库报错:配置时 默认是localhost,改成ip地址8.140.30.131

数据库是用docker运行,映射本地端口,阿里云安全组打开端口权限

相关推荐
嵌入式郑工9 小时前
RK3566 LubanCat 开发板 USB Gadget 配置完整复盘
linux·驱动开发·ubuntu
好奇的菜鸟15 小时前
Ubuntu 18.04 启用root账户图形界面登录指南
数据库·ubuntu·postgresql
zbguolei15 小时前
虚拟机安装Ubuntu后无法登录
linux·运维·ubuntu
叠叠乐16 小时前
移动家庭云电脑永不关机实验版本
ubuntu
i建模16 小时前
在 Ubuntu 中为 npm 切换国内镜像源
linux·ubuntu·npm
每天瞎忙的农民工17 小时前
Ubuntu 24 安装npm22
linux·运维·ubuntu·npm
HIT_Weston17 小时前
116、【Ubuntu】【Hugo】首页板块配置:Leaf Bundle
ubuntu·hugo
a41324471 天前
ubuntu 25 安装vllm
linux·服务器·ubuntu·vllm
上天_去_做颗惺星 EVE_BLUE1 天前
Docker高效使用指南:从基础到实战模板
开发语言·ubuntu·docker·容器·mac·虚拟环境
芋圆奶绿,要半t2 天前
ubuntu20/2204修改系统时间的命令
ubuntu