安装 satis

命令行下执行: php create-project composer/satis --stability=dev --keep-vcs 。

配置

创建 satis.json 文件,如官方示例:

{
"name": "My Repository",
"homepage": "http://packages.example.org",
"repositories": [
{ "type": "vcs", "url": "https://github.com/mycompany/privaterepo" },
{ "type": "vcs", "url": "http://svn.example.org/private/repo" },
{ "type": "vcs", "url": "https://github.com/mycompany/privaterepo2" }
],
"require-all": true
}

reposiories 数组改成公司内网各个使用 composer 自动加载项目的地址,注意 URL中需要带 .git 。

构建

进入 satis 目录,使用如下命令构建 satis web站点: php bin/satis build satis.json public 。

注: composer的 repo.packagist 配置项如果采用的是国内的镜像地址,可能上面的 build 语句会失败,需要暂时去掉镜像配置,linux 下可直接编辑 ~/.config/composer/config.json 文件去掉,windows 下的操作同理;由于自建的 composer 私有库使用的是 HTTP 协议,而默认 composer 要求必须使用 HTTPS 协议,故 composer create-project 时,必须指定 no-secure-http 参数,或者在配置项指定参数 "secure-http": false 。

WEB 站点搭建

使用 apache/nginx 或 php -S 命令创建 WEB 站点,文档根目录指向 satis/public 目录。

使用 satis 私有库 composer create-project

假设上面配置的 web 站点地址是 http://127.0.0.1 ,则可使用如下命令创建composer项目:

composer create-project vendor/project --no-secure-http --no-interaction --repository=http://127.0.0.1

或者配置下以下选项:

composer config -g secure-http false
composer config -g repo.my_repo composer http://127.0.0.1

然后,以后只需要使用下面的命令安装:

composer create-project vendor/project -n
composer.json 中指定要包含的私有composer项目:

通过 repositories 配置项指定私有composer库的地址,指定后就可以在 require 中使用私有 composer 项目了。

{
"repositories": [
{ "type": "composer", "url": "http://127.0.0.1/" }
],
"require": [
...
],
...
}

The package PHP Web Site Compare Files is one of the few PHP packages that was considerednotable recently because it does something that is worth paying attention.

The basic purpose is: Compare the list of files of two Web sites

Here follows in more detail what it does:

This class can compare the list of files of two Web sites.

It can take the URLs of two sites and compares the list of files between them.

The class uses file_list.php script that needs to be installed on both site servers, so it can use that script to retrieve the files list.

The class displays a report of the files that are missing or changed between servers, as well the respective modification dates and sizes.

Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to thePHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.

If you also developed your own notable or innovative packages considersharing them, so you can also earn more visibility for your package.

You need to be aregistered user orlogin to post a comment

1,403,024 PHP developers registered to the PHP Classes site.

Be One of Us!

satis 搭建 Composer 私有库的方法的更多相关文章

  1. Satis搭建composer私有库(自定义下载目录)

    在我们的日常php开发中需要使用大量的第三方包和类库, 怎么管理是一个问题, 我们用的Yii2框架, 但是并没有把composer用起来, 由于最近更换为docker部署项目, 于是想起来用compo ...

  2. 在 Docker 搭建 Maven 私有库

    在 Docker 搭建 Maven 私有库 小引 If you are developing software without a repository manager you are likely ...

  3. docker学习---搭建Docker私有库及删除库内镜像

    环境准备系统: cat /etc/redhat-release CentOS Linux release (Core) 主机两台,分别是docker私有库服务器(IP 192.168.121.121) ...

  4. 使用 satis 搭建 composer 本地仓库

    环境 windows nginx php composer 安装 拉取 satis 项目包,并拉取项目依赖 composer create-project composer/satis --stabi ...

  5. 创业公司十分钟简单搭建GIT私有库

    欢迎关注老码农的微信公共账号,与CSDN博客同步 一.背景 小公司.协同开发的人不多,建gitlab比較麻烦,仅仅须要在Server端建立一个简单的git共享库就OK. 二.建立仓库 Server端: ...

  6. maven私有库搭建

    一.在企业中基本上都会有自己的maven私有库,主要的目的就是方便依赖包的下载.如果采用远程的方式来实现的话,很多时候会考虑网速问题.如果自己活着公司搭建的私有库,这一样在使用上面会效率更高. 二.私 ...

  7. 安装Maven并搭建Maven私有仓库

    一.说明 Maven是基于项目对象模型(POM),可以通过一小段描述信息来管理项目的构建,报告和文档的软件项目管理工具.我们在进行Java代码开发的时候,Eclipse+Maven+Jetty是一个十 ...

  8. Dubbo入门到精通学习笔记(四):持续集成管理平台之Maven私有库和本地库的安装与配置

    文章目录 介绍 Maven私有库和本地库的安装与配置 Nexus安装 Nexus 配置(登录后) 介绍 如果构建的Maven项目本地仓库没有对应的依赖包,那么就会去Nexus私服去下载, 那么如果Ne ...

  9. 使用 satis 搭建一个私有的 Composer 包仓库

    在我们的日常php开发中可能需要使用大量的composer包,大部份都可以直接使用,但在公司内部总有一小部份包是不能公开的,这时候我们就需要搭建一个公司内部使用的composer仓库,好在compos ...

随机推荐

  1. Git随记

    gulp 打包 把dist下的提交到构建环境 git status 看哪些发生了变化 git add . 添加当前文件夹下的文件 git commit -am "change file&qu ...

  2. Web 安全的短板

  3. Java 多线程 并发编程

    一.多线程 1.操作系统有两个容易混淆的概念,进程和线程. 进程:一个计算机程序的运行实例,包含了需要执行的指令:有自己的独立地址空间,包含程序内容和数据:不同进程的地址空间是互相隔离的:进程拥有各种 ...

  4. devexpress13学习系列(一)PDFViewer(2)

    DevExpress.XtraPdfViewer Namespace 该命名空间下,保留着pdfviewer组件需要的类,主要有:   Class Description   PdfCurrentPa ...

  5. mysql 常见的几个错误问题

    Mysql常见的几个错误问题及解决方法: 1.问题: mysql DNS反解:skip-name-resolve 错误日志有类似警告: 点击(此处)折叠或打开 120119 16:26:04 [War ...

  6. respondsToSelector: selector

    -(BOOL) respondsToSelector: selector 用来判断是否有以某个名字命名的方法(被封装在一个selector的对象里传递)

  7. Java基础(9):Java生成随机数一定范围内的数的一个典型例子

    题目:编写一个JAVA程序,创建指定长度的 int 型数组,并生成 100 以内随机数为数组中的每个元素赋值,然后输出数组 note: 通过 (int)(Math.random() * 100) 生成 ...

  8. DataBase: LeetCode

    Combine Two Tables # Write your MySQL query statement below Select p.FirstName, p.LastName, a.City, ...

  9. ruby初步学习中遇到的错误

    print <<off This is the second way of creating here document ie. multiple line string; off 报错: ...

  10. spring da-y02-go1

    使用构造器实例化bean: springday02:(同样导入5个基本jar包)1.复制xml文件到ioc包下2.B类,实现无参构造器3.A类,B是它的成员变量,实现无参和set/get方法4.修改x ...