Subversion hoidla kasutamisest

Allikas: Kuutõrvaja
Redaktsioon seisuga 20. september 2007, kell 01:11 kasutajalt Jj (arutelu | kaastöö)

Subversion ning apache ja dav

Näiteks on masinas suurem hulk kasutajaid kas sooviksid kasutada subversioni samas soovides ligipääsu failidela apache abil mugavalt.


Why Apache 2?

If you're a system administrator, it's very likely that you're already running the Apache web server and have some prior experience with it. At the time of writing, Apache 1.3 is by far the most popular version of Apache. The world has been somewhat slow to upgrade to the Apache 2.X series for various reasons: some people fear change, especially changing something as critical as a web server. Other people depend on plug-in modules that only work against the Apache 1.3 API, and are waiting for a 2.X port. Whatever the reason, many people begin to worry when they first discover that Subversion's Apache module is written specifically for the Apache 2 API.

The proper response to this problem is: don't worry about it. It's easy to run Apache 1.3 and Apache 2 side-by-side; simply install them to separate places, and use Apache 2 as a dedicated Subversion server that runs on a port other than 80. Clients can access the repository by placing the port number into the URL:

$ svn checkout http://host.example.com:7382/repos/project


install freebsd'l

cd /usr/ports/devel/subversion && make WITH_PERL=YES WITH_MOD_DAV_SVN=YES WITHOUT_BDB=YES install clean

httpd.conf vajalikud read

LoadModule dav_module         libexec/apache2/mod_dav.so
LoadModule dav_svn_module     libexec/apache2/mod_dav_svn.so
LoadModule authz_svn_module   libexec/apache2/mod_authz_svn.so


Kasutaja vhost failis peab tööks olema osa

< Location /svn >
DAV svn
SVNParentPath /home/kasutaja/svn
AuthzSVNAccessFile /home/kasutaja/svn.acl.repo
Require valid-user
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /home/kasutaja/svn.acl.www
< /Location >


järgnevad käsud tuleb käivitada kasutajana kes cvs'i kasutama hakkab.

mkdir -p svn
cd svn
htpasswd -c svn.acl.www kasutaja

Saadud parooli lisame faili

svn.acl.www

kasutaja:KC9zQCMSI3dDM

svn.acl.repo

[test:/]
kasutaja = rw
svnadmin create test
find . -type d | xargs -n 1 setfacl -m user:www:rwx
find . -type f | xargs -n 1 setfacl -m user:www:rw-


teevad need kasutajale ~/svn/test 'i svnadmin'ga siis seab apachele permissionid paika topib siis htaccess failid ka ning loob yhe kasutaja:test konto

exploreri add-on http://tortoisesvn.tigris.org/

Kodukataloogi, kus svn looma hakkab cli klienti, kasutame muidugi seda, mida saab kodulehelt, näiteks juurkataloogi cvn kausta ning siis oleks soovitav /svn/bin paht'i ka, et saaks kasutada käske normaalselt.

Näide kuidas kasutada: et luua kettale kaust SVN ja seal siis teha checkout, tirime alla kataloogi test, sinna kataloogi test võib tekitada failid ja seejärel scn add failinimi ning selleks, et uploadiks scn commit -message


http://minginimi.server.ee/svn/test

Lingid

http://trac.edgewall.org/wiki/TracInstall