SVN Server Setup (integrated with Apache)

Source: Internet
Author: User
Tags sqlite

A. SVN Introduction

SVN is a version control tool, the Subversion Repository (repository), which is located on the server, where data is managed and stored centrally.

two. how SVN data is stored

In subversion, repository data is stored in two ways: one is to store data in a Berkeley DB database, and the other is a normal file, stored in a custom format called FSFS.

three. SVN Build

1. Required Packages

Httpd-2.2.27.tar.gz

Apr-1.5.1.tar.gz

Apr-util-1.5.3.tar.gz

Sqlite-amalgamation-3.6.17.tar.gz

Subversion-1.8.10.tar.gz

2. Install the Package

2.1 Installing Apache

# tar zxf httpd-2.2.27.tar.gz

# CD httpd-2.2.27

#./configure--prefix=/app/sinova/apache--enable-dav--enable-so--enable-modules=most

# make

# make Install

2.2 Installing APR, Apr-util

# tar zxf apr-1.5.1.tar.gz

# CD apr-1.5.1

#./buildconf #验证系统是否已经安装python, autoconf, Libtool, if not installed, use Yum or RPM to install the appropriate package.

Verify that the following is correct:

#./configure--PREFIX=/USR/LOCAL/APR

# make

# make Install

# tar zxf apr-util-1.5.3.tar.gz

# CD apr-util-1.5.3

#./configure--prefix=/usr/local/apr-util--WITH-APR=/USR/LOCAL/APR

# make

# make Install

2.3 Installing SQLite

# tar zxf sqlite-amalgamation-3.6.17.tar.gz

# CD sqlite-3.6.17

#./configure--prefix=/usr/local/sqlite

# make

# make Install

2.4 Installing SVN

# tar zxf subversion-1.8.10.tar.gz

# CD subversion-1.8.10

#./configure--PREFIX=/APP/SVN--with-apxs=/app/sinova/apache/bin/apxs--with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr-util/bin/apu-1-config--with-sqlite=/usr/local/sqlite/--with-openssl--with-zlib- -enable-maintainer-mod

# make

# make Install

Error encountered while configure:

Get the SQLite 3.7.15.1 amalgamation from:

Http://www.sqlite.org/sqlite-amalgamation-3071501.zip

Unpack the archive using unzip and rename the resulting

Directory to:

/app/soft/subversion-1.8.10/sqlite-amalgamation

Configure:error:Subversion requires SQLite

Workaround:

If the server is not networked, download the Http://www.sqlite.org/sqlite-amalgamation-3071501.zip and upload it to the server. Extract

# Unzip Sqlite-amalgamation-3071501.zip

# CP sqlite-amalgamation-3071501/*/app/soft/sqlite-3.6.17/

then re-install SQLite and then configure.

four. Configure SVN and Apache

1. Create SVN Project Warehouse

# MKDIR/APP/SVNROOT/LTZB #创建svn根目录

#/app/svn/bin/svnadmin Create/app/svnroot/ltzb/test

2. Create a rights profile

# vi/app/svnroot/ltzb/authz.conf #添加如下内容

[/]

* = R #表示对所有的用户开放读的权限

[test:/]

Liyizhen = RW #表示用户liyizhen对仓库test有读写权限.

3. Create a user authentication file

#/app/sinova/apache/bin/htpasswd-c/app/svnroot/ltzb/authfile eivll0m

When the 4.SVN installation is complete, the two modules of mod_authz_svn.so and mod_dav_svn.so are generated in the/app/svn/libexec directory, and the two module files are copied to the Apache module directory.

# cp/app/svn/libexec/*/app/sinova/apache/modules/#设置到权限问题使用root用户来操作, then empower the appropriate user.

5. Edit the httpd.conf file and modify the following:

User Sinova #修改

Group Sinova #修改

ServerName www.example.com:80 #去掉本行前面的注释

LoadModule Dav_svn_module modules/mod_dav_svn.so #添加

LoadModule Authz_svn_module modules/mod_authz_svn.so #添加

The following additions are added at the end:

<Location/ltzb>

DAV SVN

Svnparentpath "/app/svnroot/ltzb"

Authzsvnaccessfile "/app/svnroot/ltzb/authz.conf"

AuthType Basic

AuthName "Subversion.zoneyump"

AuthUserFile "/app/svnroot/ltzb/authfile"

Require Valid-user

</location>

6. Launch Apache, about Iptables,selinux, etc.

# Sudo/app/sinova/apache/bin/apachectl Start

Five. using the SVN client Test

1. Access SVN via the browser and enter http://192.168.0.105/ltzb/test in the address bar

2. Through the TORTOISESVN client under Windows

Create a new directory in E or other disk test (name Custom), go to the directory, right-click on SVN cheakout ...

Error encountered using this customer upload: SVN Can ' t open file '/home/svn/db/txn-current-lock ' Error

Workaround:

chmod –R o+rw /app/svnroot/ltzb/test

SVN Server Setup (integrated with Apache)

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.