Version control & synchronization (live & dev) for PHP website?
Recently I have created a PHP/MYSQL based website, site is going to be live in next few weeks, my mentor asked me to setup a dev site and a live site, make changes & testing for new features on dev and then upload them to live.
I can do that but that seems a hard process because I'll make changes here and will upload them manually to live server. There are chances that I'll miss some files or dependencies, while uploading.
I thought to have a SVN kind of facility which will manage the dev and live server synchronization. In case I'll miss any files it will highlight me that this file is not yet synchronized on live开发者_StackOverflow社区 etc. Also it will maintain the versions of my live and dev site on daily basis, in case anything goes wrong, we can get the earlier versions.
I am not fully aware with what is SVN, how to setup it and how to use it. Could you guys, please guide me how to setup it and how to use it. Which SVN software will be good.
My Server configs are: its a LAMP facility (Ubuntu) I am using Windows as a local system to make changes (dreamwaver cs5) and upload them to FTP.
Thanks.
I have a similar configuration to manage dev, staging and deploy for many clients. We still use SVN because it's largerly supported natively and it's also integrated on simple developer tools such as CODA (we're also working with GIT but we plan to move the web app deployment on GIT as soon as it will be integrated in that kind of editors).
On the client side (developers side) you can use any SVN visual client like Versions (OSX).
On the server side, we developed a custom php application to take control of each working copy on the server and run new updates SVNDeploy otherwise you can just ssh on the server and run your custom update.
If you will follow the SVN suggested repositoy structure
/tags
/trunk
/branches
You can easly manage your deployment in this way:
- Current release in the
/trunk
folder - Development snapshots under
/branches
(like/branches/2.0-dev
etc.) - Old released versions under
/tags
(like/tags/1.0
,/tags/1.5
etc.)
We used that configuration in the last 3 years with 5 servers and around 25 developers and it worked fine since now.
Some useful links to configure your own subversion server:
http://svn-ref.assembla.com/subversion-server-guide-mac-os.html
http://aymanh.com/subversion-a-quick-tutorial
Take a look at Mercurial.
There are several videos on YouTube that you can watch to get a feeling for what Mercurial is all about. (Start here.)
精彩评论