Thursday, June 23, 2011

Notes on Setting up Subversion in Ubuntu

Quick walkthrough on setting up subversion in your own server. I will use WebDAV in order to communicate with Apache and quick setup of Samba in case you want to look at your repository in Windows.

1.) Install subversion
shell> sudo apt-get install subversion

2.) Add a subversion group:
shell> sudo groupadd subversion

3.)  Add your username and www-data to the group subversion:
shell> sudo gpasswd -a username subversion
shell> sudo gpasswd -a www-data subversion

4.) Create your repository. I chose mine to be created in /usr/local
shell> cd /usr/local
shell> mkdir svn/myproject ;: this is the name of my repository
shell> chown -R www-data:subversion svn/myproject
shell> chmod -R g+rws svn/myproject
shell> cd svn
shell> svnadmin create myproject ;: for organizational purposes, svn dir will hold different projects

5.) Import our project. I choose to create a trunk here.
The project here is empty or nonexisting yet. Also, you need to go out outside the /usr/local/svn directory
shell> cd /home/projects
shell> mkdir -p myproject/trunk
shell> svn import myproject file:///usr/local/svn/myproject -m "Initial import"

This will create project "myproject" in /svn/myproject thus creating you a directory structure in svn repo like /svn/myproject/trunk

5b.) If you need to import an existing project with existing files inside it do:
shell> cd /home/superman/www/myproject ;: assume this is my project location
shell> svn import . file:///usr/local/svn/myproject/trunk -m "Initial import of project Superproject"

Notice that I created a trunk directory via import command

6.) Lets install the WebDAV SVN module in apache.
shell> sudo apt-get  libapache2-svn
shell> sudo vim /etc/apache2/mods-available/dav_svn.conf

7.) Add this:
  <Location /svn/myproject>
     DAV svn
     SVNPath /usr/local/svn/myproject
     AuthType Basic
     AuthName "SVN Repo"
     AuthUserFile /etc/subversion/passwd
     <LimitExcept GET PROPFIND OPTIONS REPORT>
        Require valid-user
     </LimitExcept>
  </Location>

8.) Now lets create the passwd file
shell> sudo htpasswd -c /etc/subversion/passwd username ;: -c to create the file
shell> sudo htpasswd /etc/subversion/passwd batman ;: add another user. no -c this time
shell> sudo apache2ctl restart

9.) NOTES: If you happen to have permissions problem like if you are using tortoise and trying to commit but wont let you do it do:
shell> sudo gpassswd -a www-data subversion :; make apache part of the group
shell> cd /usr/local/svn/myproject :; make sure myproject is owned by www-data
shell> sudo chown -R www-data:subversion . :; we did this earlier but just making sure

10.) OPTIONAL. If you have samba installed and want to add /usr/local/svn
shell>sudo vim /etc/samba/smb.conf
Then add this:
[svn]
   path = /usr/local/svn
   writeable = yes
   browseable = yes
   valid users = username
   guest ok = no

11.) Checking out your project
shell> cd /home/superman/projects/www
shell> mkdir myproject
shell> svn checkout file:///usr/local/svn/myproject/trunk myproject

12.) When checking out in Windows using Tortoise SVN use:
http://[ip of svn server]/svn/myproject/trunk 

The above link is the one to use also for viewing your SVN tree structure via a web browser and will only work if you install the WebDAV module in Apache.

14 comments:

Anonymous said...

Polo Ralph Lauren Outlet Michael Kors Outlet Online
Gucci Outlet Lululemon Athletica Louis Vuitton Handbags Outlet
Moncler Outlet The North Face Coats Lebron James Shoes Hermes Birkin Michael Kors Handbags Marc Jacobs Handbags Outlet Ray Ban Sunglasses Michael Kors Outlet Online Louis Vuitton Outlet Online Beats By Dr Dre
Marc Jacobs Handbags Outlet Michael Kors Outlet Online Canada Goose Jackets Sale Nike Free Cheap Oakley Sunglasses Cheap Oakley Sunglasses Michael Kors Outlet Online Michael Kors Outlet Stores Michael Kors Outlet Stores Cheap Oakley Sunglasses Cheap Oakley Sunglasses Marc Jacobs Outlet michael kors outlet Online Oakley Sunglasses Outlet Ray Ban Sunglasses

Check out my weblog; Michael Kors Outlet Online

co wendy said...

