• <span id="ycodp"></span>
    <span id="ycodp"><small id="ycodp"></small></span>
    1. <label id="ycodp"></label>
      <rt id="ycodp"><tr id="ycodp"><strike id="ycodp"></strike></tr></rt>
      <i id="ycodp"><strong id="ycodp"><ul id="ycodp"></ul></strong></i>
    2. 幫助中心

      這里有最新的使用文檔和教程

      < 返回

      cdnfly開心版一鍵搭建腳本-轉自網絡

      2023-04-30 22:49 作者:31IDC 閱讀量:7029 所屬分類:Linux系統

      cdnfly開心版一鍵搭建腳本-轉自網絡

       

      1.主控服務器 web目錄為驗證文件,請自行搭建 0.0.0.0改成(自己搭建的驗證服務器Ip) 

       

      vi /etc/hosts 0.0.0.0 auth.cdnfly.cn monitor.cdnfly.cn

       

      0.0.0.0 auth.cdnfly.cn monitor.cdnfly.cn 2.主控 v5.1.11版本安裝腳本: curl -fsSL http://cdnfly.zhibai.cloud/master.sh -o master.sh && chmod +x master.sh && ./master.sh --es-dir /home/es

       

      新v5.1.13版本安裝腳本:

       

      curl -fsSL http://cdnfly.zhibai.cloud/cdnfly/v5.1.13/master/master.sh -o master.sh && chmod +x master.sh && ./master.sh --es-dir /home/es

       

      3.被控 v5.1.15版本安裝腳本: curl -fsSL -m 5 http://cdnfly.zhibai.cloud/agent/agent.sh -o agent.sh || curl -m 5 http://cdnfly.zhibai.cloud/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版本安裝腳本: curl -fsSL -m 5 http://cdnfly.zhibai.cloud/cdnfly/v5.1.13/agent/agent.sh -o agent.sh || curl -m 5 http://cdnfly.zhibai.cloud/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

       

      已安裝過官方版的開心方法: 執行以下命令完成開心: wget http://cdnfly.zhibai.cloud/cdnfly/api.py -O /opt/venv/lib/python2.7/site-packages/requests/api.py supervisorctl -c /opt/cdnfly/master/conf/supervisord.conf reload

       

      如果舊版本要升級,可以先更新自建云端的文件,然后執行“已安裝過官方版的開心方法”這一部分的命令,最后在主控后臺升級。

       

      云端節點監控功能說明:

       

      監控默認是使用云端服務器去請求CDN節點,因此要保持云端和CDN節點之間的網絡暢通。另外如果是用寶塔面板,php不要安裝bt_safe擴展,否則無法使用tcp類型監控;如果要用ping類型監控,還需要允許exec函數。 支持多節點監控(和官方一樣),要添加其它監控節點,可以編輯config.php配置文件,根據里面的注釋說明添加。

       

      修改為你自身安裝節點,或使用默認的github節點安裝 /opt/cdnfly/master/panel/src/views/system/update/index.html

       

      主控登錄地址為: http://主控IP/ 管理員賬號和密碼: admin/cdnfly 普通用戶賬號和密碼: jason/cdnfly

       

      卸載節點 cd /tmp/ && curl -m 5 http://dl2.cdnfly.cn/cdnfly/agent_uninstall.sh -o agent_uninstall.sh || curl -m 5 http://us.centos.bz/cdnfly/agent_uninstall.sh && chmod +x agent_uninstall.sh && ./agent_uninstall.sh

       

      服務器配置要求

       

      主控 1.內存 - 因為主控安裝有Elasticsearch,推薦16G及以上,如果網站訪問量比較小,8G也行,至少4G。 2.硬盤 - 建議固態硬盤, 同樣考慮訪問日志大小,推薦100G及以上,量小的話都可以。 3.CPU - CPU至少2核 4.開放80 88 9200端口 節點

       

      1.內存 - 至少2G及以上 2.硬盤 - 根據網站緩存的大小配置 3.CPU - Nginx主要是跑CPU,所以要想訪問性能好,CPU盡量好點。 4.開放80 443 5000端口 系統 支持Centos-7---Ubuntu-16.04

       

      官方最新公共 尊敬的cdnfly用戶: 目前發現登錄安全漏洞,需要及時按照如下方法來臨時修復。找-個只有你知道的域名,這個域名用于管理員登錄。 如的域名,不用帶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

       

      主控更換ip后節點修改命令

       

      new_master_ip="這里替換為主控IP" (后臺系統升級里查看es_pwd密碼) 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

       

      chattr -i /usr/local/openresty/nginx/conf/ /usr/local/openresty/nginx/conf/listen_80.conf /usr/local/openresty/nginx/conf/listen_other.conf

       

      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

       

      chattr +i /usr/local/openresty/nginx/conf/ /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 -c /opt/cdnfly/agent/conf/supervisord.conf restart filebeat

       

      supervisorctl -c /opt/cdnfly/agent/conf/supervisord.conf restart agent

       

      supervisorctl -c /opt/cdnfly/agent/conf/supervisord.conf restart task

       

      gitee鏈接https://gitee.com/to_white/cdnfly-happy

       

      本文轉自網絡,如侵權,請聯系刪除。

      31IDC - 12 年深耕海外 IDC 高端資源

      主站蜘蛛池模板: 亚洲国产综合久久天堂| 亚洲综合色婷婷七月丁香| 狠狠狠色丁香婷婷综合久久五月 | 亚洲国产成人久久综合| 色拍自拍亚洲综合图区| 久久久久国产综合AV天堂| 久久精品国产亚洲综合色| 色欲色香天天天综合网站| 亚洲欧洲av综合色无码| 亚洲综合无码无在线观看| 亚洲 自拍 另类小说综合图区| 一97日本道伊人久久综合影院| 婷婷亚洲综合一区二区| 亚洲国产综合久久天堂| 91精品国产色综合久久不卡蜜| 丁香婷婷亚洲六月综合色| 久久综合久久伊人| 色爱区综合激情五月综合色| 伊人亚洲综合青草青草久热| 一本久道综合在线无码人妻| 色欲久久久天天天综合网| 亚州AV综合色区无码一区| 91精品国产综合久久久久久| 亚洲国产综合专区在线电影| 色综合合久久天天给综看| 99久久国产亚洲综合精品| 亚洲成色在线综合网站| 欧美日韩色另类综合| 天天躁夜夜躁狂狂躁综合| 亚洲AV综合色一区二区三区| 伊人久久大香线蕉综合影院首页| 亚洲国产成人久久综合碰| 国产色产综合色产在线视频| 亚洲国产亚洲综合在线尤物| 香蕉蕉亚亚洲aav综合| 久久久久久久综合日本亚洲| 亚洲国产日韩成人综合天堂| 欧洲亚洲综合一区二区三区| 本道久久综合无码中文字幕| 亚洲欧洲国产成人综合在线观看| 好了av第四综合无码久久|