Learn how to setup file synchronization to automate deploying updates to your website. This project uses several programs that are all open source and free to use. It also uses a mix of Windows and Linux (Ubuntu). It requires having SSH access to your webserver.
- Visual SVN server (windows): Create your own subversion repositories on your local machine or test server.
- Project Locker: Offers 300mb free for up to 3 projects.
- SourceForge.net: Free for open source projects
- Tortoise SVN (windows): Check out and commit files and folders directly from windows explorer.
- Subclipse: Integrated SVN control with Eclipse.
- Eclipse PDT: PHP development variant of Eclipse. Good for large projects.
- Notepad++ (windows). Good for editing a few files at a time.
- Emacs (linux, cygwin). Good for quick edits.
- Ubuntu: Easy to use linux distribution based on Debian
- Cygwin: Linux environment that runs on windows.
rsync: (Ubuntu: apt-get install rsync) (Cygwin: in setup.exe it is located under Net)
- *rsync needs to be installed on the remote machine, in my case it is not
OpenSSH: (Ubuntu: agt-get install ssh) (Cygwin: in setup.exe it is located under Net)
- *OpenSSH is nice to access the remote server, but it is not needed for this project.
- unison: Can synchronize files mounted to the local file system with SSHFS
- SSHFS: Mounts an SSH directory to your local file system for synchronization with unison. (not available in Cygwin)
(work in progress)
Step 1: Install Editor
Step 2: Install SVN
Step 3: Setup SSH on your webserver
Step 4: Setup unison
Step 5: Automate with scripts
mount ssh script:
sshfs email@example.com:/directory/ /home/mike/ssh
unison to synchronize:
svn export $svnPath $localPath –force -q
unison $localPath $remotePath -prefer $localPath -batch -maxthreads 2
fusermount -u /home/mike/ssh
(work in progress)