简体   繁体   English

PHP / MySQL独立安装程序/更新程序脚本?

[英]PHP / MySQL stand-alone installer/updater script?

I'm looking for a script that will quickly implement package install/update functionality for my framework. 我正在寻找一个可以为我的框架快速实现软件包安装/更新功能的脚本。 It should be able to do the following things: 它应该能够执行以下操作:

  • Must be PHP 5 compatible. 必须与PHP 5兼容。
  • Should be able to install and update components' files and database tables. 应该能够安装和更新组件的文件和数据库表。
  • Should allow defining of package dependencies and have a form of conflict resolving. 应该允许定义包依赖关系,并具有冲突解决的形式。
  • Should allow UPDATE SQL-statements when the developer of the package provides it. 当程序包的开发人员提供UPDATE SQL语句时,应允许它。 (To make database alterations without losing data). (在不丢失数据的情况下进行数据库更改)。
  • Should be able to 'jail' an update package to a target folder. 应该能够将更新程序包“ jail”到目标文件夹。
  • Should be able to define and detect different package types to apply mentioned 'jail'. 应该能够定义和检测不同的包类型以应用提到的“监狱”。
  • Should provide an API to integrate it in custom backend. 应该提供一个将其集成到自定义后端的API。
  • Should allow downloading of the packages, preferably over HTTP (rather than FTP or others). 应该允许下载软件包,最好是通过HTTP(而不是FTP或其他)。

I plan on using this as a stand-alone utility to easily provide updates for modular frameworks as well as custom code for our clients. 我计划将其用作独立实用程序,以轻松提供模块化框架的更新以及客户的自定义代码。

If you have recommendations of tools that are similar or used in an open source framework to base it off that would be good as well. 如果您建议使用类似或在开放源代码框架中使用的工具作为基础,那也不错。 :) :)

I don't know of any magic tools to do this, but a couple that might help you do these tasks are Phrake and Composer. 我不知道有什么魔术工具可以做到这一点,但是Phrake和Composer可以帮助您完成这些任务。

Phake is a PHP version of Ruby's Rake util. Phake是Ruby的Rake util的PHP版本。 You could use these scripts to set up your database, update files and run unit tests. 您可以使用这些脚本来设置数据库,更新文件和运行单元测试。

For package management you could use Composer to manage your dependencies (it can also download from PEAR if you depend on packages from those systems) and of course this could be incorporated into your build scripts. 对于软件包管理,您可以使用Composer来管理您的依赖项(如果您依赖于那些系统中的软件包,也可以从PEAR下载),并且当然可以将其合并到构建脚本中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM