Install configuration and use SVN under CentOS using Yum

Source: Internet
Author: User
Tags collabnet



Installation Instructions

System Environment: CentOS-6.3
Installation method: Yum Install (source installation is prone to version compatibility issues)
Install software: The system automatically downloads SVN software

Check for installed versions



#Check if a lower version of SVNCode class = "Shell Plain"> [[email protected] /] # Rpm-qa subversionCode class = "Shell comments"> #Uninstall the old version of SVN [[email protected] modules] Code class = "Shell comments"> # yum Remove Subversioninstall svn [[email protected] modules] # Yum install httpd httpd-devel Subversion mod_dav_svn mod_auth_mysqlConfirm that the SVN module is installed [[email protected] /] # Cd / etc / httpd / modules [[ email protected] modules] # ls | grep svnmod_authz_svn.somod_dav_svn.so

Verifying the installation


Verify that the SVN version information is installed
[Email protected] modules]# Svnserve--version
Svnserve, Version 1.6.11 (r934486)
Compiled in June 23 2012,00:44:03

Copyright (C) 2000-2009 CollabNet.
Subversion is an open source software, see the http://subversion.tigris.org/site.
This product contains software developed by CollabNet (http://www.Collab.Net/).

The following repository back-end (FS) modules are available:
* Fs_base: The module can only operate the BDB repository.
* FS_FS: The module works with a text file (FSFS) repository.
Cyrus SASL certification is available.

Code Base Creation

SVN repository is also required after the installation

[[email protected] modules]# mkdir -p /opt/svn/repositories[[email protected] modules]# svnadmin create /opt/svn/repositories
After executing the above command, the repositories library is automatically established, and the View/opt/svn/repositories folder discovery contains Conf, db,format,hooks, locks, README.txt and other files, stating that an SVN repository has been established.

Configuring the code base

Go to the folder created above conf, configure
[Email protected] modules]# cd/opt/svn/repositories/conf

User Password passwd configuration

[[email protected] password]# cd /opt/svn/repositories/conf[[email protected] conf]# vi + passwd
Modify passwd to the following:

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


Permissions Control Authz configuration

[Root @admin conf]# VI + Authz
The goal is to set which users can access which directories, append the following to the Authz file:
#set [/] represents all resources in the root directory
[/]
Zhoulf=rw
Service svnserve.conf Configuration

[Root @admin conf]# VI + svnserve.conf

Append the following content:

[general] # Anonymous access permissions, which can be read, write, none, the default is readanon-access = none # Enable authorized users to have write permission auth-access = write # Password database path password-db = passwd # authz-db = authz # authentication namespace, subversion will be displayed in the authentication prompt, and it is used as the credential cache keyword realm = / opt / svn / repositories

Configuring firewall Ports


[[email protected] conf] # vi / etc / sysconfig / iptables Add the following: -A INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT Restart the firewall after saving [[email protected ] conf] # service iptables restart

Start SVN


svnserve -d -r/opt/svn/repositories

View SVN proces

s

[[email protected] conf]# ps -ef|grep svn|grep -v greproot 12538 1 0 14:40 ? 00:00:00 svnserve -d -r/opt/svn/repositories
Detecting SVN ports


[[email protected] conf]# netstat -ln |grep 3690tcp 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN

Stop restarting SVN

[[email protected] password]# killall svnserve //stop[[email protected] password]# svnserve -d -r /opt/svn/repositories //start

Test

The SVN service is started and the connection is tested using the client.
Client Connection Address: svn://192.168.15.231
Username/password: zhoulf/123456
Tests the creation of folders and other operations.








Also attached:



Installation configuration and use of SVN under CentOS



One, install the necessary packages


$ yum Install Subversion
$ yum Install MOD_DAV_SVN two, basic SVN server configuration

        1, create a new directory to store all SVN files                 # MKDIR/HOME/SVN&N bsp;        2, create a new repository                 # svnadmin create/home/ svn/test         3, initialize the catalog in the repository, import the original code                 if the original The code already has the SVN file, then switch to the original code directory, first delete these SVN related files and folders. Suppose/home/user/code/src holds source code                 # cd /home/user/code/src  & nbsp             # Find/-name "*.SVN" | Xargs rm-rf                # SVN import/home/user/code/src file:///home/svn/test /-M "Init test Code"          4, add user              /hom The e/svn/test/conf/passwd file is added as an entry with the form "Username=password".                 [users]               admin = adminpass                user1 = 123456     & nbsp    5, modify user access policies                /HOME/SVN/TEST/CONF/AUTHZ record user access policies:                         [groups]        &N Bsp                                 &NBSP ;     [test:/]                        admin = rw                        user1 = r                        * =                                                [test:/modue]      &NBSP                 admin = rw                        user1 = rw                        * =                above means that admin has all read and write permissions, User1 is readable and writable under Modue folder, read-only in the root directory. You can also configure permissions for a group.          6, modify the/home/svn/test/conf/svnserve.conf file to allow user and policy configuration to take effect .                svnserve.conf content as follows:                        [general]                        anon-access = NONE&NB Sp                       auth-access = write      &NBSP ;                 PASSWORD-DB = passwd            &NBS P          AUTHZ-DB = authz         7, start server                 # svnserve-d-r/home/svn         8, test server                 # SVN co svn://192.168.1.5/test                Press the prompt to enter the user password, then enter the SVN username, password, you can.                 # CD test                # Vim main.c                # SVN add main.c         &NBSP ;       # SVN commit main.c-m "comment"                 Adding         main.c                transmitting file data .                Committed revision 2.   (successful test submission)   Third, configure the SVN server HTTP support (you can see the code in the browser)

For detailed configuration please refer to http://www.blogjava.net/jasmine214--love/archive/2010/09/26/332989.html 1, modify httpd.conf, add content about SVN server         Modify the/etc/httpd/conf/httpd.conf. 2, restart HTTPD Server # service httpd Restart 3, Access Http://192.168.1.5/test with the browser Four. Problems that may occur

1. If the external network does not have normal access, it may also need to be a port mapping, the external network open 3690 ports. To check if the port is open, you can use the command: Telnet xxx.xxx.xxx.xxx 3690 2. When checkout is under Windows, an error similar to the following appears:


The reason is that there are files with the same name but different capitalization under Linux. One solution is to avoid this situation as much as possible and change it to a different name.




Other:

Linux under Installation configuration SVN service
Install and configure the SVN repository under CentOS6.0 using the Yum command


Transferred from: http://my.oschina.net/junn/blog/164041


Install configuration and use SVN under CentOS using Yum


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.