明国三年一场雨

明国三年一场雨

热爱技术分享
telegram
email

cdnflyの構築

一。授权站搭建

  1. Download the web directory at https://icloudhub.lanzoul.com/iEqEg1ig73lc as the Cdnfly authorization verification file.
  2. Create a new website with the domain name filled in as [auth.cdnfly.cn] [monitor.cdnfly.cn] and PHP version 7.2 or above.
  3. Configure the pseudo-static according to the rules in the directory.
    Note: Do not install the bt_safe extension for PHP, otherwise, the TCP type monitoring cannot be used. If you want to use the ping type monitoring, you need to allow the exec function.

Download node setup bt.fikkey.com 301 redirect to us.centos.bz

二。搭建主控端
Main control configuration requirements: minimum 2 cores, 4GB RAM, open ports 80, 88, 9200.

  1. Update and disable the firewall:
yum update -y && yum upgrade -y && systemctl stop firewalld.service && systemctl disable firewalld.service && sudo systemctl disable firewalld && sudo systemctl mask –now firewalld && sudo ufw disable
  1. Modify the hosts file:
vi /etc/hosts
0.0.0.0  auth.cdnfly.cn monitor.cdnfly.cn bt.fikkey.com
  1. Install the main control:
curl -fsSL https://raw.githubusercontent.com/LoveesYe/cdnflydadao/main/cdnfly/v5.1.13/master/master.sh -o master.sh && chmod +x master.sh && ./master.sh --es-dir /home/es

If bt.fikkey.com/cdnfly/elasticsearch-7.6.1-x86_64.rpm returns a 404 error, replace the download address with us.centos.bz in /opt/cdnfly/master/install.sh, then execute ./install.sh $@ in the /opt/cdnfly/master directory to continue the installation.

If you are installing the main control in the Baota environment, you need to add a website in the Baota background with the root directory /opt/cdnfly/master/panel/.

The login address for the main control is: http://main_control_IP/
Administrator account and password: admin/cdnfly
Regular user account and password: jason/cdnfly

三。搭建被控
Slave control configuration requirements: at least 2GB of memory, tested with 1GB is also possible, open ports 80, 443, 5000, supports Centos-7---Ubuntu-16.04.
If the memory is less than 2GB, you can add swap:
Create a 1GB partition file:

dd if=/dev/zero of=/home/swap bs=1024 count=1024000

Convert the partition to swap:

/sbin/mkswap /home/swap

Enable this swap partition:

/sbin/swapon /home/swap

Automatically mount at startup: vi /etc/fstab and add a line at the bottom:

/home/swap swap swap defaults 0 0
  1. Update and disable the firewall:
yum update -y && yum upgrade -y && systemctl stop firewalld.service && systemctl disable firewalld.service && sudo systemctl disable firewalld && sudo systemctl mask –now firewalld && sudo ufw disable
  1. Install the slave control node:
curl -fsSL https://github.com/Steady-WJ/cdnfly-kaixin/raw/main/agent.sh -o agent.sh && chmod +x agent.sh && ./agent.sh --master-ver v5.1.13 --master-ip your_ip --es-ip your_ip --es-pwd password
curl -m 5 https://raw.githubusercontent.com/LoveesYe/cdnflydadao/main/cdnfly/v5.1.13/agent/agent.sh -o agent.sh || curl -m 5 https://raw.githubusercontent.com/LoveesYe/cdnflydadao/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 [password]

四。后台配置

  1. Add region, add node, node editing - cache size.
  2. DNS settings.
  3. Line grouping - set resolution.
  4. Global configuration - firewall, etc.
  5. Add package.

五。安全配置

  1. System management > System settings > User-related > Limit ordinary users to log in only from this domain and limit administrators to log in only from this domain.
  2. Then, in these two login domain settings, prohibit all access to /v1/.
    API settings HTML:
/opt/cdnfly/master/panel/src/views/account/config/api.html

Hide API menu:

/opt/cdnfly/master/panel/console/user_menu.json

[Common Commands]
Panel root directory:

/opt/cdnfly/master/panel/

Uninstall node:

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
読み込み中...
文章は、創作者によって署名され、ブロックチェーンに安全に保存されています。