1. create svn user:
sudo adduser svn
no login for user svn:
/bin/bash -> /bin/false (ubuntu), /bin/bash > /bin/nologin (redhat)
2. create a respository dir: Let's chose /var dir
sudo mkdir /var/svn
sudo svnadmin create /var/svn/repos
3. change the ownership of the dir svn to the user svn (and svn group as well): so far we use sudo command to create dir svn, so by default it belongs to the user root. Now we need to transfer the ownship to user svn
sudo chown -R svn.svn svn
4. add an user to svn group: In order for someone to be accessed to the repository he/she must be added to the group svn. Let's say user ubuntu is be added
sudo gpasswd -a ubuntu svn
Note: there many ways to add an user to an existing group; in this tutorial we use command gpasswd. Some may prefer append user to /etc/group.
5. install svn
sudo apt-get update
sudo apt-get install subversion
6. check to see if it works
svn co svn+ssh://username@url.or.ip.address/var/svn/repos
Note: if you haven't not installed ssh server, you need to do so you can access the svn server through svn+ssh protocol. And if you have your ssh server run on non-standard port such as 443, then you need to add this line into ~/.subversion/config
ssh = $SVN_SSH ssh -q -p 443
Thanks a lot..
ReplyDeleteinstall svn on ubuntu 12.04
thank for dropping comment, krizna!... appreciate that!..
ReplyDelete