日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢(xún)
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷(xiāo)解決方案
cdnfly開(kāi)心版一鍵搭建腳本

cdnfly開(kāi)心版一鍵搭建腳本-轉(zhuǎn)自網(wǎng)絡(luò)

創(chuàng)新互聯(lián)是一家集網(wǎng)站建設(shè),梨樹(shù)企業(yè)網(wǎng)站建設(shè),梨樹(shù)品牌網(wǎng)站建設(shè),網(wǎng)站定制,梨樹(shù)網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷(xiāo),網(wǎng)絡(luò)優(yōu)化,梨樹(shù)網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力??沙浞譂M(mǎn)足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專(zhuān)業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶(hù)成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。

1.主控服務(wù)器 web目錄為驗(yàn)證文件,請(qǐng)自行搭建 0.0.0.0改成(自己搭建的驗(yàn)證服務(wù)器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

已安裝過(guò)官方版的開(kāi)心方法: 執(zhí)行以下命令完成開(kāi)心: 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

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

云端節(jié)點(diǎn)監(jiān)控功能說(shuō)明:

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

修改為你自身安裝節(jié)點(diǎn),或使用默認(rèn)的github節(jié)點(diǎn)安裝 /opt/cdnfly/master/panel/src/views/system/update/index.html

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

卸載節(jié)點(diǎn) 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

服務(wù)器配置要求

主控 1.內(nèi)存 - 因?yàn)橹骺匕惭b有Elasticsearch,推薦16G及以上,如果網(wǎng)站訪問(wèn)量比較小,8G也行,至少4G。 2.硬盤(pán) - 建議固態(tài)硬盤(pán), 同樣考慮訪問(wèn)日志大小,推薦100G及以上,量小的話都可以。 3.CPU - CPU至少2核 4.開(kāi)放80 88 9200端口 節(jié)點(diǎn)

1.內(nèi)存 - 至少2G及以上 2.硬盤(pán) - 根據(jù)網(wǎng)站緩存的大小配置 3.CPU - Nginx主要是跑CPU,所以要想訪問(wèn)性能好,CPU盡量好點(diǎn)。 4.開(kāi)放80 443 5000端口 系統(tǒng) 支持Centos-7---Ubuntu-16.04

官方最新公共 尊敬的cdnfly用戶(hù): 目前發(fā)現(xiàn)登錄安全漏洞,需要及時(shí)按照如下方法來(lái)臨時(shí)修復(fù)。找-個(gè)只有你知道的域名,這個(gè)域名用于管理員登錄。 如的域名,不用帶http://,路徑為:系統(tǒng)管理--->系統(tǒng)設(shè)置--->用戶(hù)相關(guān),限制管理員只能從此域名登錄

搬遷主控 注意:下面的遷移步驟不包括遷移elasticsearch的數(shù)據(jù) 1 備份舊主控?cái)?shù)據(jù) 在舊主控執(zhí)行如下命令開(kāi)始備份(注意:備份前會(huì)停止舊主控的進(jìn)程)

cd /root curl http://us.centos.bz/cdnfly/backup_master.sh -o backup_master.sh chmod +x backup_master.sh ./backup_master.sh 這時(shí)候?qū)⒃谀夸?root下,打包生成cdn.sql.gz文件,請(qǐng)把這個(gè)文件傳輸?shù)叫轮骺氐?root/目錄下,可以使用scp命令,命令如下:

cd /root scp cdn.sql.gz root@新主控IP:/root/ 2 在新機(jī)器安裝好主控程序 首先登錄cdnfly.cn,更新授權(quán)為新主控ip,并清空機(jī)器碼 登錄舊主控機(jī)器,執(zhí)行如下命令查看版本:

grep VERSION_NAME /opt/cdnfly/master/conf/config.py 如下圖,版本為v4.1.6:

登錄新機(jī)器,執(zhí)行如下命令安裝:

curl http://dl.cdnfly.cn/cdnfly/master.sh -o master.sh chmod +x master.sh ./master.sh --ver v4.1.60 其中v4.1.60替換成自己的主控版本號(hào) 3 登錄新主控,恢復(fù)備份 執(zhí)行如下命令恢復(fù)

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,重啟新主控 執(zhí)行如下命令初始化:

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的數(shù)據(jù)目錄,可以更改成其它的,比如/home/es

4 替換節(jié)點(diǎn)里的主控IP 一個(gè)個(gè)登錄節(jié)點(diǎn),執(zhí)行如下命令替換

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后節(jié)點(diǎn)修改命令

new_master_ip="這里替換為主控IP" (后臺(tái)系統(tǒng)升級(jí)里查看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


分享標(biāo)題:cdnfly開(kāi)心版一鍵搭建腳本
當(dāng)前URL:http://www.dlmjj.cn/article/cosddeo.html