1. 共享策略

    • web策略(示例)
    • ftp策略
    • python策略
  2. web策略 - nginx

    • 2.1 安装nginx

      yum install nginx -y
      
    • 2.2 代理yum仓库地址

      location / {
      root /home/mirrors;
      autoindex on;
      autoindex_exact_size off;
      autoindex_format html;
      autoindex_localtime on;
      }
      
    • 2.3. client配置yum仓库

      [local-epel]
      name=local-epel
      baseurl=http://192.168.101.32/epel
      enable=1
      gpgcheck=0
      
      [local-base]
      name=local-base
      baseurl=http://192.168.101.32/base
      enable=1
      gpgcheck=0
      
      [local-extras]
      name=local-extras
      baseurl=http://192.168.101.32/extras
      enable=1
      gpgcheck=0
      
      [local-updates]
      name=local-updates
      baseurl=http://192.168.101.32/updates
      enable=1
      gpgcheck=0
      
  3. python策略

    • 3.1 启动http服务

      cd /home/mirrors
      python -m SimpleHTTPServer // 默认8000端口
      
    • 3.2 client配置yum仓库

      [local-epel]
      name=local-epel
      baseurl=http://192.168.101.32:8000/epel
      enable=1
      gpgcheck=0
      
      [local-base]
      name=local-base
      baseurl=http://192.168.101.32:8000/base
      enable=1
      gpgcheck=0
      
      [local-extras]
      name=local-extras
      baseurl=http://192.168.101.32:8000/extras
      enable=1
      gpgcheck=0
      
      [local-updates]
      name=local-updates
      baseurl=http://192.168.101.32:8000/updates
      enable=1
      gpgcheck=0
      

本地yum + 共享完成,下章介绍离线安装Flask

Copyright & TianCiwang 2021 all right reserved,powered by Gitbook修改时间: 2021-11-30 17:24:03

results matching ""

    No results matching ""

    results matching ""

      No results matching ""