18 Commits

Author SHA1 Message Date
d0ba17e424 变更 2023-08-11 11:22:37 +08:00
055a7ad212 变更 2023-08-11 11:22:15 +08:00
10f3a8e03a 变更 2023-08-11 10:45:18 +08:00
7e0bafa41c 变更 2023-07-24 01:15:29 +08:00
9b1c4589e1 变更 2023-07-21 10:30:02 +08:00
16dfd3d6d7 变更 2023-07-21 10:25:31 +08:00
40d0ae90ff 变更 2023-07-21 10:20:47 +08:00
87f00a7202 modify yungao git 2022-12-08 07:10:35 +08:00
fa0761a9f1 add 2022-12-08 03:25:53 +08:00
7483a4830b add 2022-12-07 23:57:42 +08:00
5070a3c139 添加简介 2022-12-07 23:20:52 +08:00
2c21d2ac74 添加简介 2022-12-07 23:19:58 +08:00
c9c96e73cc modify yungao git 2022-12-07 22:40:21 +08:00
LoveesYe
7bdd4f8054 Update README 2022-08-10 23:21:12 +02:00
LoveesYe
66acb9392b Add files via upload 2022-07-29 15:18:36 +02:00
LoveesYe
b8a0fa535e Update master.sh 2022-07-29 14:13:47 +02:00
LoveesYe
13249045dd Update agent.sh 2022-07-29 14:12:02 +02:00
LoveesYe
34f2a5bde6 Create FAQ 2022-07-28 20:14:39 +02:00
20 changed files with 332 additions and 25 deletions

8
.idea/cdnflydadao.iml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/cdnflydadao.iml" filepath="$PROJECT_DIR$/.idea/cdnflydadao.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

98
.idea/workspace.xml generated Normal file
View File

@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="19fc4048-f9db-4d9d-ae64-642a4c8149c0" name="变更" comment="变更" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ComposerSettings">
<execution />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="HighlightingSettingsPerFile">
<setting file="file://F:/我的电脑/Documents/WeChat Files/wxid_pj54dtlvkjzq11/FileStorage/File/2022-08/云高项目网络IP地址划分资料.xlsx" root0="SKIP_INSPECTION" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectId" id="2IadvHdnu3Q2Svu1RFVmwDkBl7P" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;last_opened_file_path&quot;: &quot;F:/我的电脑/Documents/WeChat Files/wxid_pj54dtlvkjzq11/FileStorage/File/2022-08&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="默认任务">
<changelist id="19fc4048-f9db-4d9d-ae64-642a4c8149c0" name="变更" comment="" />
<created>1670423856551</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1670423856551</updated>
<workItem from="1670423857731" duration="4364000" />
<workItem from="1670430386964" duration="2490000" />
<workItem from="1670454611831" duration="625000" />
<workItem from="1670768307449" duration="103000" />
<workItem from="1689905971667" duration="1234000" />
</task>
<task id="LOCAL-00001" summary="modify yungao git">
<created>1670424021829</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1670424021829</updated>
</task>
<task id="LOCAL-00002" summary="modify yungao git">
<created>1670454635337</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1670454635337</updated>
</task>
<task id="LOCAL-00003" summary="变更">
<created>1689906048020</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1689906048020</updated>
</task>
<task id="LOCAL-00004" summary="变更">
<created>1689906331181</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1689906331181</updated>
</task>
<task id="LOCAL-00005" summary="变更">
<created>1689906602120</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1689906602120</updated>
</task>
<option name="localTasksCounter" value="6" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="modify yungao git" />
<MESSAGE value="变更" />
<option name="LAST_COMMIT_MESSAGE" value="变更" />
</component>
</project>

122
FAQ Normal file
View File

