Results 1 to 8 of 8
Hello.
I am new to System Administration on Linux servers for web development.
I am having problems getting the following setup.
I have one FC9 webserver which has my live ...
- 03-27-2009 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 6
svn and web development server
Hello.
I am new to System Administration on Linux servers for web development.
I am having problems getting the following setup.
I have one FC9 webserver which has my live site and development site(sorta).
Looks like this
dev.mysite.com mysite.com
\ /
repo
|
clients
What I need is the devs to be able to make changes to the repo and then update that to the dev site to see if it works, if so then to be able to update the repos to the live site. But I'm not sure how to accomplish this. When I created the dev.mysite on the server I went into the users public_html folder and did a checkout of the repo to it, so now when I go to dev.mysite.com/project it shows up and I can update it against the repos by doing svn update in the public_html folder. But how do I update my live site from the repos? Need it to all be in sync somehow.
Any pointers in the right direction would be greatly appreciated. Thanks.
- 03-30-2009 #2
Hi there,
I can think of a couple of options available to you.
1) Use a tool like rsync to synchronize your source code from the dev machine to the live machine. This doesn't involve svn at all, and will give you a current copy of the working config.
2) Set up an svn server on the dev box (svnserve I think - it's in documentation) and then use the following from the live box to get the latest from your repository:
Both will work equally well, but option (2) will allow you to update simply byCode:svn co svn://dev.mysite.com/<path within repository to check out>
in the directory on the live server.Code:svn up(date)
3) You could also set up your dev box to share the repository through http with mod_dav_svn under apache if that is what you are using. This requires a bit of setup but is documented reasonably well. This allows for reasonably easy authentication and access control through the usual apache mechanisms as well.
A search online should give you the technical documentation for these options, but let me know if you have any issues.
- 03-30-2009 #3Just Joined!
- Join Date
- Mar 2009
- Posts
- 6
Thanks a bunch for the reply!
I have set my server with two sites.
1. Live site
2. Development site
I imported the live site into the repos then checked it out into both the dev and live site. So now all I have to do to update either is run svn update like you said. So far so good I appreciate your easy to follow steps. I will continue configuring it and hopefully have no more problems.
Next step is Trac...
- 03-30-2009 #4
Glad I could be of assistance. Unfortunately I don't know anything about Trac..
I hope you find someone who can help!
- 03-30-2009 #5Just Joined!
- Join Date
- Mar 2009
- Posts
- 6
SVN seems to be a pain with basic task. I need to have the dev site auto update after the developers commit to the repos or they wont be able to check their work. Only way I'm seeing you can do this without running svn up every five seconds is with a post-commit hook script found here: subversion: Subversion FAQ This might not be too bad except for the fact that its highly confusing to write and setup
. Is there an easier way using cron perhaps?
- 03-30-2009 #6
OK, if the svn repository is on the dev server, then use the mod_dav_svn module and just configure apache to use the repository directly. i.e. as soon as the developer checks content into the system, it is available online on the dev box. Note that you may have to use aliases to play with paths etc, but it may be the most efficient way of going about it.
If the repository is not on the dev box, then you could either set up a cron job as the user that apache is running on (apache) to update the web content, or use the hooks as you mentioned. I haven't used hooks before, so I don't know how it works. I will have a read up and see if I can clear it up for you.
EDIT: Check out the following, it has some references to what you are trying to do.
WebFaction Forum / Svn Hooks
- 04-01-2009 #7Just Joined!
- Join Date
- Mar 2009
- Posts
- 6
I made a bash script and put it in the hooks folder. It runs svn up on the dev server every time someone commits.
- 04-01-2009 #8


Reply With Quote