建立Gitlab的本地Mirror

These directions will walk you through using the open source tool apt-mirror to mirror your APT repository.

  1. Install apt-mirror:

    sudo apt-get install apt-mirror

       

  2. Create a directory for your mirror:

    mkdir /path/to/repo-mirror

       

  3. Determine which version of Ubuntu or Debian you'd like to mirror. You'll need to add this to your apt-mirror config in the next step.

  4. Modify the apt-mirror config, using your favorite editor:

    sudo nano /etc/apt/mirror.list

         The default /etc/apt/mirror.list configuration is split into two sections. The top section includes global configuration values. Set base_path to the directory you created above:      

    set base_path /path/to/repo-mirrorset nthreads 5
    set _tilde 0

         The bottom section of /etc/apt/mirror.list contains a list of repositories to mirror. Use the example below, taking care to replace ubuntu and trusty with your Linux distribution and version:
         

    deb https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty main
    deb-src https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty main

         

  5. Run apt-mirror to generate the mirror.

    sudo apt-mirror

         

  6. Your APT repository mirror is ready to use.


你可能感兴趣的:(gitlab,ubutun)