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

相关推荐
阿梦Anmory2 小时前
Ubuntu配置代理最详细教程
linux·运维·ubuntu
getapi3 小时前
Ubuntu 22.04 服务器的系统架构是否为 amd64 x86_64
linux·服务器·ubuntu
小天源3 小时前
Cacti在Debian/Ubuntu中安装及其使用
运维·ubuntu·debian·cacti
独自归家的兔5 小时前
ubuntu系统安装dbswitch教程 - 备份本地数据到远程服务器
linux·运维·ubuntu
ONE_SIX_MIX5 小时前
ubuntu 24.04 用rdp连接,桌面黑屏问题,解决
linux·运维·ubuntu
老师用之于民1 天前
【DAY21】Linux软件编程基础&Shell 命令、脚本及系统管理实操
linux·运维·chrome·经验分享·笔记·ubuntu
qinyia1 天前
通过本地构建解决Cartographer编译中absl依赖缺失问题
linux·运维·服务器·mysql·ubuntu
郝亚军1 天前
ubuntu启一个udp server,由一个client访问
linux·ubuntu·udp
予枫的编程笔记1 天前
【Linux入门篇】Linux入门不踩坑:内核、发行版解析+环境搭建全流程
linux·ubuntu·centos·vmware·xshell·linux入门·linux环境搭建
hampeter1 天前
【填坑指南】Trae/VS Code 远程连接 Ubuntu,终端总是自动激活特定的 Conda 环境?三招教你彻底解决!
linux·ubuntu·conda·trae