Skip to content
forked from weyo/mirrors

A simple opensource mirror site based on tunasync.

License

Notifications You must be signed in to change notification settings

wajchina/mirrors

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

开源镜像站

说明

本项目是镜像服务器的前端与后台维护脚本源码。

前端页面会定时(本项目默认为1分钟,注:定时刷新功能不支持 IE8 及以下浏览器)从后台获取各同步源数据状态,并刷新至浏览器。

默认配置

  • 镜像路径:/data/mirrors/web/
  • 程序路径:/data/mirrors/tunasync/
  • 日志路径:/data/mirrors/log/

安装部署

  • 获取代码
    # mkdir -p /data/mirrors && cd /data/mirrors
    # git clone OUR_PROJECT_URL
    
  • 初始化
    • 按需修改变量tunasync/scripts/setup.sh
      • PREFIX_MIRROR 镜像目录
      • MY_MIRROR_SITE_ADDRESS 站点域名或IP地址,用于使用帮助文档
    • 执行初始化脚本
      # /data/mirrors/tunasync/scripts/setup.sh
      
  • 启动
    ## 主管理服务
    # systemctl start tunasync-manager
    ## 按需启动镜像同步
    # systemctl start tunasync-anaconda
    # systemctl start tunasync-almalinux
    # systemctl start tunasync-almalinux-vault
    # systemctl start tunasync-bioconductor
    # systemctl start tunasync-centos
    # systemctl start tunasync-centos-vault
    # systemctl start tunasync-CPAN
    # systemctl start tunasync-CRAN
    # systemctl start tunasync-debuginfo
    # systemctl start tunasync-epel
    # systemctl start tunasync-rocky
    # systemctl start tunasync-rocky-vault
    # systemctl start tunasync-pypi
    
  • 配置http服务
    以apache为例
    # cat << EOF >> /etc/httpd/conf.d/mirrors.conf 
    DocumentRoot "/data/mirrors/web"
    <Directory "/data/mirrors/web">
        Options Indexes FollowSymLinks
        IndexOptions FancyIndexing NameWidth=* IconWidth=16 IconHeight=16
        AllowOverride None
        Require all granted
    </Directory>
    EOF
    

其他

更多信息可参阅博客 使用 tunasync 搭建开源镜像站

致谢

本项目前端页面样式参考自网易开源镜像站,镜像使用帮助内容参考自网易开源镜像站清华大学开源软件镜像站USTC open source software mirror,在此一并表示感谢!

About

A simple opensource mirror site based on tunasync.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 62.9%
  • JavaScript 18.3%
  • Shell 12.9%
  • CSS 5.9%