Install and configure SVN under fedora12

Source: Internet
Author: User
Tags svn update password protection ssl connection

Fedor

A


SVN installation and configuration

Step 1

Install Subversion
Yum install Subversion

Step 2

Install ApacheSVN

Module
Yum install mod_dav_svn

Step 3

Create SVN RepositoryFile


Mkdir/SVN

Step 4

Create a SVN database and modify/SVN user group andUser


Svnadmin create/SVN/repos/
Chown-r Apache. Apache/SVN

Step 5

Edit/SVN/repos/CONF/svnserve. conf
VI/SVN/repos/CONF/svnserve. conf
5-1.
Set
# Anon-access = read
# Auth-access = write
Change
Anon-access = none (if notSet

If the value is none, the "Read access denied for root of Edit" error will occur during SVN connection ")
Auth-access = write
5-2.
Set
# Password-DB = passwd
Change
Password-DB = passwd
5-3.
Set
# Authz-DB = authz
Change
Authz-DB = authz (the configuration file "/SVN/repos/CONF/authz" for SVN access and read/write permissions can be set only after this configuration file is set ")
Important: "SVN:/SVN/repos/CONF/svnserve. conf: 12: Option expected,
The reason is: when the Subversion reads the configuration file svnserve. conf, it cannot identify the configuration with leading spaces, so there cannot be leading spaces.

Step 6

Add User passwords and set Access Permissions
6-1.
VI/SVN/repos/CONF/passwd
For example, [users]
# User = Password
Svnuser = svnuser
Test = test
6-2.
VI/SVN/repos/CONF/authz
Append down text
[/]
Svnuser = RW
[/]
Test = r

Step 7

Synchronize the files submitted each time with/var/www/html, so that the files can be accessed directly.
Mail a post-commit File
Cppost-commit.tmpl post-commit
VI/SVN/repos/hooks/post-commit
Write the following content:
#! /Bin/sh
Export lang = en_US.UTF-8
SVN update/var/www/html -- username svnuser -- password svnuser
SVN update/var/www/html -- username test -- password Test
In addition, change the file to 777 first, first in

Service

Tool


After/var/www/html checkout, you can add the/var/www/html
Chmod 777 post-commit
Chown Apache. Apache post-commit

Step 8

Run the Subversion Service (optional)
VI/etc/rc. Local
Add the followingCommand


#! /Bin/sh
#
# This script. will be executed * after * all the other init scripts.
# You can put your own initialization stuff in here if you don't
# Want to do the full sys V style. init stuff.
Touch/var/lock/subsys/local
Svnserve-d-r/SVN/Repos

Step 9

Set the svn configuration file of Apache

VI/etc/httpd/CONF. d/subversion. conf

<Location/repos>
Dav SVN
Svnparentpath/SVN
#
# Limit write permission to list of valid users.
# <Limitaskt get PROPFIND Options Report>
# Require SSL connection for password protection.
# Sslrequiressl
#
# Authtype basic
# Authname "Authorization realm"
# Authuserfile/path/to/passwdfile
# Require valid-user
# </Limit10000t>
</Location>
Remove the corresponding # and change the path to the above one.

Step 10

Restart the server
Svnserve -- daemon -- root =/SVN -- listen-Port = 3690

Step 11
Create a project svnproject
Mkdir/tmp/svnproject
Mkdir/SVN/repos/svnproject
SVN import/tmp/svnproject file: // SVN/repos/svnproject-M "Initial import"

Step 12
Checkout once on the server
SVN checkout SVN: // 127.0.0.1/repos/var/www/html

Step 13
OK
You can use another machine to access the server, for example, the Intranet IP address 192.168.1.226.
SVN: // 192.168.1.226/repos/svnproject
Address of the test project
Http: // 192.168.1.226/svnproject

CommitData

The repository code is synchronized with/var/www/html of the 192.168.1.222 server.
In addition, you can set a project for each data warehouse.

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.