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运行,映射本地端口,阿里云安全组打开端口权限

相关推荐
叮咚侠24 分钟前
Ubuntu 24.04.3 LTS 中 vdb 的 UUID 永久挂载没有显示的磁盘的操作步骤
linux·运维·ubuntu·挂载磁盘
HIT_Weston37 分钟前
67、【Ubuntu】【Hugo】搭建私人博客(一)
前端·ubuntu·hugo
.小墨迹1 小时前
C++学习之std::move 的用法与优缺点分析
linux·开发语言·c++·学习·算法·ubuntu
风华同学1 小时前
【Linux驱动篇】LED驱动开发实验
linux·驱动开发·ubuntu
石像鬼₧魂石3 小时前
内网渗透靶场 攻击 & 排错命令分类速查表
linux·windows·学习·ubuntu
running up3 小时前
Java集合框架之ArrayList与LinkedList详解
javascript·ubuntu·typescript
AAA_bo15 小时前
liunx安装canda、python、nodejs、git,随后部署私有网页内容提取工具--JinaReader全攻略
linux·python·ubuntu·typescript·aigc·python3.11·jina
叮咚侠5 小时前
Ubuntu 24.04.3 LTS如何扩容逻辑卷
linux·数据库·ubuntu
小张帅三代6 小时前
华为昇腾服务器ubuntu Anaconda安装PyTorch npu 版本 步骤
服务器·pytorch·ubuntu
HIT_Weston7 小时前
66、【Ubuntu】【Gitlab】拉出内网 Web 服务:Gitlab 配置审视(十)
前端·ubuntu·gitlab