当前位置:网站首页>Edusoho enterprise training version intranet only deployment tutorial (to solve the problems of player, upload and background jam)
Edusoho enterprise training version intranet only deployment tutorial (to solve the problems of player, upload and background jam)
2022-06-30 12:09:00 【Not the Eight Precepts of the second senior brother】
Focus on the following intranet configuration and code changes
1. First configure linux Environmental Science (php nginx mysql)
php7.1 7.2 7.3 Choose the version you want . 7 following and 7.4 And above do not support ( Pretend you can't run , If you don't believe it, try )
mysql5.7-mysql8.0 Choose the version you want
nginx
Be careful : Some configurations need to be modified
php
// modify /etc/php/7.1/fpm/php.ini File configuration items
vim /etc/php/7.1/fpm/php.ini
post_max_size = 1024M
memory_limit = 1024M
upload_max_filesize = 1024M
// modify PHP-FPM The monitoring method is 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
// restart php
sudo service php7.1-fpm restart
nginx
vim /etc/nginx/nginx.conf
add to `client_max_body_size 1024M;` To http Next , As shown below
http {
##
# Basic Settings
##
client_max_body_size 1024M; # After adding nginx Allows you to upload larger files
...
}2. download edusoho Enterprise training Edition
cd /var/www
// Here is 21.4.5 You can choose to download the latest version or install this version after running through , Upgrade in the background , Because the official download package is not the latest version
wget https://download.edusoho.com/edusoho-ct-21.4.5.zip
// No, zip install zip
sudo apt install zip
unzip edusoho-ct-21.4.5.zip
cd edusoho
// Grant authority
sudo chown -R www-data:www-data .
sudo chmod -R 777 .3. To configure edusoho Of nginx
cd /etc/nginx/sites-enabled
sudo vim edusoho
Paste the following
server {
listen 80;
# [ Change ] Domain name of the website Or servers ip
server_name 121.199.50.180;
#301 Jump can be in nginx Middle configuration
# The installation path of the program
root /var/www/edusoho/web;
# Log path
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;
}
# Configure and set picture format file
location ~* \.(jpg|jpeg|gif|png|ico|swf)$ {
# The expiration date is 3 year
expires 3y;
# Turn off logging
access_log off;
# close gzip Compress , Reduce CPU Consume , Because the compression rate of the picture is not high .
gzip off;
}
# To configure css/js file
location ~* \.(css|js)$ {
access_log off;
expires 3y;
}
# Users are prohibited from uploading all files in the directory .php Access to files , Improve safety
location ~ ^/files/.*\.(php|php7.0)$ {
deny all;
}
# The following configurations allow to run .php The program , It is convenient for the integration of other third-party systems .
location ~ \.php$ {
# [ Change ] Please according to the actual php-fpm Modification of operation mode
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 "";
}
}Browser input ip Or domain name to start your installation process Go straight to the next step It's finished
a key : Intranet configuration Intranet only deployment ( Note that it is only possible to connect to the external network )
1. download sdk file :
link : https://pan.baidu.com/s/1akGId9DOrtN60iec_Acu1A Extraction code : n27n
sdk Functions are constantly updated At present, this is 2021-11-01 edition , Can be used normally If you need the latest information, you need to contact the official for
2. Replace file :
Replace project directory web/service-cdn
3. create a file ( Never mind what it's used for , Without this, you can't start the next step )
app/data Under the new dev.lock file
4. Modify the configuration :
Enter your online school address /app_dev.php/admin/setting/developer Modify balloon cloud SDK Of CDN The address is domain name /service-cdn/ Example dev.edudev.com/service-cdn/ Remember not to bring http://
Modify whether there is no Internet configuration

5. Modify part of the code
modify src/Biz/CloudPlatform/Client/FailoverCloudAPI.php In the document getServerList Method
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)) {
// Make sure that every morning 0~5 Update in time between points
$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;
}
6. Fix the problem that all background pages get stuck on the intranet
modify
src/CorporateTrainingBundle/Resources/views/admin/default/corporate-training-admin-index.html.twig
Replace with all the following code
{% 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"/>
{# Domain name check prompt #}
{# {
{ 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 != ' yes ' 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') }}"> I got it! </a>
</div>
{% endif %}
<div class="admin-index">
<div class="admin-index__left">
{# To do work #}
<div class="admin-index-block to-do-work">
{
{ render(controller('CorporateTrainingBundle:Admin/Train/MyWorks:myWorks')) }}
</div>
{% if app.user.manageOrgIds|default() %}
{# Data statistics #}
{% include 'admin/default/data-overview.html.twig' %}
{# Learning trend chart and Ranking List #}
<div class="echart-rank clearfix">
{% include 'admin/default/corporate-training-echart-rank.html.twig' %}
</div>
{% endif %}
{# System status #}
<div>
{% cache 'system/version' 600 %}
{# {
{ render(controller('CorporateTrainingBundle:Admin/Analysis:systemStatus')) }}#}
{% endcache %}
</div>
{# Business advice ( Advanced de copyright does not display )#}
{% 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') %}
Last To create a course Upload video and audio . Play normally ok 了
If you have any questions, please send a private message
边栏推荐
- 对象映射 - Mapping.Mapster
- AUTOCAD——LEN命令
- Statistics on the number of closed Islands
- Ensemble de cartes
- 会议预告 | 华为 2012 实验室全球软件技术峰会-欧洲分会场
- Boost study: boost log
- nvm安装node后,在使用npm指令时候显示不是内部或外部指令
- R language ggplot2 visualization: gganimate package is based on Transition_ Time function to create dynamic scatter animation (GIF)
- Parallel interface 8255A
- What is the function of LED backlight?
猜你喜欢
随机推荐
Boost study: boost log
Four Misunderstandings of Internet Marketing
Learn how to implement distributed locks in redis - my own understanding
Statistics on the number of closed Islands
Shutter start from zero 006 radio switches and checkboxes
3D线光谱共焦传感器在半导体如何检测
1020. number of enclaves
【LeetCode】15、三数之和
A review of quantum neural networks 2022 for generating learning tasks
Go zero micro Service Practice Series (VIII. How to handle tens of thousands of order requests per second)
The sci-fi ideas in these movies have been realized by AI
R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram, and_ Set show in the point parameter_ The legend parameter is false, and the legend information is not displayed
Set集合
使用深度学习进行生物网络分析
A Generic Deep-Learning-Based Approach for Automated Surface Inspection-論文閱讀筆記
R语言ggplot2可视化:使用ggplot2可视化散点图、在geom_point参数中设置show_legend参数为FALSE配置不显示图例信息
Openmldb meetup No.4 meeting minutes
1254. 统计封闭岛屿的数目
OpenMLDB Meetup No.4 会议纪要
Conference Preview - Huawei 2012 lab global software technology summit - European session




![[pattern recognition]](/img/b1/dcb444cbf40a43eeb7f7b233d7741a.png)