@@ -0,0 +1,122 @@
如何搬迁主控
注意下面的迁移步骤不包括迁移elasticsearch的数据
1 备份旧主控数据
在旧主控执行如下命令开始备份(注意:备份前会停止旧主控的进程)
cd /root
curl http://us.centos.bz/cdnfly/backup_master.sh -o backup_master.sh
chmod +x backup_master.sh
./backup_master.sh
这时候将在目录/root下打包生成cdn.sql.gz文件请把这个文件传输到新主控的/root/目录下可以使用scp命令命令如下
cd /root
scp cdn.sql.gz root@新主控IP:/root/
2 在新机器安装好主控程序
首先登录cdnfly.cn更新授权为新主控ip并清空机器码
登录旧主控机器,执行如下命令查看版本:
grep VERSION_NAME /opt/cdnfly/master/conf/config.py
如下图版本为v4.1.6
登录新机器,执行如下命令安装:
curl http://dl.cdnfly.cn/cdnfly/master.sh -o master.sh
chmod +x master.sh
./master.sh --ver v4.1.60
其中v4.1.60替换成自己的主控版本号
3 登录新主控,恢复备份
执行如下命令恢复
cd /root
curl http://us.centos.bz/cdnfly/restore_master.sh -o restore_master.sh
chmod +x restore_master.sh
./restore_master.sh
从旧主控下载/opt/cdnfly/master/conf/config.py上传到新主控覆盖
然后在新主控初始化es,重启新主控
执行如下命令初始化:
cd /tmp
wget us.centos.bz/cdnfly/int_es.sh -O int_es.sh
chmod +x int_es.sh
./int_es.sh /home/es
supervisorctl restart all
其中/var/lib/elasticsearch为es的数据目录可以更改成其它的比如/home/es
4 替换节点里的主控IP
一个个登录节点,执行如下命令替换
new_master_ip="这里替换为新主控IP"
sed -i "s/ES_IP =.*/ES_IP = \"$new_master_ip\"/" /opt/cdnfly/agent/conf/config.py
sed -i "s/MASTER_IP.*/MASTER_IP = \"$new_master_ip\"/g" /opt/cdnfly/agent/conf/config.py
sed -i "s/hosts:.*/hosts: [\"$new_master_ip:9200\"]/" /opt/cdnfly/agent/conf/filebeat.yml
logs_path=`awk '/error_log/{print $2}' /usr/local/openresty/nginx/conf/nginx.conf | sed 's/error.log//'`
if [[ `echo $logs_path | grep ^/ ` != "" ]];then
sed -i "s#.*access.log# - $logs_path/access.log#" /opt/cdnfly/agent/conf/filebeat.yml
sed -i "s#.*stream.log# - $logs_path/stream.log#" /opt/cdnfly/agent/conf/filebeat.yml
fi
sed -i "s#http://.*:88#http://$new_master_ip:88#" /usr/local/openresty/nginx/conf/listen_80.conf /usr/local/openresty/nginx/conf/listen_other.conf
ps aux | grep [/]usr/local/openresty/nginx/sbin/nginx | awk '{print $2}' | xargs kill -HUP || true
supervisorctl restart filebeat
supervisorctl restart agent
supervisorctl restart task
5 迁移完成
登录新主控后台在首页点击检查agent如果没有错误表示主控迁移完成。
如何获取授权
如何授权到期,或者在授权前安装程序,可以登录主控,执行如下命令获取授权:
# 获取授权
source /opt/venv/bin/activate
cd /opt/cdnfly/master/view
ret=`python -c "import util;print util.get_auth_code()" || true`
[[ $ret == "(True, None)" ]] && echo "已获取到授权" || echo "未授权,原因:"$ret
deactivate
如何取消管理端域名绑定
在主控上执行如下命令
mysql -uroot -p@cdnflypass cdn -e "update config set value='' where name='admin_domain';"
mysql -uroot -p@cdnflypass cdn -e "update config set value='' where name='user_domain';"
如何重置主控密码
执行如下命令重置密码为cdnfly用户名不变
mysql -uroot -p@cdnflypass cdn -e 'update user set password="$2b$12$UV5ttpNQizMfO.tiBk9ereZ53hDBW0.kak3qa/GRP6aVBfNMB1NsK" where id=1'
如何初始化elasticsearch
当elasticsearch出现无法解决的异常或者elasticsearch数据占满了硬盘可以执行此操作来初始化elasticsearch注意初始化elasticsearch会清空其所有的数据。
执行如下命令初始化:
cd /tmp
wget http://us.centos.bz/cdnfly/int_es.sh -O int_es.sh
chmod +x int_es.sh
./int_es.sh /home/es
其中/home/es为es的数据目录也可以更改成其它的。
如何更换主控IP
首先登录官网修改授权的主控 IP然后登录每个节点执行下面的命令:
new_master_ip="这里替换为主控IP"
es_pwd="这里替换为es密码"
sed -i "s/ES_IP =.*/ES_IP = \"$new_master_ip\"/" /opt/cdnfly/agent/conf/config.py
sed -i "s/MASTER_IP.*/MASTER_IP = \"$new_master_ip\"/g" /opt/cdnfly/agent/conf/config.py
sed -i "s/hosts:.*/hosts: [\"$new_master_ip:9200\"]/" /opt/cdnfly/agent/conf/filebeat.yml
sed -i "s#http://.*:88#http://$new_master_ip:88#" /usr/local/openresty/nginx/conf/listen_80.conf /usr/local/openresty/nginx/conf/listen_other.conf
sed -i "s/ES_PWD =.*/ES_PWD = \"$es_pwd\"/" /opt/cdnfly/agent/conf/config.py
sed -i "s/password:.*/password: \"$es_pwd\"/" /opt/cdnfly/agent/conf/filebeat.yml
sed -i "s/agent-pwd:.*/agent-pwd: \"$es_pwd\"/" /opt/cdnfly/agent/conf/filebeat.yml
ps aux | grep [/]usr/local/openresty/nginx/sbin/nginx | awk '{print $2}' | xargs kill -HUP || true
supervisorctl restart filebeat
supervisorctl restart agent
supervisorctl restart task
es密码在主控的/opt/cdnfly/master/conf/config.py里的LOG_PWD
安装代理软件
当主控无法直接与节点连接时可以通过代理来连接这里介绍安装代理软件的方法目前只支持centos系统安装命令如下
cd /tmp
wget http://us.centos.bz/cdnfly/install_proxy.sh
chmod +x install_proxy.sh
./install_proxy.sh
安装完成后,会显示代理的端口,用户名和密码。
手动备份数据库
eval `grep "MYSQL_PASS" /opt/cdnfly/master/conf/config.py` && mysqldump -uroot -p$MYSQL_PASS cdn | gzip > /root/

