I wanted a seamless procedure to update web sites and web applications without compromising security.我想無縫程序,以更新的網站和網頁應用程式而不損害安全。 The development server is under a firewall and so is the production server.發展服務器是根據防火牆等,是生產服務器。 Also the changes should be merged bi-directionally.也變化,應合併雙向定向。 I had few options like subversion or unison.我有幾個選項一樣,顛覆或一致。 I chose subversion because of greater familiarity and also because all of our source code is maintained in Subversion.我選擇了顛覆罪,因為更熟悉,還因為我們所有的源代碼是保持在顛覆罪。 Here are the simple steps which you too can use to keep your production and development server in sync.這裡是簡單的步驟,其中,你也可以使用讓您的生產和發展的服務器同步。

The requirements are:要求是:
1. 1 。 Subversion should be installed on both the machines顛覆應安裝在機器
2. 2 。 You should be able to allow certain IP addresses in your development server machine您應該能夠允許某些IP地址在您的開發服務器機
3. 3 。 Apache running on development server and configured to allow access to Subversion repository.*阿帕奇上運行的發展,服務器和設定為允許使用Subversion知識庫.*

*My development server runs Apache which is configured to allow access to Subversion repository. *我國發展的服務器運行的Apache是設定為允許使用Subversion知識庫。 This is simple to setup and so I will not dwell upon it.這是一個簡單的安裝程序,所以我不打算賦予它。

The firewall is configured separately for two subnets.防火牆配置分別為兩個子網。 The subnet identified as internet is not allowed to access any internal servers.子網確定為互聯網是不容許訪問任何內部服務器。 However I added the IP address of my production server as a trusted host which essentially punched a hole in the firewall to allow my production server to access my development server.不過,我補充的IP地址,我的生產服務器作為一個值得信賴的東道國,這基本上是打了一個洞,在防火牆,以允許我在生產服務器上訪問我的發展服務器。

With this simple setup all that is required is to checkout the files on the production server.有了這個簡單的安裝所有需要的是結帳的文件生產服務器。 I can make changes to the files from any development machines or even the production machine.我可以更改這些文件從機器的任何發展,甚至生產機器。 After testing the files are committed and then the production server is updated with a single command (svn update).測試後的檔案承諾,然後在生產服務器上更新,與一個單一的命令( svn更新) 。

BTW: If you are unfamiliar with Subversion you may find it easier to understand with my的BTW :如果您不熟悉顛覆您可能會發現更容易理解與我 5 minutes guide to subversion 5分鐘指南顛覆 .

The downside of this approach is that subversion creates tons of files for its own use (in .svn directories) which consumes space and may create problems for web hosting palns with low disk space.壞處這種做法是顛覆創造噸的文件供自己使用的(在。 svn目錄)消費的空間和可能造成的問題,虛擬主機palns低磁盤空間。 For an alternative you can try using Unison.一種替代,您可以嘗試使用步調一致。

Note: The security of the process can be further improved by transferring the data through ssh tunnel only.注:安全的過程中可以進一步改善,由傳輸數據,通過SSH的隧道只。