Install and configure SVN in Ubuntu14.0.4

Source: Internet
Author: User

Install and configure SVN in Ubuntu14.0.4
Install and configure SVN in Ubuntu14.0.4

SVN (subversion) is a version management tool that has emerged in recent years. Most open-source software uses svn as the code version management software. It is most suitable for users who write code to use the version control management tool svn.

However, the following describes how to install and configure SVN under Ubuntu 14.0.4!

This article is the most complete and simple SVN installation and configuration method!

The following documents are divided into four parts:

1. Install SVN on Ubuntu 14.0.4

2. Configure SVN

3. Start and close svnservice

4. Brief use of SVN

1. Install SVN in Ubuntu14.0.4

1. First, you need to prepare software tools. It is very convenient to install software in Ubuntu.

<pre name="code" class="python">$sudo apt-get install subversion

OK installation is complete

2. Create a repository folder

<pre name="code" class="cpp">cd /home sudo mkdir svn /usr/local/svn# sudo chown -R 777 svn /usr/local/svn# sudo chmod -R 777 svn 

The last command grants the group members the corresponding permissions on all files added to the file warehouse. Under normal circumstances, the corresponding group permissions should be added, but since it is for the new method white paper, it is only simple, so it is omitted.

3. Create a repository

$ sudo svnadmin create /home/svn
Ii. Configure SVN

1. Configure the svnserve. conf file in the/home/svn/conf directory.

Modify the svnserve. conf file

A. Remove # Before [general]

[general] 

B. # anonymous access permission, which can be read/write/none. The default value is read.

anon-access = none 

C. # authenticate the user's permissions and enable read/write/none. The default value is write.

auth-access = write 

D. # Password Database path. Remove the preceding #

passw-db = passwd 

Note: anon-access and auth-access are anonymous and permitted users respectively. By default, anonymous users are granted read-only permissions. However, if you want to deny access from anonymous users, you only need to change read to none to achieve the goal.

2. Modify the passwd file in the/home/svn/conf directory.

If modified

<pre name="code" class="cpp">[users]root    =    123hfkj    =    12345678test1   =    test1test2   =    test2

Note: Four users are set here: root, hfkj, test1, test2, And the passwords are 123,12345678, test1, and test2, respectively.

3. modify the configuration file authz in the/home/svn/conf/directory as follows:

</Pre> </blockquote> <blockquote style = "margin: 0px 0px 0px 40px; border: none; padding: 0px;"> <p> <span style = "color: red; background-color: yellow; "> Note: </span> <span style =" color: red; "> four users root, hfkj, test1 </span>, test2, respectively... </P> <span style = "color: red;"> root and hfkj </span> data admin groups have read and write permissions; the test1 and test2 data test groups only have the read permission. </P> </blockquote> 

Description:

-D: indicates that svnserve runs in "daemon" process mode.

-R: Specifies the root location of the file system (the root directory of the version Library), so that the client can access the version library, such as svn: // 192.168.12.118/svn, without entering the full path.

2. Import the svn Project

#sudo  svn import -m "New import"  /home/test  svn://localhost/svn

In this way, the project under the/home/test folder is imported to svn, and the-m parameter indicates that the message is what we will see when viewing the svn log in the future.

3. Then, let's test it.

$ sudo mkdir  /home/svn_down$ sudo cd    /home/svn_down$ sudo svn  co  svn://localhost/svn

4. Check whether the SVN files have been downloaded?

5. OK. This is all the above processes! It is actually very simple!

Note: Check whether the svnserve service is started.

$ Sduo ps-ef | grep svn

Close service

$ Kill-9 pid: pid of svnserve

Or $ sudo killall svn.

Run the $ sduo ps-ef | grep svn command to check whether svnserve has been disabled!

Summary:

This article summarizes the experience of installing and configuring SVN under numerous Ubuntu instances on the Internet after personal testing and verification by small editors. The system is helpful to friends who are still confused, enjoy yourself as soon as possible.

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.