ubuntu 部署moodle

通过地址https://download.moodle.org/releases/latest/选择下载,下载两种压缩包都特别慢(有可能无法下载)。
可以使用下面git下载项目
注意图中php、mysql等版本要求,本次采用Ubuntu22.04下 nginx+php8.2+mysql8.4部署在这里插入图片描述

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/
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

 max_input_vars = 5000

访问http://moodle.xiaohutiger.cn/,进程页面设置
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
连接数据库报错:配置时 默认是localhost,改成ip地址8.140.30.131
数据库是用docker运行,映射本地端口,阿里云安全组打开端口权限
在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值