有哪些方法可以简化 Linux 以及 Windows 上的 php 应用程序的安装?

发布于 2024-08-13 14:53:45 字数 1267 浏览 5 评论 0原文

我有一个 php 应用程序( http://github.com/tchalvak/ninjawars ),本质上是一个 php我在 http://ninjawars.net 运行的基于网页游戏。我经常为自己配置和安装应用程序以进行本地主机开发,这是一个有点反复试验的过程。现在我已经开源了该应用程序,一些用户希望安装它并进行编辑、提交补丁等,我想让他们尽可能简单。

我听说过 Ruby Gems,我认为它是一种 Ruby 应用程序的包管理系统。 php 有类似的有用的东西吗?否则,我应该怎样做才能使安装尽可能简单?

现在我认为安装过程的总体思路可能很简单:

All Deployments
---------------
1. Copy a live database (probably the easiest) or run any outstanding migrations off of a skeleton database.
2. Set permissions in pg_hba for the database, host, and user to match your configuration


Manually from within the /ninjawars/ folder of your working copy
-----------------------
1. ln -s docs/harkSAMPLEhtaccess deploy/www/.htaccess
3. ln -s docs/tchalvakSAMPLEresources.php deploy/resources.php
4. mkdir -p deploy/resources/logs
6. mkdir deploy/templates/compiled
7. chmod 777 deploy/templates/compiled

5. configure a virtualhost in apache (should be optional, this may be able to be handled by the .htaccess, I'm not sure)

所以最重要的是 chmodding、复制数据库和编辑虚拟主机。

在 Linux 上尽可能地简化太棒了,更重要的是在 Windows 上也能简化它(我的许多用户目前居住的那片陌生的土地)。建议?

I have a php application ( http://github.com/tchalvak/ninjawars ), essentially a php-based webgame that I run at http://ninjawars.net . I frequently configure and install the app for myself for localhost development, and it's a somewhat trial-and-error hacked-up process. Now that I've open sourced the app, I've got some users wishing to install it and make edits, submit patches, etc, and I want to make that as simple as I can for them.

I've heard of Ruby Gems, which I take to be a kind of package management system for ruby apps. Is there anything useful like that for php? Otherwise, what should I do to make installing as simple as I can?

Right now I think that a general idea of the install process may be as simple as:

All Deployments
---------------
1. Copy a live database (probably the easiest) or run any outstanding migrations off of a skeleton database.
2. Set permissions in pg_hba for the database, host, and user to match your configuration


Manually from within the /ninjawars/ folder of your working copy
-----------------------
1. ln -s docs/harkSAMPLEhtaccess deploy/www/.htaccess
3. ln -s docs/tchalvakSAMPLEresources.php deploy/resources.php
4. mkdir -p deploy/resources/logs
6. mkdir deploy/templates/compiled
7. chmod 777 deploy/templates/compiled

5. configure a virtualhost in apache (should be optional, this may be able to be handled by the .htaccess, I'm not sure)

So the biggies are chmodding, copying the database, and editing a virtualhost.

Simplifying that as much as I can on linux would be great, even more so simplifying it on windows as well (that unfamiliar land where many of my users currently reside). Suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

那片花海 2024-08-20 14:53:45

对于linux,创建一个install.sh脚本文件并告诉人们chmod +x ./install.sh然后执行或双击它。该文件将提示输入 mysql 用户名和密码,与 mysql -u root -p -D db_name 一起使用。 ./db_install.sql 然后将安装模板 cp(复制)到 /var/www/ 或他们在提示符下输入的路径。

抱歉,不知道 Windows 的情况。

For linux make an install.sh script file and tell people to chmod +x ./install.sh it then execute or double click it. That file would be some prompts for mysql username and password to use with mysql -u root -p -D db_name < ./db_install.sql then cp (copy) the install template into /var/www/ or the path they type in at a prompt.

No idea for windows sorry.

单调的奢华 2024-08-20 14:53:45

对于 Linux,您可以创建 rpm 或类似的

for linux, you can create a rpm or similar

ぃ弥猫深巷。 2024-08-20 14:53:45

对于用户来说,最好的方法是编写自己的安装例程,并将其与应用程序捆绑在一起,类似于 Drupal、Joomla 等。

最快的方法可能是为 linux/osx 编写一个安装 shell 脚本,并为 linux/osx 编写一个批处理脚本。视窗。

The best way for your users would be to write an installation routine of your own and bundle it with the application similarly to Drupal, Joomla, etc.

The quickest way would probably to write an installation shell script for linux/osx and a batch script for windows.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文