开发者

How to bundle a php application with 1 click run/install

开发者 https://www.devze.com 2023-04-02 15:11 出处:网络
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

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.


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


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.


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 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/

0

精彩评论

暂无评论...
验证码 换一张
取 消