Svn–apache Subversion

Source: Internet
Author: User

Svn–apache Subversion

Svn–subversion is a versioning and revision control system used by developers to track and keep up earlier versions of T Heir source codes.

In this article we can see how to setup SVN server on CentOS 6.

Lets Start,

Install SVN server on CentOS 6

Update Yum repositories and packages by typing the below command

[[email protected] ~]# Yum update

Before installing SVN packages, you must install and configure Apache (Webserver).

Install and configure Apache

Step 1» Type the below command to install Apache along with dependencies.

[email protected] ~]# Yum install httpd

Step 2» Open the file/etc/httpd/conf/httpd.conf.
Find "#ServerName Www.example.com:80″ (line no:276).

#

#ServerName www.example.com:80

and add this line below. "ServerName Youripaddress:80″

#

#ServerName www.example.com:80

ServerName 192.168.1.2:80

Step 3» Issue the below command to start Apache service.

[[Email protected] ~]# service httpd start


and type this below command to start the Apache service automatically while booting.

[Email protected] ~]# chkconfig--levels 235 httpd on

Now open your server IP address in the browser. You can see the Apache test page.
If you don't able to see the Apache test page, Disable the firewall (iptables) and SELinux service on your server.
Disable Firewall (Iptables)»

[[Email protected] ~]# service iptables stop

[Email protected] ~]# chkconfig iptables off

Disable Selinux»open the File/etc/selinux/config and find the line

Selinux=enforcing

and replace with

Selinux=disabled

Now reboot the server and try again.

Install and configure SVN server

Step 4» Now start installing SVN packages, Just type the below command.

[email protected] ~]# Yum install subversion MOD_DAV_SVN

Step 5» Now, create new directory for SVN repository.

[Email protected] ~]# MKDIR/SVN

Step 6» Create a new repository in the SVN by issuing the below command

[Email protected] ~]# svnadmin Create/svn/newrep

Step 7» Now issue the below commands one by one for necessary permissions.

[Email protected] ~]# chown-r apache.apache/svn/newrep/

[Email protected] ~]# chcon-h system_u:object_r:httpd_sys_content_t/svn/newrep/

[Email protected] ~]# chcon-r-H apache:object_r:httpd_sys_content_t/svn/newrep/


Step 8» Now create a password file 'newrep.users' with username 'Krizna' by typing below command

[Email protected] ~]# htpasswd-cm/svn/newrep.users Krizna
Step 9» Now open the SVN Apache config file ( /etc/httpd/conf.d/subversion.conf ) and add the below lines at the end of T He file.

1

2

3

4

5

6

7

8

9

10

<location/repos>

DAV SVN

# SVN Path

Svnparentpath/svn

AuthType Basic

AuthName "Authorization Realm"

#password file path

Authuserfile/svn/newrep.users

Require Valid-user

</location>

Step 10» Restart Apache Service

[Email protected] ~]# service httpd restart


Step 11» Now open your SVN path http://yourserverip/repos/newrep in a browser (Ex: http://192.168.1.2/repos/newrep ). You can see newrep revision page after typing username and password created (step 8).
Step 12» Create basic repository structure with the below commands

[[email protected] ~]# mkdir-p/tmp/svn/{trunk,branches,tags}

[[Email protected] ~]# svn import-m ' Initializing basic repository structure '/tmp/svn/http://localhost/repos/newrep/

Svn–apache Subversion

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.