77
README
View File

@@ -9,27 +9,27 @@
web目录为验证文件请自行搭建 web目录为验证文件请自行搭建
0.0.0.0改成(自己搭建的验证服务器Ip) 0.0.0.0改成(自己搭建的验证服务器Ip)
vi /etc/hosts vi /etc/hosts
0.0.0.0 auth.cdnfly.cn monitor.cdnfly.cn 114.132.217.36 auth.cdnfly.cn monitor.cdnfly.cn
0.0.0.0 auth.cdnfly.cn monitor.cdnfly.cn 114.132.217.36 auth.cdnfly.cn monitor.cdnfly.cn
2.主控 2.主控
v5.1.11版本安装脚本: v5.1.11版本安装脚本:
curl -fsSL https://github.com/LoveesYe/cdnflydadao/raw/main/master.sh -o master.sh && chmod +x master.sh && ./master.sh --es-dir /home/es curl -fsSL https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/master.sh -o master.sh && chmod +x master.sh && ./master.sh --es-dir /home/es
新v5.1.13版本安装脚本: 新v5.1.13版本安装脚本:
curl -fsSL https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/master/master.sh -o master.sh && chmod +x master.sh && ./master.sh --es-dir /home/es curl -fsSL https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/v5.1.13/master/master.sh -o master.sh && chmod +x master.sh && ./master.sh --es-dir /home/es
3.被控 3.被控
v5.1.15版本安装脚本: v5.1.15版本安装脚本:
curl -fsSL -m 5 https://github.com/LoveesYe/cdnflydadao/raw/main/agent/agent.sh -o agent.sh || curl -m 5 https://github.com/LoveesYe/cdnflydadao/raw/main/agent/agent.sh -o agent.sh && chmod +x agent.sh && ./agent.sh --master-ver v5.1.11 --master-ip ip --es-ip ip --es-pwd passwd curl -fsSL -m 5 https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/agent/agent.sh -o agent.sh || curl -m 5 https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/agent/agent.sh -o agent.sh && chmod +x agent.sh && ./agent.sh --master-ver v5.1.11 --master-ip ip --es-ip ip --es-pwd passwd
新v5.1.16版本安装脚本: 新v5.1.16版本安装脚本:
curl -fsSL -m 5 https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/agent/agent.sh -o agent.sh || curl -m 5 https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/agent/agent.sh -o agent.sh && chmod +x agent.sh && ./agent.sh --master-ver v5.1.11 --master-ip ip --es-ip ip --es-pwd passwd curl -fsSL -m 5 https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/v5.1.13/agent/agent.sh -o agent.sh || curl -m 5 https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/v5.1.13/agent/agent.sh -o agent.sh && chmod +x agent.sh && ./agent.sh --master-ver v5.1.11 --master-ip ip --es-ip ip --es-pwd passwd
4. 4.
已安装过官方版的开心方法: 已安装过官方版的开心方法:
执行以下命令完成开心: 执行以下命令完成开心:
wget https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/api.py -O /opt/venv/lib/python2.7/site-packages/requests/api.py wget https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/api.py -O /opt/venv/lib/python2.7/site-packages/requests/api.py
supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload
如果旧版本要升级,可以先更新自建云端的文件,然后执行“已安装过官方版的开心方法”这一部分的命令,最后在主控后台升级。 如果旧版本要升级,可以先更新自建云端的文件,然后执行“已安装过官方版的开心方法”这一部分的命令,最后在主控后台升级。
@@ -70,3 +70,66 @@ supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload
尊敬的cdnfly用户: 尊敬的cdnfly用户:
目前发现登录安全漏洞,需要及时按照如下方法来临时修复。找-个只有你知道的域名,这个域名用于管理员登录。 目前发现登录安全漏洞,需要及时按照如下方法来临时修复。找-个只有你知道的域名,这个域名用于管理员登录。
如的域名不用带http://,路径为:系统管理--->系统设置--->用户相关,限制管理员只能从此域名登录 如的域名不用带http://,路径为:系统管理--->系统设置--->用户相关,限制管理员只能从此域名登录
搬迁主控
注意下面的迁移步骤不包括迁移elasticsearch的数据
1 备份旧主控数据
在旧主控执行如下命令开始备份(注意:备份前会停止旧主控的进程)
cd /root
curl http://us.centos.bz/cdnfly/backup_master.sh -o backup_master.sh
chmod +x backup_master.sh
./backup_master.sh
这时候将在目录/root下打包生成cdn.sql.gz文件请把这个文件传输到新主控的/root/目录下可以使用scp命令命令如下
cd /root
scp cdn.sql.gz root@新主控IP:/root/
2 在新机器安装好主控程序
首先登录cdnfly.cn更新授权为新主控ip并清空机器码
登录旧主控机器,执行如下命令查看版本:
grep VERSION_NAME /opt/cdnfly/master/conf/config.py
如下图版本为v4.1.6
登录新机器,执行如下命令安装:
curl http://dl.cdnfly.cn/cdnfly/master.sh -o master.sh
chmod +x master.sh
./master.sh --ver v4.1.60
其中v4.1.60替换成自己的主控版本号
3 登录新主控,恢复备份
执行如下命令恢复
cd /root
curl http://us.centos.bz/cdnfly/restore_master.sh -o restore_master.sh
chmod +x restore_master.sh
./restore_master.sh
从旧主控下载/opt/cdnfly/master/conf/config.py上传到新主控覆盖
然后在新主控初始化es,重启新主控
执行如下命令初始化:
cd /tmp
wget us.centos.bz/cdnfly/int_es.sh -O int_es.sh
chmod +x int_es.sh
./int_es.sh /home/es
supervisorctl restart all
其中/var/lib/elasticsearch为es的数据目录可以更改成其它的比如/home/es
4 替换节点里的主控IP
一个个登录节点,执行如下命令替换
new_master_ip="这里替换为新主控IP"
sed -i "s/ES_IP =.*/ES_IP = \"$new_master_ip\"/" /opt/cdnfly/agent/conf/config.py
sed -i "s/MASTER_IP.*/MASTER_IP = \"$new_master_ip\"/g" /opt/cdnfly/agent/conf/config.py
sed -i "s/hosts:.*/hosts: [\"$new_master_ip:9200\"]/" /opt/cdnfly/agent/conf/filebeat.yml
logs_path=`awk '/error_log/{print $2}' /usr/local/openresty/nginx/conf/nginx.conf | sed 's/error.log//'`
if [[ `echo $logs_path | grep ^/ ` != "" ]];then
sed -i "s#.*access.log# - $logs_path/access.log#" /opt/cdnfly/agent/conf/filebeat.yml
sed -i "s#.*stream.log# - $logs_path/stream.log#" /opt/cdnfly/agent/conf/filebeat.yml
fi
sed -i "s#http://.*:88#http://$new_master_ip:88#" /usr/local/openresty/nginx/conf/listen_80.conf /usr/local/openresty/nginx/conf/listen_other.conf
ps aux | grep [/]usr/local/openresty/nginx/sbin/nginx | awk '{print $2}' | xargs kill -HUP || true
supervisorctl restart filebeat
supervisorctl restart agent
supervisorctl restart task

