- php7.1 7.2 7.3 选择你要的版本。 7以下 和7.4及以上不支持(装了跑不起来的,不信可以试试)
-
- mysql5.7-mysql8.0 之间选择你要的版本
-
- nginx
-
-
- 注意: 需要修改部分配置
-
- php
-
- //修改/etc/php/7.1/fpm/php.ini文件配置项
- vim /etc/php/7.1/fpm/php.ini
-
- post_max_size = 1024M
- memory_limit = 1024M
- upload_max_filesize = 1024M
-
-
- //修改 PHP-FPM 监听方式为127.0.0.1:9000:
-
- sudo sed -i 's/listen = .*/listen = 127.0.0.1:9000/g'
- /etc/php/7.1/fpm/pool.d/www.conf
-
-
- //重启php
- sudo service php7.1-fpm restart
-
- nginx
- vim /etc/nginx/nginx.conf
-
- 添加`client_max_body_size 1024M;`到http下,如下所示
-
- http {
-
- ##
- # Basic Settings
- ##
-
- client_max_body_size 1024M; #添加后nginx可以允许上传更大的文件
- ...
- }
- cd /var/www
-
- //这里是21.4.5 你可以选择下载最新的也可以安装这个版本跑通以后,后台再去升级,因为官方下载的包也不是最新的版本
- wget https://download.edusoho.com/edusoho-ct-21.4.5.zip
-
- //没有zip 安装zip
- sudo apt install zip
-
- unzip edusoho-ct-21.4.5.zip
-
- cd edusoho
-
- // 给权限
- sudo chown -R www-data:www-data .
- sudo chmod -R 777 .
- cd /etc/nginx/sites-enabled
-
- sudo vim edusoho
-
-
- 粘贴下面内容
-
- server {
- listen 80;
-
- # [改] 网站的域名 或服务器ip
- server_name 121.199.50.180;
-
- #301跳转可以在nginx中配置
-
- # 程序的安装路径
- root /var/www/edusoho/web;
-
- # 日志路径
- access_log /var/log/nginx/edusoho.com.access.log;
- error_log /var/log/nginx/edusoho.com.error.log;
-
- location / {
- index app.php;
- try_files $uri @rewriteapp;
- }
-
- location @rewriteapp {
- rewrite ^(.*)$ /app.php/$1 last;
- }
-
- location ~ ^/udisk {
- internal;
- root /var/www/edusoho/app/data/;
- }
- location ~ ^/(app|app_dev)\.php(/|$) {
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param HTTPS off;
- fastcgi_param HTTP_X-Sendfile-Type X-Accel-Redirect;
- fastcgi_param HTTP_X-Accel-Mapping /udisk=/var/www/edusoho/app/data/udisk;
- fastcgi_buffer_size 128k;
- fastcgi_buffers 8 128k;
- }
-
-
- # 配置设置图片格式文件
- location ~* \.(jpg|jpeg|gif|png|ico|swf)$ {
- # 过期时间为3年
- expires 3y;
-
- # 关闭日志记录
- access_log off;
-
- # 关闭gzip压缩,减少CPU消耗,因为图片的压缩率不高。
- gzip off;
- }
-
- # 配置css/js文件
- location ~* \.(css|js)$ {
- access_log off;
- expires 3y;
- }
-
- # 禁止用户上传目录下所有.php文件的访问,提高安全性
- location ~ ^/files/.*\.(php|php7.0)$ {
- deny all;
- }
-
- # 以下配置允许运行.php的程序,方便于其他第三方系统的集成。
- location ~ \.php$ {
- # [改] 请根据实际php-fpm运行的方式修改
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param HTTPS off;
- fastcgi_param HTTP_PROXY "";
- }
- }
1.下载sdk文件:
链接: https://pan.baidu.com/s/1akGId9DOrtN60iec_Acu1A 提取码: n27n
sdk功能是持续在更新的 目前这个是2021-11-01版本,能正常使用 如需最新需要联系官方获取
2.替换文件 :
替换项目目录web/service-cdn
3. 创建文件(不用管它干嘛用的,没有这个你打不开下一步)
app/data 下新建dev.lock 文件
4. 修改配置 :
进入你的网校地址 /app_dev.php/admin/setting/developer 修改气球云SDK的CDN地址为 域名/service-cdn/ 例子dev.edudev.com/service-cdn/ 切记不带http://
修改是否无外网配置

