The simplest configuration of SVN (subversion)

Source: Internet
Author: User

The simplest configuration of SVN (subversion)

For centos

By the fairy

System:

  • Centos 1, 5.0
  • Subversion1.4.2

References :·
Subversion:Http://subversion.tigris.org/
·
Version Control with subversion:Http://svnbook.red-bean.com/
Installation Package and dependency package:

  • Subversion: rpm subversion-1.1.4-2.ent.
  • Apache module: rpm mod_dav_svn-1.1.4-2.ent.

1) installation: You can use rpm-Qa | grep package (package name) to check whether the following packages are available.
Use Yum install
Install package (package name ).
This is simple.
[Root @ Lucifer ~] # Yum install mod_dav_svn subversiondependencies resolved ============================ ========================================================== === package
Arch
Version
Repository
Size = ================================================================ installing: mod_dav_svn
I386
1.1.4-2.ent
Base
50 K Subversion
I386
1.1.4-2.ent
Base
1.6 minstalling for dependencies: Apr
I386
0.9.4-24.5.c4.1
Base
88 K Apr-util
I386
0.9.4-21
Base
51 K guile
I386
. 6.4-14
Base
746 K httpd
I386
2.0.52-22. Ent. centos4
Base

887 K httpd-suexec
I386
2.0.52-22. Ent. centos4
Base
28 K neon
I386
0.24.7-4
Base
86 K Perl-Uri
Noarch
1.30-4
Base
79 K swig

I386
1.3.21-6
Base
1.0 m umb-Scheme
I386
3.2-35
Base
967 K transaction summary ========================================== ========================================================== = install
11 package (s) Update
0 package (s) Remove
0 package (s) Total download size: 5.5 MIS this OK [Y/n]:

2) configuration: a) Apache: No configuration is required here. The default setting is as follows:
[Root @ Lucifer ~] Vim/etc/httpd/CONF/httpd. conf Service httpd start [root @ Lucifer ~] Chkconfig httpd on
Http: // ip
Address.Http: // Domain Name
Yes.
B) SVN configuration in Apache: [root @ Lucifer ~] CD/etc/httpd/CONF. d/[root @ Lucifer ~] Vim subversion. conf # Make Sure You uncomment the following if they are commented outloadmodule dav_svn_module
Modules/mod_dav_svn.soloadmodule authz_svn_module
Modules/mod_authz_svn.so # Add the following to allow a basic authentication and point Apache to where the actual # repository resides. <location/repos>
Dav SVN
Svnpath/var/www/SVN/Repos
Authtype basic
Authname "Subversion repos"
Authuserfile/etc/SVN-auth-Conf
Require valid-user </location>
You can directly change it to the same one.
Http: // ip/Repos
In this way, you can see.
The following is a user creation: the first and second commands are different because the first command creates a new file. Do not run the two commands. If you enter the first command for the last time, sorry, try again. In this case, there is only one user name in your file, that is, the one you lost for the last time, ha ~~~. The password here uses MD5.
[Root @ Lucifer ~] Htpasswd-CM/etc/SVN-auth-conf yourusernamenew password: Re-type new password: Adding password for user yourusername [root @ Lucifer ~] Htpasswd-M/etc/SVN-auth-conf anotherusernamenew password: Re-type new password: Adding password for user anotherusername [root @ Lucifer ~] Service httpd restart
C) Directory Configuration:
[Root @ Lucifer ~] CD/var/www/-- or wherever you placed your path above [root @ Lucifer ~] Mkdir SVN [root @ Lucifer ~] Cd svn [root @ Lucifer ~] Svnadmin create Repos [root @ Lucifer ~] Chown-r Apache. Apache Repos [root @ Lucifer ~] Service httpd restart
In this way, the main directory library is created.
3) Use SVN: a) Structure: it is best to use the following structure when creating a new project.
. | -- Project1 |
| -- Branches |
| -- Tags |
'-- Trunk' -- project2
| -- Branches
| -- Tags
'-- Trunk


[Root @ Lucifer ~] CD/tmp [root @ Lucifer ~] Mkdir mytestproj [root @ Lucifer ~] CD mytestproj [root @ Lucifer ~] Mkdir branches tags trunk [root @ Lucifer ~] Vim branches/test. cfg -- add whatever you want to these files.

B) Import: [root @ Lucifer ~] SVN import/tmp/mytestproj/file: // var/www/SVN/repos/mytestproj-M "Initial repository layout for mytestproj" adding
/Tmp/mytestproj/branchesadding
/Tmp/mytestproj/branches/test. mongoadding
/Tmp/mytestproj/tagsadding
/Tmp/mytestproj/trunk
C) Checking out:Http: // yourmachine/Repos. You can download the file from the directory.
[Me @ mylappy ~] CD/tmp [me @ mylappy ~] SVN Co http: // ip/repos/mytestprojauthentication realm: Yoursvnserver: 80> subversion repospassword for 'youruser':
Mytestproj/branchesa
Mytestproj/branches/test. cfga
Mytestproj/TAGSA
Mytestproj/trunk checked out Revision 1.
D) edit and commit: Upload the file after modification. The version number has changed.
[Me @ mylappy ~] CD mytestproj [me @ mylappy ~] Vim branches/test. cfg -- add or delete something and save. [me @ mylappy ~] SVN commit-M "added a line to test. cfg." sending
Branches/test. Fig file data. Committed revision 2.

E) adding/deleting items: when adding or deleting.
[Me @ mylappy ~] SVN Co http: // yoursvnserver/repos/mytestproja
Mytestproj/branchesa
Mytestproj/branches/test. cfga
Mytestproj/TAGSA
Mytestproj/trunkchecked out Revision 2. [me @ mylappy ~] CD mytestproj [me @ mylappy ~] CP/etc/yum. Repos. d/CentOS-Base.repo branches/[me @ mylappy ~] SVN add branches/CentOS-Base.repoA
Deployments/CentOS-Base.repo [me @ mylappy ~] SVN commit-M "added the centos Yum repo file." adding
Deployments/CentOS-Base.repoTransmitting file data. Committed revision 3.

F) reverting back: When the backup is restored.
[Me @ mylappy ~] SVN log http: // ip/repo -- for the entire repository [me @ mylappy ~] SVN log http: // ip/repo/mytestproj -- for the specific project
You can view the current version list. All of these changes.
[Me @ mylappy ~] SVN co-R 1 http: // ip/repo/mytestprojSubversion.rar(8.66 KB)

Downloads: 1112007-8-27

In this case, we select the previous version with version 1.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.