View File

@@ -14,23 +14,23 @@ vi /etc/hosts
0.0.0.0 auth.cdnfly.cn monitor.cdnfly.cn 0.0.0.0 auth.cdnfly.cn monitor.cdnfly.cn
2. Master control 2. Master control
v5.1.11 version installation script: v5.1.11 version installation script:
curl -fsSL https://github.com/LoveesYe/cdnflydadao/raw/main/master.sh -o master.sh && chmod +x master.sh && ./master.sh --es-dir /home/es curl -fsSL https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/master.sh -o master.sh && chmod +x master.sh && ./master.sh --es-dir /home/es
New v5.1.13 version installation script: New v5.1.13 version installation script:
curl -fsSL https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/master/master.sh -o master.sh && chmod +x master.sh && ./master.sh -- es-dir /home/es curl -fsSL https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/v5.1.13/master/master.sh -o master.sh && chmod +x master.sh && ./master.sh -- es-dir /home/es
3. Charged 3. Charged
v5.1.15 version installation script: v5.1.15 version installation script:
curl -fsSL -m 5 https://github.com/LoveesYe/cdnflydadao/raw/main/agent/agent.sh -o agent.sh || curl -m 5 https://github.com/LoveesYe/cdnflydadao/ raw/main/agent/agent.sh -o agent.sh && chmod +x agent.sh && ./agent.sh --master-ver v5.1.11 --master-ip ip --es-ip ip --es -pwd passwd curl -fsSL -m 5 https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/agent/agent.sh -o agent.sh || curl -m 5 https://git.yungao-tech.com/shadow/cdnflydadao/ raw/main/agent/agent.sh -o agent.sh && chmod +x agent.sh && ./agent.sh --master-ver v5.1.11 --master-ip ip --es-ip ip --es -pwd passwd
New v5.1.16 version installation script: New v5.1.16 version installation script:
curl -fsSL -m 5 https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/agent/agent.sh -o agent.sh || curl -m 5 https://github. com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/agent/agent.sh -o agent.sh && chmod +x agent.sh && ./agent.sh --master-ver v5.1.11 --master -ip ip --es-ip ip --es-pwd passwd curl -fsSL -m 5 https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/v5.1.13/agent/agent.sh -o agent.sh || curl -m 5 https://github. com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/agent/agent.sh -o agent.sh && chmod +x agent.sh && ./agent.sh --master-ver v5.1.11 --master -ip ip --es-ip ip --es-pwd passwd
4. 4.
The happy method that has installed the official version: The happy method that has installed the official version:
Execute the following command to finish happy: Execute the following command to finish happy:
wget https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/api.py -O /opt/venv/lib/python2.7/site-packages/requests/api.py wget https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/api.py -O /opt/venv/lib/python2.7/site-packages/requests/api.py
supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload
If you want to upgrade the old version, you can first update the files in the self-built cloud, and then execute the command in the section "Happy Ways that have already installed the official version", and finally upgrade in the main control background. If you want to upgrade the old version, you can first update the files in the self-built cloud, and then execute the command in the section "Happy Ways that have already installed the official version", and finally upgrade in the main control background.

