Linux (Centos) installation configuration SVN server

Source: Internet
Author: User
Tags svn

Tag: RPM GREP-V indicates. So project content port net root configuration

1. Install the SVN server:

Check whether you have installed

# Rpm-qa Subversion

Installing the SVN server

# yum Install httpd httpd-devel Subversion mod_dav_svn mod_auth_mysql

Verifying the installation

# cd/etc/httpd/modules# LS | grep svnmod_authz_svn.somod_dav_svn.so

View version

# Svnserve--version

2. Code Base creation:

Set up SVN library after installation is complete

# mkdir-p/opt/svn/repositories# svnadmin create/opt/svn/repositories

After execution, the repositories library is automatically established, and the/opt/svn/repositories folder contains files such as Conf,db,format,hooks,locks,readme.txt, indicating that an SVN repository has been established.

3. Configure the Repository:

Go to the above Conf folder and configure:

A. User Password passwd configuration:

# VI + passwd  //+ means the cursor is placed at the lowest end of the file

Modify passwd to read:

[users]# Harry = harryssecret# sally = sallyssecretzhoulf=123456

B. Permission Control Authz Configuration:

# VI + Authz

Set which users can access which directories, append the following to the Authz file:

[/]ZHOULF=RW  //permissions for the user to access all libraries
Or
[Repositories:/project] Root permissions for the repository library
Zhoulf=rw

/indicates the root directory and the root directory is specified when Svnserve is started, and we specify that/opt/svn;/means having permissions on all repository

repositories:/to set permissions on the root directory of the library repositories

Ps:

* The user name that appears in the permissions profile must already be defined in the user profile.

* Changes to the permissions profile take effect immediately and do not have to restart SVN.

C. Service Svnserve.con configuration:

# VI + svnserve.conf

Add a little bit of content:

[General] #匿名访问的权限, can be read,write,none, the default is readanon-access=none# enables authorized users to have write permissions auth-access=write# the path of the password database password-db= passwd# access Control File authz-db=authz# authentication namespace, Subversion is displayed in the authentication prompt and is the keyword for the credential cache Realm=/opt/svn/repositories

Note here that the labels can not be wrong, and can not be duplicated, or can not be connected.

D. Configure firewall ports (if required):

Not everyone needs to set up, you can test and then see if you need to open the port

# Vi/etc/sysconfig/iptables

Add a little bit of content:

-A input-m state--state new-m tcp-p TCP--dport 3690-j ACCEPT

Restart firewall after saving

# Service Iptables Restart

4. View:

A. Start SVN

# svnserve-d-r/opt/svn/repositories

B. View the SVN process

# ps-ef|grep svn|grep-v greproot 12538 1 0 14:40? 00:00:00 svnserve-d-r/opt/svn/repositories

C. Detecting SVN ports

# netstat-ln |grep 3690tcp 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN

5. Stop restarting SVN:

# Killall Svnserve//Stop # svnserve-d-r/opt/svn/repositories//Start up

6. Test the connection:

To test with TORTOISESVN:

1. After the SVN service starts, you need to test the connection using the client:

Client connection address: svn://192.168.15.231; Then, enter the user name password;

2. Create a new folder, that is, the local library folder, right-checkout, you will get a hidden folder. svn;

3. Put the contents of the project in this folder, then right click on Commit, you can upload the local project.

Linux (Centos) installation configuration SVN server

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.