Notes on installing SVNService in ReadHatLinux5.5

Source: Internet
Author: User
Tags collabnet
ReadHatLinux5.5 install SVNService Process notes, Subversion independent services and integrated services with apache. I. Svn independent service installation operating system: RedHatLinux5.5 installation package get: Download http://subversion.tigris.org/downloads/subversion-1.4.0.tar.gzhttp://subversion.

Notes on installing SVN Service in ReadHat Linux 5.5, Subversion independent Service, and apache integrated Service.

I. Svn Independent Service Installation

Operating System: RedHat Linux5.5

Obtain the installation package:

Download

  • Http://subversion.tigris.org/downloads/subversion-1.4.0.tar.gz
  • Http://subversion.tigris.org/downloads/subversion-deps-1.4.0.tar.gz

Compile:
Log on as the root user.
Upload subversion-1.4.0.tar.gzand subversion-deps-1.4.0.tar.gz to the server.

Tar xfvz subversion-1.4.0.tar.gz
Tar xfvz subversion-deps-1.4.0.tar.gz

The subversion-deps package has four directories: zlib apr-util neon. All these four directories are dependent packages. The Code required for compiling subversion
Cd subversion-1.4.0
./Configure-prefix =/opt/svn-without-berkeley-db-with-zlib
(Note: Run in svnserve mode without adding apache compilation parameters. Store version libraries in fsfs format without compiling berkeley-db)
Make clean
Make
Make install

If an error occurs in make, refer to the following solution:

When I compile the Neon library on 64-bit Linux, an error occurs: "relocation R_X86_64_32 against 'a local symbol' can not be used when making a shared object ".

The Neon library is a library used for communication between Subversion servers and HTTP clients. It is usually compiled into a static library. However, it is later linked to different dynamic link libraries, which leads to an error in the compilation process on the AMD 64-bit operating system. The following information is displayed:


Subversion-1.4.6/neon/src/. libs/libneon. a (ne_request.o): relocation R_X86_64_32
Against 'a local symbol' can not be used when making a shared object;
Recompile with-fPIC
/Home/jrandom/subversion-1.4.6/neon/src/. libs/libneon. a: cocould not
Read symbols: Bad value
This is mentioned in an article in The developer email list.

The solution is to provide a "-- enable-shared" parameter for the Subversion configuration script.

Reference: http://subversion.apache.org/faq.zh.html

Vi/etc/profile, which is added at the end of/etc/profile:

PATH = $ PATH:/opt/svn/bin
Export PATH

Test:
Svnserve-version