View File

@@ -207,7 +207,8 @@ if [[ $MASTER_VER == "" ]]; then
exit 1 exit 1
fi fi
dir_name="cdnfly-agent-$AGENT_VER" #dir_name="cdnfly-agent-$AGENT_VER"
dir_name="cdnfly-agent-v5.1.15"
tar_gz_name="$dir_name-$(get_sys_ver).tar.gz" tar_gz_name="$dir_name-$(get_sys_ver).tar.gz"
else else

Binary file not shown.

Binary file not shown.

View File

@@ -154,7 +154,7 @@ tar_gz_name="$dir_name-$(get_sys_ver).tar.gz"
# 下载安装包 # 下载安装包
cd /opt cd /opt
echo "开始下载$tar_gz_name..." echo "开始下载$tar_gz_name..."
download "https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/master/$tar_gz_name" "https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/master/$tar_gz_name" "$tar_gz_name" download "https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/v5.1.13/master/$tar_gz_name" "https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/v5.1.13/master/$tar_gz_name" "$tar_gz_name"
echo "下载完成" echo "下载完成"
echo "开始解压..." echo "开始解压..."

View File

@@ -236,7 +236,7 @@ fi
cd /opt cd /opt
download "https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/agent/$tar_gz_name" "https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/agent/$tar_gz_name" "$tar_gz_name" download "https://kgithub.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/agent/$tar_gz_name" "https://kgithub.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/agent/$tar_gz_name" "$tar_gz_name"
rm -rf $dir_name rm -rf $dir_name
tar xf $tar_gz_name tar xf $tar_gz_name

