Svn+apache Building a version control server

Source: Internet
Author: User

Lab Environment:

Service Side: Centos 7 ip:192.168.56.133

Client: window7

Service Overview:

SVN (subversion) is a version management tool and a successor to Cvs. currently, Most open source software uses SVN as the code version management Software. The common version management software is cvs, SVN, and Git.

SVN run mode:

Mode one: The SVN server is running separately for listening: 3690 Port Access: svn://ip

Mode ii: SVN service +apache monitoring: 80 Port Access: Http://IP the experiment to achieve


first, install svn, Apache software and intermediate components

[email protected] ~]# yum-y Install subversion httpd MOD_DAV_SVN

MOD_DAV_SVN module: Apache HTTP Server plug-in, You can let the repository through the HTTP protocol, on the Site.

To see if the installation was successful

[[email protected] ~]# svn--version


Ii. creating a repository directory and a project warehouse directory

[[email protected] ~]# mkdir/var/www/repos//create Repository Directory

[[email protected] ~]# svnadmin create/var/www/repos/test//project Warehouse Directory

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "spacer.gif"/>

#注: User Rights Configuration We use apache, here for the time being without Svn's own

To start the SVN service:

[email protected] ~]# svnserve-d-r/var/www/repos/

-d means running in daemon (background Run)

-R/VAR/WWW/REPOS specifies that the SVN root directory Is/var/www/repos

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "spacer.gif"/>

third, Configure Apache Service

(1) View Apache support Subversion Two dynamic libraries have been installed successfully

[email protected] ~]# vi/etc/httpd/conf.modules.d/10-subversion.conf

#看到下面配置文件中两个模块相关信息 to indicate that the installation was Successful.

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "spacer.gif"/>650 "this.width=650;" src= "http ://s4.51cto.com/wyfs02/m01/8b/9f/wkiol1htvptwpexbaaaszdli02y266.png-wh_500x0-wm_3-wmp_4-s_1827127941.png "title = "1.png" alt= "wkiol1htvptwpexbaaaszdli02y266.png-wh_50"/>

(2) Configure Apache to access SVN server via MOD_DAV_SVN module

[email protected] ~]# VI/ETC/HTTPD/SUBVERSION.COF

<Location/svn>//apache virtual Directory

DAV SVN

Svnparentpath/var/www/repos//storage of the Project's real directory

AuthType Basic

AuthName "SVN server of test!" Authentication is pop-up welcome message

Authuserfile/var/www/svn/repos/passwd//store User name and password

Authzsvnaccessfile/var/www/repos/svn/authz//store User Rights

Require Valid-user

</Location>

(3) establish local access control file /var/www/svn/passwd the user information in this file is used to authenticate the user and password when accessing SVN through the httpd server.

[email protected] ~]# MKDIR/VAR/WWW/REPOS/SVN

[[email protected] ~]# htpasswd-c/var/www/repos/svn/pass hq//username can be modified as required

To view the user name and password:

* The password is encrypted (password + user Name) MD5

(4) Create user rights file /var/www/svn/authz

[email protected] ~]# Vi/var/www/svn/authz

[/] // This is indicated in the root directory of all warehouses

HQ=RW // indicates that the HQ user has RW permissions to the software repository under all the repository root directories

(5) give directory permissions, set up a firewall

[email protected] ~]# chmod-r 777/var/www/repos/

[email protected] ~]# firewall-cmd--permanent--add-service=http

[email protected] ~]# Firewall-cmd--reload

(6) Start Apache Service

[email protected] ~]# systemctl enable httpd

[email protected] ~]# systemctl Restart httpd

Iv. Access Testing

Access Address: http://192.168.56.133/svn/test


Win7 Client

Http://tortoisesvn.net/about.zh.html

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "spacer.gif"/>

note: The 32-bit software can only be installed on a 32-bit operating System. I am 64 bit, so it is installed on the 64.

Restart the computer after the download installation is complete

Create a folder in your computer right-click on "SVN CHeckout"

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "spacer.gif"/>650 "this.width=650;" src= "http ://s1.51cto.com/wyfs02/m02/8b/9f/wkiol1htvtyznr4caag7uywqdzy521.png-wh_500x0-wm_3-wmp_4-s_475927230.png "title= "2.png" alt= "wkiol1htvtyznr4caag7uywqdzy521.png-wh_50"/>

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "spacer.gif"/>650 "this.width=650;" src= "http ://s4.51cto.com/wyfs02/m00/8b/9f/wkiol1htvx_cuxomaag3fkais64754.png-wh_500x0-wm_3-wmp_4-s_350043537.png "title= "3.png" alt= "wkiol1htvx_cuxomaag3fkais64754.png-wh_50"/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8B/9F/wKioL1hTVdfzi033AAGkaN7Gxms219.png-wh_500x0-wm_3 -wmp_4-s_3228341744.png "style=" float:none; "title=" 4.png "alt=" wkiol1htvdfzi033aagkan7gxms219.png-wh_50 "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8B/A3/wKiom1hTVdfzenxNAAFbSGFy4JU164.png-wh_500x0-wm_3 -wmp_4-s_2401106162.png "style=" float:none; "title=" 5.png "alt=" wkiom1htvdfzenxnaafbsgfy4ju164.png-wh_50 "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8B/9F/wKioL1hTVdijbSUFAAEuh2eOehk981.png-wh_500x0-wm_3 -wmp_4-s_2400729916.png "style=" float:none; "title=" 6.png "alt=" wkiol1htvdijbsufaaeuh2eoehk981.png-wh_50 "/>

If this error pops up

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "spacer.gif"/>650 "this.width=650;" src= "http ://s5.51cto.com/wyfs02/m02/8b/a3/wkiom1htve6rcxzvaaffznviuwc438.png-wh_500x0-wm_3-wmp_4-s_4004925855.png "title = "7.png" alt= "wkiom1htve6rcxzvaaffznviuwc438.png-wh_50"/>

Check Apache for error logs

[email protected] ~]# Vim/var/log/httpd/error_log

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "spacer.gif"/>650 "this.width=650;" src= "http ://s4.51cto.com/wyfs02/m02/8b/9f/wkiol1htviotg8rzaaayk0m3qb0815.png-wh_500x0-wm_3-wmp_4-s_1941680492.png "title = "9.png" alt= "wkiol1htviotg8rzaaayk0m3qb0815.png-wh_50"/>

Solution 1: Turn off Sellinux

Workaround 2:

[email protected] ~]# setsebool-p httpd_unified 1

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "spacer.gif"/>650 "this.width=650;" src= "http ://s3.51cto.com/wyfs02/m00/8b/a3/wkiom1htvjaw0bloaafx1_qacmg184.png-wh_500x0-wm_3-wmp_4-s_2251997258.png "title = "8.png" alt= "wkiom1htvjaw0bloaafx1_qacmg184.png-wh_50"/>


The first time to write a blog, please forgive us!! Thank you!!


This article is from the "dake" blog, make sure to keep this source http://8982757.blog.51cto.com/8972757/1883251

Svn+apache Building a version control server

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.