If the following figure is displayed, the installation is successful:
Svnserve, version 1.4.0 (r21228)
Compiled Oct 12 2006, 10:18:56

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see [url] http://subversion.tigris.org/#/url]
This product includes DES software developed by CollabNet ([url] http://www.collab.net/#/url]).

The following repository back-end (FS) modules are available:

* Fs_fs: Module for working with a plain file (FSFS) repository.

2. svn Configuration
Create a version library directory. You can create multiple directories:
Mkdir-p/opt/svndata/repos1
Mkdir-p/opt/svndata/repos2

Build a version Library: (the initialization process generates configuration files and other files)
Svnadmin create/opt/svndata/repos1
Svnadmin create/opt/svndata/repos2

Modify the version library configuration file:
Version Library 1:
Vi/opt/svndata/repos1/conf/svnserve. conf

Modify the content:
[General]
Anon-access = none
Auth-access = write
Password-db =/opt/svn/conf/pwd. conf
Authz-db =/opt/svn/conf/authz. conf
Realm = repos1

Version library 2:
Vi/opt/svndata/repos2/conf/svnserve. conf

Modify the content:
[General]
Anon-access = none
Auth-access = write
Password-db =/opt/svn/conf/pwd. conf
Authz-db =/opt/svn/conf/authz. conf
Realm = repos2

That is, except realm = repos2, the other configuration files are exactly the same as those of version 1. If more version libraries are available, follow these steps.

Configure the Users Allowed to access:
Vi/opt/svn/conf/pwd. conf

To simplify the configuration, two version libraries share one user configuration file. If necessary, they can also be separated.

Note: modifications to user configuration files take effect immediately without the need to restart svn.

The file format is as follows:
[Users]
<用户1> = <密码1>
<用户2> = <密码2>

[Users] is required. The following lists the users who want to access svn. each user has a row. Example:
[Users]
Alan = password
King = hello

Configure user access permissions:
Vi/opt/svn/conf/authz. conf

To simplify the configuration, the three version libraries share one permission configuration file/opt/svn/conf/authz. conf. If necessary, they can also be separated. File.

Note:
* The user name displayed in the permission configuration file must be defined in the user configuration file.
* Changes to the permission configuration file take effect immediately without restarting svn.

User Group format:
[Groups]
<用户组名> = <用户1> , <用户2>
One user group can contain one or more users separated by commas.

Version library directory format:
[ <版本库> :/Project/directory]
@ <用户组名> = <权限>
<用户名> = <权限>

The box number can be written in multiple ways:
/, Indicating the root directory and the following. The root directory is specified when svnserve is started. We specify it as/opt/svndata. In this way,/sets permissions for all version libraries.
Repos1:/indicates setting permissions for Version 1.
Repos2:/abc indicates setting permissions for the abc Project in version 2.
Repos2:/abc/aaa indicates setting permissions for the aaa directory of the abc Project in version library 2

The permission subject can be a user group, user, or *,

Add @ to the user group @

* Indicates all users.

The permission can be w, r, wr, or null.

Null indicates that you do not have any permissions.

Example:
[Groups]
Admin = alan

[/]
@ Admin = rw

[Repos1:/abc/aaa]
King = rw

[Repos2:/pass]
King =

Delete useless files:
Rm/opt/svndata/repos1/conf/authz
Rm/opt/svndata/repos1/conf/passwd
Rm/opt/svndata/repos2/conf/authz
Rm/opt/svndata/repos2/conf/passwd

3. Start svn
Create a user to start svn:
Useradd svn
Passwd svn
Set the user svn password as prompted

Allow user svn to access the version Library:
Chown-R svn: svn/opt/svndata
Chown-R svn: svn/opt/data

Start svn:
Svnserve-d -- listen-port 9999-r/opt/svndata

Where:
Su-svn indicates to start svn as user svn
-D Indicates running in daemon mode (running in the background)
-Listen-port 9999 indicates port 9999, which can be replaced with the required port. Note that the root permission is required to use ports lower than 1024.
-R/opt/svndata specifies that the root directory is/opt/svndata

Check:
Ps-ef | grep svnserve

If the following information is displayed, the instance is successfully started:
Svn 6941 1 0? 00:00:00 svnserve-d-listen-port 9999-r/opt/svndata

========================================================== ========================


Ii. Integration of svn and apache

The Subversion storage method is the Berkeley DB Berkeley storage method, and the fsfs storage method.

Data storage table of two versions

Features Berkeley DB FSFS
Sensitive to operation interruptions
Sensitive; system crashes or permission issues can cause database congestion and regular recovery is required.
Insensitive
Read-Only Loading No Yes
Storage platform independent No Yes

Accessible from network file systems

No Yes
Version library size Slightly larger Slightly smaller

Scalability: Number of revision trees

Unlimited
Some local file systems may encounter problems when processing a single directory containing thousands of entries.
Scalability: Directory with many files Slow Slow
Speed of checking out the latest code Fast Yes
Massive submission speed
Slow, but the time is allocated in the entire commit operation

Fast, but the last long delay may cause the client operation to time out.

Group access management
It is very sensitive to the user's umask settings, and it is best to only be accessed by one user.
Insensitive to umask settings
Function Maturity 2001 2004

1. Install APR-1.2.7 and APR-util-1.2.7

: [Url] http://apr.apache.org/
Tar zxvf apr-1.2.7.tar.gz

./Configure

Make

Make install

Tar zxvf apr-util-1.2.7.tar.gz

./Configure -- with-apr =/usr/local/apr/

Make

Make install

2. Compile and install APACHE.

Tar zxvf httpd-2.2.3.tar.gz
Cd httpd-2.2.3
. /Configure -- prefix =/opt/apache -- enable-dav -- enable-so -- enable-maintainer-mode -- with-apr =/usr/local/apr/bin/apr-1-config -- -apr-util =/usr/local/apr/bin/apu-1-config

Make
Make install

3. Install subversion-1.4.0

Tar zxvf subversion-1.4.0.tar.gz

./Configure -- with-apxs =/opt/apache/bin/apxs -- with-apr =/usr/local/apr -- with-apr-util =/usr/local/apr

Problem: Shared Library Error

Method: echo "/usr/local/apr-util/lib">/etc/ld. so. c

Ldconfig echo $?

Make
Make install
Set environment variables (do not do it)

Vi/etc/profile, which is added at the end of/etc/profile:
PATH = $ PATH:/opt/svn/bin
Export PATH


4. Check whether the two dynamic libraries of subversion are successfully installed.

Vi/opt/apache/conf/httpd. conf

The following two modules indicate that the installation is successful.

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

5. Configure SVN

Vi/opt/apache/conf/httpd. conf

Configuration:


DAV svn
SVNParentPath/data/svn/repos // svn parent directory
AuthType Basic // set the connection type
AuthName "Subversion repository" // connection box prompt
AuthUserFile/data/svn/passwd // user configuration file
AuthzSVNAccessFile/data/svn/auth
Require valid-user // All passwd users can access

6. Create a SVN storage warehouse

# Mkdir-p/opt/svndata/repos


# Svnadmin create-fs-type fsfs/opt/svndata/repos

Back up previous SVN Databases

# Svnadmin dump/opt/svndata/repos>/root/repos20080328

Recover the backup data to the local device.

# Svnadmin load/opt/svndata/repos/</root/repos20080328

7. Create a local access control file

#/Opt/apache/bin/htpasswd [-c]/opt/passwd north
// Use-c to create a new user file when setting the user for the first time.

#/Opt/apache/bin/htpasswd passwd username (Add a new user)

8. Create a local project control file

Touch/opt/svndata/auth

File Content:

[Groups]
[Repos1:/]
# Wxy = rw
North = rw
Tom = rw


[Repos2:/]
Repos2 = rw


9. Install the client and access the server

[Url] http: // 192.168.0.180:/svn/jishu [/url]
Note: SVN is added during APACHE configuration.

10. The installation has basically ended.

Modify the/data/svn/repos attribute. Otherwise, the file upload may fail.

Chmod-R apache. apache repos

3. Routine maintenance commands and Parameters

Start svn Service

Svnserve-d -- listen-port 20000-r/opt/svndata

Create a version Library

Svnadmin create fs-type fsfs/opt/svndata/mark

View version Library Information

Svn list file: // opt/svndata/mark

Svn list -- verbose file: // opt/svndata/mark

Imported directory structure

Svn import/tmp/mark/file: // opt/svndata/mark/-- message "init" (the folder mark contains bo)

Delete the bo folder under the version library mark

Svn delete svn: // 192.168.0.180: 20000/opt/svndata/mark/bo-m "delete"

// Export

$ Svnlook youngest oldrepo

$ Svnadmin dump oldrepo>; dumpfile

// Restore

$ Svnadmin load newrepo <dumpfile

Stop the subversion Service

Ps aux | grep svnserve

Kill-9 ID No.

Ubuntu 14.04 SVN server SVN: // http://www.linuxidc.com/Linux/2015-01/111956.htm

CentOS 6.2 SVN setup (YUM installation)Http://www.linuxidc.com/Linux/2013-10/91903.htm

CentOS 6.5 deploy Apache + SVN http://www.linuxidc.com/Linux/2013-12/94315.htm

Apache + SVN build SVN server http://www.linuxidc.com/Linux/2013-03/81379.htm

Windows SVN server setup and use + client Reset Password http://www.linuxidc.com/Linux/2013-05/85189p5.htm

Ubuntu Server 12.04 install SVN and migrate Virtual SVN data http://www.linuxidc.com/Linux/2013-05/84695.htm

Ubuntu Server SVN service and migration method http://www.linuxidc.com/Linux/2013-05/84693.htm

Subversion (SVN): Click here
Subversion (SVN): Click here

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2016-01/127284.htm

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.