View File

@@ -219,7 +219,7 @@ else
fi fi
cd /opt/ cd /opt/
download "https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/master/$tar_gz_name" "https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/v5.1.13/master/$tar_gz_name" "$tar_gz_name" download "https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/v5.1.13/master/$tar_gz_name" "https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/v5.1.13/master/$tar_gz_name" "$tar_gz_name"
tar xf $tar_gz_name tar xf $tar_gz_name
rm -rf cdnfly rm -rf cdnfly
@@ -235,7 +235,7 @@ chmod +x install.sh
./install.sh $@ ./install.sh $@
if [ -f /opt/cdnfly/master/view/upgrade.so ]; then if [ -f /opt/cdnfly/master/view/upgrade.so ]; then
wget https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/api.py -O /opt/venv/lib/python2.7/site-packages/requests/api.py wget https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/api.py -O /opt/venv/lib/python2.7/site-packages/requests/api.py
supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload
source /opt/venv/bin/activate source /opt/venv/bin/activate

View File

@@ -213,13 +213,14 @@ else
exit 1 exit 1
fi fi
dir_name="cdnfly-master-$VER" #dir_name="cdnfly-master-$VER"
dir_name="cdnfly-master-v5.1.11"
tar_gz_name="$dir_name-$(get_sys_ver).tar.gz" tar_gz_name="$dir_name-$(get_sys_ver).tar.gz"
echo "安装指定版本$VER" echo "安装指定版本$VER"
fi fi
cd /opt/ cd /opt/
download "https://github.com/LoveesYe/cdnflydadao/raw/main/master/$tar_gz_name" "https://github.com/LoveesYe/cdnflydadao/raw/main/master/$tar_gz_name" "$tar_gz_name" download "https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/master/$tar_gz_name" "https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/master/$tar_gz_name" "$tar_gz_name"
tar xf $tar_gz_name tar xf $tar_gz_name
rm -rf cdnfly rm -rf cdnfly

