In order to build an XP environment, I will start with Control Version System. I choose Subversion CVS because have sufficient maturity, good integration with Eclipse via Subclipse, and I have experience using it at my job.
Following the principle “don’t repeat your self” and others good works, we have many articles in google installing SVN on Debian, like this great post by pasyonic. But I will do my own personal cheatsheet.
Installing tools:
apt-get install subversion libapache2-svn |
Creating a folder for your repos:
mkdir /var/repos |
Permissions:
chown -R www-data:www-data /var/repos |
Configuring WebDav-SVN for Apache /etc/apache2/mods-available/dav_svn.conf:
<location> DAV svn SVNParentPath /var/repos AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user </location> |
We must insert user/passwd(md5 encrypted) for each user you want to have RW access to all your repos:
htpasswd -cmb /etc/apache2/dav_svn.passwd juanan |
Restart Apache to reload the changes.
We can create a repo with:
svnadmin create /var/repos/myproject |
Important¡¡ reload permisions for apache user:
chown -R www-data:www-data /var/repos/myproject mkdir /var/repos/myproject/branches mkdir /var/repos/myproject/tags mkdir /var/repos/myproject/trunk |
I recommend to use the classic tree branches/tags/trunk for your repos. Every software take your releases from this folder tree, and it is a good convention for developments.
Then you can access to your repo from the URL http://www.yourdomain.com/repos/myproject. You can checkout, commit,… with juanan user.
If you want administering the users for each project, what permissions have, you must add this line to /etc/apache2/mods-available/dav_svn.conf:
AuthzSVNAccessFile /etc/apache2/dav_svn.authz |
Creating that file with contents like these:
[myproject:/] @admin = rw [groups] admin = juanan |
Tortoise is great SVN client for Windows, it integrates perfectly with file explorer.
Subclipse a great option for Eclipse IDE.
The Subversion Book, if you want to learn all about SVN.
Congratulations!! Nice stuff, easy to understand and concise. Do you have any suggestions on tagging and branching strategies??? I’m looking for them…
Hi Fernando,
the most useful is to use trunk directory for the principal development line, branches for big partial developments, after we merge with the trunk. And tags to mark the operative releases.
I’ve found info about it in chapter 4 of SVN Book: http://svnbook.red-bean.com/nightly/en/svn.branchmerge.html
Thanks for the comment, great coming from you; a great Java teacher.