我为小型企业创建 php 应用程序。一些客户可能更喜欢在本地服务器上运行应用程序,因此我的要求是使用 apache/mysql/php 创建/捆绑一个应用程序,并具有所有必要的配置和一键可执行文件(可以是批处理文件),这样当用户打开它,它在某个端口(例如 localhost:1234)和 mysql 上运行 apache 服务器。
并在默认 Web 浏览器中打开应用程序。
更准确地说,我正在寻找类似 http://www.simpleinvoices.org/go 的内容,请检查他们的 Windows 简单发票与 apache/php/mysql 捆绑在一起。
PS - 我不确定这个问题应该由 SO 还是超级用户提出。
I create php application for small businesses. Some of the clients may prefer running the app on a local server, therefore my requirement is to create/bundle an app with apache/mysql/php with all the necessary confirguration and one click executable (be it a batch file) such that when the user opens it, it runs the apache server on some port say localhost:1234 and mysql as well.
and opens up the application in the default web browser.
To be more exact, Im looking for something like http://www.simpleinvoices.org/go, check their Simple Invoices for Windows which come budled with apache/php/mysql.
P.S - Im not sure if this question should be at SO or Superuser.
发布评论
评论(4)
如果您确实想安装 Web 服务器和 SQL 服务器,那么 Lars 的解决方案将是一个不错的选择。在 Windows 上,您可以生成包含所需依赖项(如 WAMP)的 .msi 安装程序。在我看来,安装程序可执行文件将是比批处理文件更干净的解决方案,因为它还为用户提供了卸载软件的选项(如果他们愿意)。
如果您想以独立版本分发应用程序,那么您可能还需要检查像 NuSphere 的 PHPDock 这样的解决方案 - http://www.nusphere.com/products/phpdock.htm
If you actually want to install a web server and a SQL server then Lars' solution would be a way to go. On windows you can generate a .msi installer containing the dependencies you need (like WAMP). An installer executable would be a cleaner solution than a batch file in my opinion, as it will also provide the user with an option to uninstall your software if they wish.
If you want to distribute your application in a standalone version, then you might also want to check a solution like NuSphere's PHPDock - http://www.nusphere.com/products/phpdock.htm
我遇到了同样的挑战并遇到了 Uniform Server:
http://www.uniformserver.com/
你下载它,将您的应用程序添加到其中,启动它,一切都会运行。迷人的。
I had the same challenge and came across Uniform Server:
http://www.uniformserver.com/
You download it, add your application to it, start it and everything runs. Lovely.
超级用户会更好。但根据您的要求,您应该只创建一个包来安装。在 Windows 上,使用 WAMP 进行打包;在 Linux 上,通过一键安装或为两个最大的系统(即 APT 和 RPM)创建软件包进行打包。通过所有这些上的依赖系统,您可以确保您的应用程序立即运行。
Superuser would have been better. But depending on your requirements, you should just create a package to install. On windows, package it with WAMP, on linux, package it with either one-click-install or creating packages for the two biggest systems, namely APT and RPM. With the dependency-system on all of them you can make sure, that your application runs right off the bat.
PHP Desktop 是我在研究这个问题时发现的最佳选择。
https://github.com/cztomczak/phpdesktop
PHP Nightrain 也是一个选项:
https://download.cnet.com/PHP-Nightrain/3000-10248_4-76169308.html
Bitnami WAMP 堆栈看起来也不错:
https://docs.bitnami.com/installer/infrastruct/wamp/
PHP Desktop is the best option I found when researching this.
https://github.com/cztomczak/phpdesktop
PHP Nightrain is also an option:
https://download.cnet.com/PHP-Nightrain/3000-10248_4-76169308.html
Bitnami WAMP stack looks good as well:
https://docs.bitnami.com/installer/infrastructure/wamp/