I wanted a seamless procedure to update web sites and web applications without compromising security. Volevo una semplice procedura per aggiornare i siti web e applicazioni web, senza compromettere la sicurezza. The development server is under a firewall and so is the production server. Il server di sviluppo è sotto un firewall e così è il server di produzione. Also the changes should be merged bi-directionally. Anche le modifiche devono essere fuse bi-directionally. I had few options like subversion or unison. Ho avuto alcune opzioni come la sovversione o unison. I chose subversion because of greater familiarity and also because all of our source code is maintained in Subversion. Ho scelto la sovversione a causa di una maggiore familiarità e anche perché tutti i nostri codice sorgente è mantenuto in sovversione. Here are the simple steps which you too can use to keep your production and development server in sync. Ecco i semplici passi che si possono utilizzare anche per mantenere la produzione e lo sviluppo del server in sincronia.

The requirements are: I requisiti sono:
1. Subversion should be installed on both the machines Sovversione dovrebbe essere installato su entrambe le macchine
2. You should be able to allow certain IP addresses in your development server machine Si dovrebbe essere in grado di consentire alcuni indirizzi IP nella vostra macchina server di sviluppo
3. Apache running on development server and configured to allow access to Subversion repository.* Apache in esecuzione sul server di sviluppo e configurato in modo da consentire l'accesso al deposito Subversion .*

*My development server runs Apache which is configured to allow access to Subversion repository. * Il mio server di sviluppo di Apache gira che è configurato in modo da consentire l'accesso al deposito Subversion. This is simple to setup and so I will not dwell upon it. Questo è di facile installazione e così non mi soffermerò su di esso.

The firewall is configured separately for two subnets. Il firewall è configurato separatamente per due sottoreti. The subnet identified as internet is not allowed to access any internal servers. La subnet identificato come internet non è consentito di accedere a qualsiasi server interni. 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. Tuttavia ho aggiunto l'indirizzo IP del mio server di produzione come un host sicuro che, in sostanza, un pugno un buco nel firewall per consentire il mio server di produzione a di accedere al mio server di sviluppo.

With this simple setup all that is required is to checkout the files on the production server. Con questo semplice installazione tutto ciò che è richiesto è di checkout il file sul server di produzione. I can make changes to the files from any development machines or even the production machine. Sono in grado di apportare modifiche ai file da qualsiasi sviluppo macchine o addirittura la macchina di produzione. After testing the files are committed and then the production server is updated with a single command (svn update). Dopo il test i file sono impegnati e quindi la produzione di server è aggiornato con un singolo comando (svn aggiornamento).

BTW: If you are unfamiliar with Subversion you may find it easier to understand with my BTW: Se non hai mai sovversione può risultarle più facile da capire con i miei 5 minutes guide to subversion 5 minuti guida per sovversione .

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. L'aspetto negativo di questo approccio è che la sovversione crea tonnellate di file per uso proprio (in formato. Svn directory) che consuma spazio e può creare problemi per il web hosting a basso palns spazio su disco. For an alternative you can try using Unison. Di un'alternativa è possibile provare a utilizzare Unison.

Note: The security of the process can be further improved by transferring the data through ssh tunnel only. Nota: La sicurezza del processo può essere ulteriormente migliorata con il trasferimento di dati attraverso il tunnel SSH solo.