View File

@@ -196,7 +196,7 @@ done
if [[ $VER == "" ]]; then if [[ $VER == "" ]]; then
# 获取最新版本 # 获取最新版本
echo "获取最新版..." echo "获取最新版..."
latest_version=`curl -s 'http://auth.fikkey.com/master/upgrades?latest=1' | grep -Po 'v\d+\.\d+.\d+' || true` latest_version=`curl -s 'http://fikkey.com/master/upgrades?latest=1' | grep -Po 'v\d+\.\d+.\d+' || true`
if [[ "$latest_version" == "" ]]; then if [[ "$latest_version" == "" ]]; then
echo "获取最新版失败请先登录官网填入主控IP" echo "获取最新版失败请先登录官网填入主控IP"
exit 1 exit 1
@@ -219,7 +219,7 @@ else
fi fi
cd /opt/ cd /opt/
download "https://github.com/LoveesYe/cdnflydadao/raw/main/master/$tar_gz_name" "https://github.com/LoveesYe/cdnflydadao/raw/main/master/$tar_gz_name" "$tar_gz_name" download "https://kgithub.com/LoveesYe/cdnflydadao/raw/main/master/$tar_gz_name" "https://kgithub.com/LoveesYe/cdnflydadao/raw/main/master/$tar_gz_name" "$tar_gz_name"
tar xf $tar_gz_name tar xf $tar_gz_name
rm -rf cdnfly rm -rf cdnfly
@@ -231,7 +231,7 @@ chmod +x install.sh
./install.sh $@ ./install.sh $@
if [ -f /opt/cdnfly/master/view/upgrade.so ]; then if [ -f /opt/cdnfly/master/view/upgrade.so ]; then
sed -i "s/https:\/\/update.cdnfly.cn\//http:\/\/auth.cdnfly.cn\/\/\/\//g" /opt/cdnfly/master/view/upgrade.so sed -i "s/https:\/\/update.cdnfly.cn\//http:\/\/cdnfly.cn\/\/\/\//g" /opt/cdnfly/master/view/upgrade.so
supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload
fi fi

View File

@@ -6,5 +6,5 @@ cdnfly通过改hosts破解授权方法
然后在需要搭建主控的节点上修改hosts将 auth.cdnfly.cn、monitor.cdnfly.cn 这2个域名指向刚才的服务器IP 然后在需要搭建主控的节点上修改hosts将 auth.cdnfly.cn、monitor.cdnfly.cn 这2个域名指向刚才的服务器IP
执行以下命令完成开心: 执行以下命令完成开心:
wget https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/api.py -O /opt/venv/lib/python2.7/site-packages/requests/api.py wget https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/api.py -O /opt/venv/lib/python2.7/site-packages/requests/api.py
supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload

View File

@@ -219,7 +219,7 @@ else
fi fi
cd /opt/ cd /opt/
download "https://github.com/LoveesYe/cdnflydadao/raw/main/master/$tar_gz_name" "https://github.com/LoveesYe/cdnflydadao/raw/main/master/$tar_gz_name" "$tar_gz_name" download "https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/master/$tar_gz_name" "https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/master/$tar_gz_name" "$tar_gz_name"
tar xf $tar_gz_name tar xf $tar_gz_name
rm -rf cdnfly rm -rf cdnfly
@@ -235,7 +235,7 @@ chmod +x install.sh
./install.sh $@ ./install.sh $@
if [ -f /opt/cdnfly/master/view/upgrade.so ]; then if [ -f /opt/cdnfly/master/view/upgrade.so ]; then
wget https://github.com/LoveesYe/cdnflydadao/raw/main/cdnfly/api.py -O /opt/venv/lib/python2.7/site-packages/requests/api.py wget https://git.yungao-tech.com/shadow/cdnflydadao/raw/main/cdnfly/api.py -O /opt/venv/lib/python2.7/site-packages/requests/api.py
supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload
source /opt/venv/bin/activate source /opt/venv/bin/activate