Build SVN server on virtual machine CentOS

Source: Internet
Author: User
Tags tortoisesvn

In fact, many people on the network have shared the process of using Linux to build SVN server, but the actual operation of their own is still difficult, a lot of errors on the appearance of the confused. I learned 2 days of basic Linux command operations, and then rushed to complete the first task: the establishment of the SVN server. Because the foundation is thin, the problem is more than others pay appearances ability to solve, it is not easy AH


The first step is to install the SVN software.

# Yum Install Subversion:

and create a directory that's designed to install SVN stuff.

#mkdir/svn/

Use SVN's own commands to make a directory under this directory

#svnadmin Create/svn/project

#ls/svn/project/

#conf db format Hooks locks README.txt

There are four folders here, all of which are useful.

l Hooks directory: directory where hook script files are placed

l Locks directory: The directory used to place Subversion db lock files and Db_logs lock files to track the clients accessing the vault

l Format file: is a text file with only an integer in it, indicating the version number of the current vault configuration

l conf directory: Is the configuration file of this warehouse (user access account, permissions, etc.) of the warehouse

And what we're going to do is go deep into the Conf catalogue and renovate all the files in it.

Configuring the SVN service configuration file svnserver.conf file

# vi/svn/project/conf/svnserve.conf [General] #注意这里, be sure to keep!!! #anon-access = None #这里是顶头的, no # #auth-access = Write password-db =/svn/project/conf/passwd authz-db =/svn/projec T/conf/authz realm = Chris Test Repository #这是个提示信息

Then: x save it for a moment.

Add two access users and passwords

# vi/svn/project/conf/passwd into the passwd file [users] #同上, this to keep dripping!!! #chen = 123456 James = 123456 Allen = 123456

We have created three usernames and their corresponding passwords, saved.


# vi /svn/project/conf/authz   [groups]   admin = chen, james      #建立了一个叫admin的组, team members have chen,james#user = allen             #又建立了一个叫user的组, team members have allen#[/]                      #这些人可以访问根目录以下的东西 # @admin  = rw             #admin组员的权限是可读和可写 # @user  = r              # The user member's permissions are readable #* =                      #不是以上两个组的用户, Roll Duzi ~# 

* = This sentence is very important, be sure to add!

Start SVN service

Svnserve-d-r/svn/project/where the default SVN server port is 3690.

Then on the virtual machine first networking, then ifconfig, to see their own IP, my machine is 192.168.157.128. Then return to the terminal, using SVN checkout svn://192.168.157.128/project (note!) This is a direct project, not a/svn/project.)


If the command here is wrong and is written as SVN checkout svn://192.168.157.128, then it will be reported

Svn:no repository found in "svn://192.168.157.128" error, so pay attention to the back of the warehouse path.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/79/88/wKiom1aTzlPjipl6AACJSa1v48A506.png "title=" QQ picture 20160111234604.png "alt=" Wkiom1atzlpjipl6aacjsa1v48a506.png "/> This time, your screen should be such, bold input yes, feedback you take out version 0. As for why version 0, I do not know, and this problem can not be found on Baidu.

At this time, the host side download good tortoisesvn and his Chinese-language package, all the way next installation is complete, and then need to restart the party can be formally used.

TortoiseSVN He is different from the usual software, he does not have a desktop shortcut, and his installation path does not have an executable file such as. exe, he is a shell file, parasitic in other folders to use.

After the restart is complete, click on the file on the right mouse button to find more "svn checkout" and "Tortoise svn" These two things, in the "Tortoise svn", find setting, in the Language bar select "Simplified Chinese", this completes the Chinese.

Then open the TortoiseSVN Repository brower tool, enter "svn://192.168.157.128/project/" in the address bar, you should pop out to enter the user name and password.

However, if the connection timeout is displayed, then the host and virtual machines need to be ping each other, and both sides must be able to ping, my virtual machine is using the default NAT, and no bridging is used. Ping directly, and the host and virtual machine is not in the same network segment. There is no need to telnet here, no use, this idea is wrong, I have tangled up in this idea for a long time. And you don't have to add the port number 3690 to the back.

If the two sides can ping each other, but Tsvn browser can not find the server in the virtual machine, the prompt "actively refused, unable to connect", then decisively put the virtual machine firewall stop off, or the default 3690 port added to the virtual machine firewall.

Command for Stop firewall:/etc/init.d/iptables stop

Firewall joins the 3690 Port command:/sbin/iptables-i input-p TCP--dport 3690-j ACCEPT

Then/etc/init.d/iptables restart to be restarted.

This should be linked to the server side of the virtual machine.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/79/88/wKiom1aT0WPxwjzOAADDoaTCk7Q419.png "title=" QQ picture 20160111235915.png "alt=" Wkiom1at0wpxwjzoaaddoatck7q419.png "/>

In this way, even a thorough installation succeeds.

If you want to close SVN server, you can use the KILL command, as in the following example

# Ps-ef|grep SVN

root        4642   0 16:08?          00:00:00 Svnserve- D-r/svn/project/

Root 4692 3676 0 16:13 pts/2 00:00:00 grep svn

# kill-9 4642


The resources are as follows:

Http://www.cnblogs.com/see7di/archive/2013/08/03/3234048.html

http://my.oschina.net/lionel45/blog/298305

http://blog.csdn.net/a649518776/article/details/39433883

http://blog.csdn.net/wwww1988600/article/details/24182919

This article is from "Life is waiting for Gordo" blog, please make sure to keep this source http://chenx1242.blog.51cto.com/10430133/1733987

Build SVN server on virtual machine CentOS

Related Article

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.