Sergei , October 22, 1970 Born in Christian Louboutin Bois Dore Moscow State Ozherelye. Perhaps influenced by Cheap LV Handbags their parents worship warrior army, join the army in cheap jordans 1989, and into the elite airborne military service. 1991, by the influence of the Soviet Union, the uggs on sale Russian christian louboutin army general lack of funds, a large number ugg australia of Air Jordan 11 Gamma Blue soldiers seeking veterans, but under extremely difficult conditions still dedicated, praise superiors, and soon was sent to the famous christian louboutin shoes Ryazan Higher ugg Airborne Command School studies. After graduating in 1994, entered the famous Pskov 76th Guards Airborne discount christian louboutin Division, served as discount nike jordans the reconnaissance platoon, reconnaissance ugg soldes deputy company commander, company commander, battalion airborne regiment scouting director and other duties.From 2000 to Cheap Louis Vuitton Handbags 2004, where the forces have repeatedly ordered war with Chechen militants. Because of their opponents in order to form the squad activity and haunted impermanence, the Russians had to ugg boots mobilize elite troops set up large uggs outlet number of small units, "a Discount Louis Vuitton small wholesale jordan shoes play small" Implementation siege. commanding troops in Chechnya, Christian Louboutin Daffodile Ingushetia and other places over the mountains, to track the militants fled. Discount LV Handbags Although the militants were extremely vigilant, but as long as the task has never had outsmarted.August 8, 2008, Georgia suddenly invade South Ossetia (Russian peacekeepers stationed ugg pas cher there), the Russian military to respond quickly, including including the 76th Guards Airborne Division, more than christian louboutin remise 50% 3,000 people were immediately delivered to the pro-Russian Abkhazia, Georgia cheap nike jordan shoes Army contain two infantry brigades, effectively coordinate the cheap christian louboutin direction of the Russian Bags Louis Vuitton troops in South Ossetia.

oakleyses said...

tory burch outlet, longchamp outlet, burberry, ray ban sunglasses, tiffany and co, nike outlet, replica watches, louis vuitton, ray ban sunglasses, nike air max, jordan shoes, polo ralph lauren outlet, michael kors outlet, tiffany jewelry, michael kors outlet, christian louboutin outlet, burberry outlet online, michael kors outlet, michael kors, oakley sunglasses, longchamp, prada outlet, prada handbags, cheap oakley sunglasses, oakley sunglasses, oakley sunglasses, ugg boots, louboutin shoes, michael kors outlet, ugg boots, polo ralph lauren outlet, louis vuitton outlet, nike free, chanel handbags, louboutin outlet, louis vuitton outlet, oakley sunglasses, ugg boots, replica watches, michael kors outlet, kate spade outlet, uggs on sale, nike air max, louboutin, louis vuitton, louis vuitton

oakleyses said...

air jordan pas cher, ray ban uk, nike roshe, true religion jeans, air force, abercrombie and fitch, north face, new balance pas cher, sac longchamp, longchamp pas cher, mulberry, oakley pas cher, nike free run uk, coach outlet, nike blazer, hermes, michael kors, nike air max, air max, hollister pas cher, true religion jeans, ralph lauren pas cher, vans pas cher, michael kors, coach outlet, true religion jeans, hollister, michael kors, north face, nike air max, nike roshe run, coach purses, burberry, lululemon, michael kors, lacoste pas cher, hogan, tn pas cher, sac guess, replica handbags, louboutin pas cher, vanessa bruno, timberland, kate spade handbags, converse pas cher, ralph lauren uk, nike free

oakleyses said...

nike roshe, new balance, beats by dre, p90x workout, instyler, valentino shoes, nfl jerseys, babyliss, ghd, hollister, s5 cases, lululemon, soccer shoes, jimmy choo shoes, nike air max, mac cosmetics, giuseppe zanotti, abercrombie and fitch, hollister, herve leger, asics running shoes, nike huarache, celine handbags, louboutin, mont blanc, iphone 6s cases, north face outlet, birkin bag, iphone 5s cases, north face outlet, wedding dresses, mcm handbags, oakley, iphone 6 cases, ralph lauren, longchamp, timberland boots, nike trainers, baseball bats, soccer jerseys, iphone 6s plus cases, insanity workout, iphone 6 plus cases, iphone cases, bottega veneta, chi flat iron, reebok shoes, ipad cases, vans shoes, ferragamo shoes

oakleyses said...