- 修改src/Biz/CloudPlatform/Client/FailoverCloudAPI.php 文件中的 getServerList方法
-
-
- public function getServerList($nextRefreshTime = 0)
- {
- $prevApiUrl = $this->apiUrl;
- $this->setApiUrl($this->rootApiUrl);
-
- $servers = parent::_request('GET', '/server_list', array(), array());
-
- $servers = '{"root":"http:\/\/api.edusoho.net","leafs":[{"url":"http:\/\/leafapi1.edusoho.net","used_count":0},{"url":"http:\/\/leafapi2.edusoho.net","used_count":0}],"current_leaf":"http:\/\/leafapi2.edusoho.net","failed_count":0,"failed_expired":0,"next_refresh_time":1652733014}';
- $servers = json_decode($servers, true);
- $this->setApiUrl($prevApiUrl);
-
- if (empty($servers) || empty($servers['root']) || empty($servers['current_leaf']) || empty($servers['leafs'])) {
- $servers = $this->getServerListFromCdn();
-
- if (empty($servers) || empty($servers['root']) || empty($servers['leafs'])) {
- throw new \RuntimeException('Requested API Server list from CDN failed.');
- }
- }
-
- if (empty($servers['current_leaf'])) {
- $servers['current_leaf'] = $servers['leafs'][array_rand($servers['leafs'])]['url'];
- }
-
- foreach ($servers['leafs'] as &$leaf) {
- $leaf['used_count'] = 0;
- unset($leaf);
- }
-
- $servers['failed_count'] = 0;
- $servers['failed_expired'] = 0;
-
- if (empty($nextRefreshTime)) {
- //确保每天的凌晨0~5点之间的时间内更新
- $hour = rand(0, 5);
- $minute = rand(0, 59);
- $second = rand(0, 59);
- $nextRefreshTime = strtotime(date('Y-m-d 0:0:0', strtotime('+1 day'))) + $hour * 3600 + $minute * 60 + $second;
- }
-
- $servers['next_refresh_time'] = $nextRefreshTime;
-
- return $servers;
- }
-
- 修改
- src/CorporateTrainingBundle/Resources/views/admin/default/corporate-training-admin-index.html.twig
- 换上下面所有代码
-
-
-
- {% extends 'admin/admin-layout.html.twig' %}
- {% block title %}{{ 'homepage.header.admin_menu'|trans }}{% endblock %}
- {% set panel = 'dashboard' %}
- {% set script_controller = 'corporatetrainingbundle/controller/default/admin-index' %}
- {% do script(['libs/fullcalendar.js', 'corporatetrainingbundle/js/admin/default/index.js', 'corporatetrainingbundle/js/admin/quick-entrance/index.js']) %}
- {% block container %}
- {{ web_macro.flash_messages() }}
- <link href="{{ asset('assets/libs/gallery/morris/0.5.0/morris.css') }}" rel="stylesheet"/>
- {# 域名检查提示 #}
- {# {{ render(controller('AppBundle:Admin/Default:validateDomain')) }}#}
-
- {% if onlineAdvisoryAuthInfo.level is defined %}
- {% set setting = setting('auto_upgrade') %}
- {% set onlineAdvisoryAuthInfo = online_advisory_auth_info() %}
- {% set showAutoUpgradeNotify = onlineAdvisoryAuthInfo.isCustom != '是' and onlineAdvisoryAuthInfo.level != 'none' and not setting.notification_shown|default(false) %}
- <div class="alert alert-success row {% if not has_permission('admin_optimize_settings') or not showAutoUpgradeNotify%}hidden{% endif %}"
- data-show-modal="{% if has_permission('admin_optimize_settings') and (onlineAdvisoryAuthInfo.level == 'none' or onlineAdvisoryAuthInfo.level|default('') == 'license') and not setting.notification_shown|default(false) %}1{% else %}0{% endif %}"
- id="js-auto-upgrade-box" style="border:none;border-radius:0;padding: 10px 31px 10px 31px;line-height:32px;" data-notify-url="{{ path('admin_auto_upgrade_notify') }}">
- <div class="pull-left">{{ 'admin.app_upgrades.auto_upgrade_tips'|trans({'%settingUrl%': path('admin_optimize')})|raw }}</div>
- <a href="javascript:;" class="btn color-success pull-right" id="js-auto-upgrade-confirm-btn"
- data-url="{{ path('admin_optimize_auto_upgrade') }}">我知道了</a>
- </div>
- {% endif %}
- <div class="admin-index">
- <div class="admin-index__left">
- {# 待办工作 #}
- <div class="admin-index-block to-do-work">
- {{ render(controller('CorporateTrainingBundle:Admin/Train/MyWorks:myWorks')) }}
- </div>
-
- {% if app.user.manageOrgIds|default() %}
- {# 数据统计 #}
- {% include 'admin/default/data-overview.html.twig' %}
- {# 学习趋势图 and 排行榜 #}
- <div class="echart-rank clearfix">
- {% include 'admin/default/corporate-training-echart-rank.html.twig' %}
- </div>
- {% endif %}
-
- {# 系统状态 #}
- <div>
- {% cache 'system/version' 600 %}
- {# {{ render(controller('CorporateTrainingBundle:Admin/Analysis:systemStatus')) }}#}
- {% endcache %}
- </div>
-
- {# 经营建议(高级去版权不显示)#}
- {% if not setting('copyright.thirdCopyright', false) == 1 %}
- {# <div class="js-admin-advice" data-url="{{ path('admin_business_advice') }}"></div>#}
- {% endif %}
-
- </div>
-
- {# <div class="admin-index__right index-right">#}
- {# {% include "admin/default/admin-index-right.html.twig" %}#}
- {# </div>#}
- </div>
- {% endblock %}
-
- {% do load_script('widget/tooltip-widget') %}
最后 去创建课程 上传视频音频。 播放正常就ok了
有问题欢迎私信