1

Could you teach me, how to create svn on the Redhat server, in which several sites, there is need to each of them: /home/webmaster/www/kmp.ru/ /home/webmaster/www/yandexapi/ /home/webmaster/www/fms01.ru/ /home/webmaster/www/klubpodarkov.com/

There is could be only one svn or several? How to get svn connection via http:// or svn://. Where can I adjust this? I have in this do not understand!

PS: Sorry for the possibly stupid question

3 Answers 3

4

There are many ways to do this, but here's a quick example. I'd suggest reading the SVN Book for more information here.

  • Create repos for each site:
    • svnadmin create /var/svn/site1
    • svnadmin create /var/svn/site2
  • configure apache2 to use webDAV and define SVN directory
  • mount repos via webDAV
    • mount -t dav2fs _http://localhost/svn/site1 /mnt/site1
  • add mounted directory to apache2 aliases

This allows you to view the latest SVN version from the alias and to access the SVN with a URL like _http://server/svn/site1 .

Had to put unnecessary underlines due to automatic link generation.-

4
  • SVN usually create in the directory "var"?
    – ajile
    Aug 31, 2010 at 13:33
  • Not necessarily, it depends on the use. Since I used /var/www as my documentroot, I thought i'd put the repos there and chmod g+s that as well for multiple user access. Aug 31, 2010 at 22:48
  • Will the dav2fs method expose svn metafiles to the document root? I believe there may be security concerns there.
    – Kyle Smith
    Jun 10, 2011 at 13:05
  • Well yeah, that's why i've used this only on production boxes on the intranet, and the final user-accessable (or generally internet-accessable) sites don't use SVN at all. Jun 10, 2011 at 19:38
0

i make a svn directory for every user/client i have, then they can make sub folder with different projects

  • /svn/clients/user1/

    • /svn/clients/user1/project1
    • /svn/clients/user1/project2
    • /svn/clients/user1/project3
  • /svn/clients/user2/

    • /svn/clients/user2/project1
    • /svn/clients/user2/project2
    • /svn/clients/user2/project3

To mount the svn repos use apache mod_dav and mod_svn

0

You can have a single repository or multiple - it doesn't really matter from a technical point of view as you can check out part of the repository or all of it depending on your needs.

However, if you work with other people on different sites you probably want one repo per site. One repo per site also works if you want to give each client a disk quota. I create a user folder for each user, and store the repo, staging site, and live site files in the user folder like this:

/home/user
/home/user/svn_repo
/home/user/www/live-site
/home/user/www/staging-site

Check out from repo into local working folder and commit back to repo from there.

Check out/update from the repo into staging-site to show client the changes you have made and test. Once it is all working and agreed, check out/update into live-site. This gets a bit messy if multiple people try to do updates. Best if one person takes this role.

Read Red-Bean book as cited by onik. If you are doing any editing on Windows systems Tortoise-SVN will be invaluable. With Tortoise-SVN you can also connect via ssh+svn: pseudo-protocol. Works very well if you are using signature based ssh logins on your server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .