Total Pageviews

Monday 1 October 2018

创建 packagist.org 的镜像网站


Build Status Minimum PHP Version Packagist Codecov Quality Score Software License
This is PHP package repository packagist.org mirror site.
If you're using PHP Composer, commands like create-projectrequireupdateremove are often used. When those commands are executed, Composer will download information from the packages that are needed also from dependent packages. The number of json files downloaded depends on the complexity of the packages which are going to be used. The further you are from the location of the packagist.org server, the more time is needed to download json files. By using mirror, it will help save the time for downloading because the server location is closer.
This project aims to create a local mirror with ease, allowing greater availability for companies that want to use the composer but do not want to depend on the infrastructure of third parties. It is also possible to create a public mirror to reduce the load on the main repository and allow a better distribution of requests around the world.

Install

Via Composer
$ composer require webysther/packagist-mirror
Schedule the command to create and update the mirror:
$ php bin/mirror create --no-progress
Via Docker
Follow to docker repository.

Requirements

The following versions of PHP are supported by this version.
  • PHP >=7.1

Testing

$ vendor/bin/phpunit

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Credits

from  https://github.com/Webysther/packagist-mirror
-------


Requirement

  • PHP > 5.3
  • ext-curl
  • ext-hash
  • ext-json
  • ext-zlib
  • ext-PDO
  • ext-pdo_sqlite

Install

$ git clone https://github.com/hirak/packagist-crawler
$ cd packagist-crawler
$ composer install

Download!

$ php parallel.php

(...few minutes...)

$ ls cache/
p/
packages.json

Configuration

  • config.default.php
  • config.php
from https://github.com/hirak/packagist-crawler

No comments:

Post a Comment