moncler, moncler outlet, marc jacobs, moncler, hollister, montre pas cher, vans, ray ban, replica watches, pandora charms, louis vuitton, supra shoes, sac louis vuitton pas cher, pandora jewelry, swarovski, pandora charms, moncler, bottes ugg, barbour, canada goose, ugg,uggs,uggs canada, louis vuitton, doke gabbana outlet, converse, louis vuitton, lancel, louis vuitton, hollister, moncler, pandora jewelry, doudoune canada goose, juicy couture outlet, nike air max, converse outlet, barbour jackets, moncler, ugg,ugg australia,ugg italia, links of london, moncler, gucci, canada goose outlet, canada goose, canada goose outlet, coach outlet, canada goose uk, ugg boots uk, canada goose, juicy couture outlet, ugg pas cher, wedding dresses, canada goose

柯云 said...

2016-07-20keyun
louis vuitton bags
polo ralph lauren
nike uk
coach outlet store online clearances
beats by dre outlet
coach outlet online
louis vuitton outlet online
tods sale
michael kors outlet
cheap air jordans
kd 8
giuseppe zanotti sneakers
cheap jordans
adidas yeezy
burberry handbags
kate spade handbags
michael kors canada outlet
replica rolex watches
michael kors handbags
coach outlet
nike air huarache
nike sb dunks
louis vuitton purses
michael kors outlet
nike store
true religion outlet
coach outlet online
michael kors outlet clearance
christian louboutin wedges
cheap ray ban sunglasses
coach factory outlet
louis vuitton outlet
coach outlet online
louis vuitton handbags
louis vuitton outlet stores
true religion outlet
retro jordans 13
adidas originals store

Soni yadav said...

Aol Technical Support Phone Number
Aol Technical Support Number
Aol Tech Support Number
Aol Tech Support phone Number
Aol Support Phone Number
Aol Tech Support Number
Outlook Technical Support Phone Number
Outlook Technical Support Number
Outlook Tech Support Number
Outlook Tech Support Phone Number
Outlook Support Phone Number
Outlook Tech Support Number

roshini said...


Sage Support Phone Number
Sage 50 Tech Support Phone Number
Sage 50 Support Number
Sage 50 Technical Support Phone Number
Sage 50 Tech Support Number
Sage 50 Technical Support Phone Number
Sage 50 Technical Support Number
Sage 50 Customer Support Phone Number
Sage 50 Customer Service Number

Anjilo Jilo said...

Quicken Support Phone Number
Quicken Support Phone Number
Quicken Support Number
Quicken Tech Support Number
Quicken Tech Support Phone Number
Quicken Technical Support Number
Quicken Technical Support Phone Number
Quicken Technical Support Number
Quicken Tech Support Phone Number
Quicken Tech Support Number

mohan kumar said...

Quickbooks Support Phone Number
Quickbooks Error Support Phone Number
Quickbooks Error Tech Support Number
Quickbooks Error Support Number
Quickbooks Error Technical Support Number
Quickbooks Error Tech Support Phone Number
Quickbooks Error Technical Support Phone Number
Quickbooks Error Help Desk Phone Number
Quickbooks Error Help Desk Number
Quickbooks Error Customer Service Number
Quickbooks Error Customer Service Phone Number
Quickbooks Error Customer Support Number
Quickbooks Error Customer Support Phone Number

Kanika Jaiswal said...

QuickBooks Enterprise Technician
Quickbooks Enterprise Support Phone Number
Quickbooks Enterprise Tech Support Number
Quickbooks Enterprise Support Number
Quickbooks Enterprise Technical Support Number
Quickbooks Enterprise Tech Support Phone Number
Quickbooks Enterprise Technical Support Phone Number
Quickbooks Enterprise Help Desk Phone Number
Quickbooks Enterprise Help Desk Number
Quickbooks Enterprise Customer Service Number
Quickbooks Enterprise Customer Service Phone Number
Quickbooks Enterprise Customer Support Number
Quickbooks Enterprise Customer Support Phone Number

Mohini Roy said...

Quicken Support Number
Quicken Support Phone Number
Quicken Tech Support Number
Quicken Support Number
Quicken Technical Support Number
Quicken Tech Support Phone Number
Quicken Customer Service Number
Quicken Customer Service Phone Number
Quicken Customer Support Number
Quicken Customer Support Phone Number
Quicken Help Desk Phone Number
Quicken Help Desk Number

Mohini Roy said...

Quicken Tech Support Number
Quicken Support Phone Number
Quicken Tech Support Number
Quicken Support Number
Quicken Technical Support Number
Quicken Tech Support Phone Number
Quicken Customer Service Number
Quicken Customer Service Phone Number
Quicken Customer Support Number
Quicken Customer Support Phone Number
Quicken Help Desk Phone Number
Quicken Help Desk Number