Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
Programming

Journal tomhudson's Journal: Quicky: Seven Step Svn (subversion) Setup 6

HOWTO: Getting subversion (svn) to run under SUSE linux in 5 minutes (3 minutes or less with practice and a fast machine :-)

You can apply these instructions to redhat/slackware distros by substituting /var/svn in place of /srv/svn. You can even set it up in your home directory: /home/username/whatever/svn

1. create a group svn, and a user svn (do NOT create a home directory for svn)
                (use YaST/Security and Users/Group Management if you don't like the useradd command)

2. create a directory for your repository:
                example: mkdir /srv/svn

3 edit /etc/sysconfig/svnserv so that it points to /srv/svn
                example: SVNSERVE_OPTIONS="-d -R -r /srv/svn"

4. edit your run scripts so that svnserve is started each time.
                (use YaST/System/System Services (Runlevel if you don't like chkconfig)

5. for your new project, create a repository
                example: svnadmin create /srv/svn/project_name

6. for your new project, fix the projects' svnserv.conf and passwd files
                edit /srv/svn/project_name/conf/svnserv.conf
                                change:
                                                #password-db = passwd
                                to:
                                                password-db = passwd

                                (in other words, just uncomment the line)

                                save your changes.

                edit /srv/svn/project_name/conf/passwd
                                change:
                                                #[users]
                                to:
                                                [users]

                                (in other words, again, just uncomment the line)

                                now add users and paswords in the format "user_name = password"

                                examples:
                                                user = pw
                                                neal = cowboyneal
                                                mary = hadalittlelamb

                                save your changes.

7. now import some files
                change to the top directory you want to import
                su svn (and enter pw when prompted)

                svn import file:///srv/svn/project_name

                you'll be prompted to add/edit a message to go along with this import
                either change the message or accept the default message
                - or you can use the -m option to speciafy a message from the commandline

                your files should now be committed is revision 1

You're done!

To list your files:
                svn ls svn://your_ip_address/project_name
                (notice that you OMIT the "/srv/svn/" portion of the url.

For other commands, just do either "svnadmin help" or "svn help"

You can start, stop, and display the current status of your svn server by typing /etc/rc.d/svnserve {start|stop|status|try-restart|restart|force-reload}

enjoy :-)
This discussion has been archived. No new comments can be posted.

Quicky: Seven Step Svn (subversion) Setup

Comments Filter:
  • HOWTO: Getting subversion (svn) to run under SUSE linux in 5 minutes

    Here's my version:

    Step 1: Think "I know, I'll install subversion"
    Step 2: Pause...
    Step 3: Think "Hang on, why would I want to do that? I'll install a real version control system instead"
    Step 4: yum install <something_else>
    Step 5: Profit :-)

    The end. Seriously, though, I can't understand anyone choosing to use Subversion now. It seems to me its sole virtue is that it fixes a few of CVS's problems (atomic commits, renames, e

    • I can think of a few reasons to use subversion ...

      1. ... its what you're already using at your place of work ...
      2. ... its "good enough" ...
      3. ... it comes with pretty much every linux distro dvd ...
      4. ... as you saw from my howto, its quick and easy to set up ...
      5. ... backing it up is as easy as just making a tarball of the /svn directory tree ...
      6. ... there are a few graphical front ends for people who need to go clicky ...
      7. ... you can use it with apache for people who can't get a handle on using the svn command-
      • by Tet ( 2721 )
        as you saw from my howto, its quick and easy to set up

        Perhaps I've just been spoiled, but your "easy setup" looked rather complicated, at least compared to just doing, say, "hg init" or "darcs init". Incidentally, the only one of your points listed that doesn't apply to most of the alternatives is #1 -- it's what you're using at your place of work (for most people, at least -- my work uses darcs :-)

        • It wouldn't be too hard to put the first 4 steps into a shell script to set up svn in general, but then this way people miss a bit of the details that they need to know if they want to modify something. It's only the last 3 steps that are done on a per-project basis.

          If, after using svn for a while, people want to switch to something else, at least they have a basis for comparison, having used svn. I'm not saying svn is the be-all and end-all. For example, you can run svk on top of svn if that's what float

      • by Dogers ( 446369 )

        ... there are a few graphical front ends for people who need to go clicky ...

        If you're on Windows, http://tortoisesvn.tigris.org/ [tigris.org] is simply awesome! :)

        (Pix: http://tortoisesvn.tigris.org/ExplorerIntegration. html#contextmenus [tigris.org])


  • RCS is all you need! :-)

    (from a crochety old-timer still using CVS [and RCS on system config files])

With all the fancy scientists in the world, why can't they just once build a nuclear balm?

Working...