明国三年一场雨

明国三年一场雨

热爱技术分享
telegram
email

cdnfly Setup

  1. Authorization Station Setup
  2. Download the web directory from https://icloudhub.lanzoul.com/iEqEg1ig73lc to obtain the Cdnfly authorization verification file.
  3. Create a new website and fill in the domain name as [auth.cdnfly.cn] [monitor.cdnfly.cn]. The PHP version should be 7.2 or above.
  4. Configure the pseudo-static rules according to the pseudo-static files 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 and redirect it to us.centos.bz with a 301 redirect.

  1. Build the Control End
    Control configuration requirements: minimum 2 cores, 4GB RAM, open ports 80, 88, and 9200.

  2. 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 control end:
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 in /opt/cdnfly/master/install.sh with us.centos.bz, then execute ./install.sh $@ in the /opt/cdnfly/master directory to continue the installation.

If you have installed the control end 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 control end is: http://control_IP/
Administrator account and password: admin/cdnfly
Regular user account and password: jason/cdnfly

  1. Build the Controlled End
    Controlled configuration requirements: at least 2GB of memory (1GB has been tested successfully), open ports 80, 443, and 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 on startup: vi /etc/fstab and add the following 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 controlled 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. Backend Configuration

  2. Add a region, add a node, and edit the node's cache size.

  3. DNS settings.

  4. Line grouping - set up resolution.

  5. Global configuration - firewall, etc.

  6. Add a package.

  7. Security Configuration

  8. System Management > System Settings > User Related > Restrict ordinary users to login only from this domain and restrict administrators to login only from this domain.

  9. Then, in these two login domains, set to 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
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.