PHP + MySQL部署

发布于 2024-12-08 08:57:10 字数 394 浏览 0 评论 0原文

我只是想找到一种更简单的方法来部署我正在开发的网站。我正在单独测试生产服务器,现在部署意味着将文件和数据库数据的子集复制到我的计算机上并将其上传到产品站点。我确信有一个简单的同步工具,但到目前为止我还没有找到任何东西。

我真正想要的是一个可以本地运行(在 Windows 上)的应用程序,或者可以安装在我的服务器上的应用程序,以便我进行一键部署。有什么建议吗?

谢谢! 戈德温

编辑
我现在决定使用 GoodSync蟾蜍。感谢您的建议。

I'm just trying to find an easier way to deploy a site I'm working on. I'm working alone with a test a production server and right now deployment means copying a subset of the files and database data onto my computer and uploading it to the prod site. I'm sure there's a simple synchronization tool out there but so far I've had no luck in finding anything.

What I'd really like is an application I can run locally (on windows) or something I could install on my server for let me have a one-click deployment. Any suggestions?

Thanks!
godwin

Edit
I have decided for now to go with GoodSync and Toad. Thanks for the suggestions.

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

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

发布评论

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

评论(7

唠甜嗑 2024-12-15 08:57:10

man scp

SCP(1) BSD 通用命令手册 SCP(1)

名称
scp - 安全复制(远程文件复制程序


scp [-1246BCpqrv] [-c 密码] [-F ssh_config] [-i 身份文件] [-l 限制] [-o ssh_选项] [-P 端口] [-S 程序] [[user@]host1:]file1
[...] [[user@]host2:]file2

描述
scp 在网络上的主机之间复制文件。它使用 ssh(1) 进行数据传输,并使用相同的身份验证并提供相同的功能
安全性如 ssh(1)。与 rcp(1) 不同,如果身份验证需要密码或密码短语,scp 将要求输入密码或密码短语。

 Any file name may contain a host and user specification to indicate that the file is to be copied to/from that host.  Copies between two
 remote hosts are permitted.

 When copying a source file to a target file which already exists, scp will replace the contents of the target file (keeping the inode).

 If the target file does not yet exist, an empty file with the target file name is created, then filled with the source file contents.  No
 attempt is made at "near-atomic" transfer using temporary files.

 The options are as follows:

 -1      Forces scp to use protocol 1.

 -2      Forces scp to use protocol 2.

...

man scp

SCP(1) BSD General Commands Manual SCP(1)

NAME
scp - secure copy (remote file copy program)

SYNOPSIS
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1
[...] [[user@]host2:]file2

DESCRIPTION
scp copies files between hosts on a network. It uses ssh(1) for data transfer, and uses the same authentication and provides the same
security as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if they are needed for authentication.

 Any file name may contain a host and user specification to indicate that the file is to be copied to/from that host.  Copies between two
 remote hosts are permitted.

 When copying a source file to a target file which already exists, scp will replace the contents of the target file (keeping the inode).

 If the target file does not yet exist, an empty file with the target file name is created, then filled with the source file contents.  No
 attempt is made at "near-atomic" transfer using temporary files.

 The options are as follows:

 -1      Forces scp to use protocol 1.

 -2      Forces scp to use protocol 2.

...

感性 2024-12-15 08:57:10

我使用 GoodSync http://www.goodsync.com/ 来处理此类事情。真的很好。在 Windows 上运行,可以在本地文件 (S)FTP、Windows、Linux 网络共享等的任意组合之间同步。

然后创建一个计划任务/cronjob 将数据库导出到同步文件夹中,并在另一端。显然这个过程是一种方式。

I use GoodSync http://www.goodsync.com/ for this sort of thing. It's really good. Runs on windows, can sync between any combination of local files (S)FTP, windows, linux network shares etc.

Then create a scheduled task/cronjob to run an export of the database into the syncronised folder and have one do an import at the other end. Obviously this process is one way.

昨迟人 2024-12-15 08:57:10

http://www.phing.info/docs/guide/stable/

PHing 是为 PHP 制作的自动构建系统。与 GIT、SVN、PHPUnit 等配合使用...

您基本上设置了 XML 文件,为 PHing 提供有关操作的说明。允许您在构建创建的同时运行测试套件、一次构建多个不同的版本、复制文件和数据库以及许多其他很酷的功能。

此外,它是开源且独立于平台的。

http://www.phing.info/docs/guide/stable/

PHing is an automated build system made for PHP. Works with GIT, SVN, PHPUnit, etc...

You basically set up XML files that give PHing instructions on what to do. Allows you to run test suites along with build creation, build multiple varied versions at a time, copy files as well as db, and a bunch of other cool features.

Also, it's open source and platform independent.

蒗幽 2024-12-15 08:57:10

您使用什么进行源代码控制?像 Git 和 SVN 这样的一些工具已经为此类事情提供了现成的方法。请参阅此处获取快速 Git 解决方案。

What are you using for source control? Some tools like Git and SVN have ready-made methods for this sort of thing. See here for a quick Git solution.

九厘米的零° 2024-12-15 08:57:10

我会赞同有关 Git/SVN 的建议,但会通过 GitHub 为 Git 提供强大的插件。使用 GitHub 作为您的“中央”Git 存储库。您的本地 Git 存储库将推送到 GitHub,而您的生产服务器将从 GitHub 拉取。

学习 Git/GitHub 需要一些开销,但实际上,在您所描述的情况下(单个工程师和两台服务器),Git 并不比 SVN(或 CVS 或其他任何东西)更复杂。

I would second the advice about Git/SVN, but would put in a strong plug for Git via GitHub. Use GitHub as your "central" Git repository. Your local Git repository will push to GitHub, and your production server will pull from GitHub.

There is some overhead to learning Git/GitHub, but really, in the situation you've described (a single engineer and two servers), Git isn't any more complicated then SVN (or CVS or anything else).

夜雨飘雪 2024-12-15 08:57:10

我们使用 FTP 同步器,它似乎工作得很好。我暂时不知道有什么好的免费软件。

示例:http://www.ftpsynchronizer.com/

We use an FTP Synchronizer, which seems to work pretty well. I don't know offhand of any good free ones.

Example: http://www.ftpsynchronizer.com/

生死何惧 2024-12-15 08:57:10

取决于您运行的服务器类型,但您可以运行 SVN (Subversion)。如果您使用 Eclipse、Aptana 和 Zend Studio 进行开发,则有一个插件。

本质上,您可以在服务器上拥有一个开发存储库。您可以将代码拉到本地环境中,并在更改后将其提交回来。然后,您可以设置另一个存储库,该存储库是链接回开发存储库的实时数据或生产。

当您想要更新实时数据时,您只需更新它,这样如果发生任何问题,您可以回滚该代码,而不必回滚您的开发代码。一旦你掌握了所有这些,你就可以开始分支并标记你的项目。

我个人同时使用 SVN 和 Git,但我更喜欢 Git,因为它工作得更好。尽管如果您使用的是 Windows,命令行工具与 Linux 并不相同。

Depends on what type of server you are running, but you could run SVN (Subversion). There is a plugin for Eclipse, Aptana, and Zend Studio if you use that to develop.

Essentially you could have a development repository that sits on the server. You would pull your code down to your local environment and commit it back after changes. Then you can setup another repository that is your live data or production thats linked back to your Development repository.

When you want to update the live data, you just update it so if any trouble happens you can roll back that code without having to roll back your development code. Once you get good at all that you can start branching and tagging your projects.

I personally use both SVN and Git, but I prefer Git because it works so much better. Though if you are using Windows, the command line tools just aren't the same as linux.

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