Install Apache and Subversion methods under Linux (RH9)

Source: Internet
Author: User
Tags add format pack svn version valid access root directory

Read a lot of information on the Internet, yesterday finally with the help of Atango to become a Linux (RH9) under Subversion. Summing up the experience of each road write the installation configuration process below:

First, the required installation package:

(1), Apache--httpd-2.0.59.tar.gz

(2), Subveision--subversion-1.4.4 Edition

Contains two packages

Subversion-1.4.4.tar.gz Core Code Pack

Subversion-deps-1.4.4.tar.gz Dependent Code Pack

Second, installation steps:

1. Install Apache

First unpack the httpd--2.0.59 package

# TAR-XZVF Httpd-2.0.59.tar.gz

# CD httpd-2.0.59

Compilation parameters (default installation directory/usr/local)

#./configure--enable-module=so--enable-dav--enable-dav-fs--enable-so--prefix=/usr/local/apache2

#make

#make Install

2. Installation subversion-1.4.4

Extract two compressed packets separately, and the contents will be extracted to the same directory subversion-1.4.4 (default decompression in the same directory)

#tar-XZVF subversion-1.4.4.tar.gz

#tar-XZVF subversion-deps-1.4.4.tar.gz

Enter the folder, the compilation parameters are

#cd subversion-1.4.4

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

--with-apxs=/usr/local/apache2/bin/apxs

--with-apr=/usr/local/apache2

--with-apr-util=/usr/local/apache2

#make

#make Install

3. Configure SVN server

(1) Modify the version library configuration file:

Version Library 1:

Vi/home/svnroot/repository/conf/svnserve.conf

Content modified to:

[general]
anon-access = none
auth-access = write
password-db = /home/svnroot/repository/authfile //用户配置文件
authz-db = /home/svnroot/repository/authz.conf //权限配置文件
##realm = test

(2) Modify the Apache configuration file and add the following data to the httpd.conf

<Location /svn>
DAV svn
SVNPath /svnroot/repository
SVNParentPath /home/svnroot/ //svn父目录
AuthzSVNAccessFile /home/svnroot/repository/authz.conf //权限配置文件
AuthType Basic //连接类型设置
AuthName "Subversion.zoneyump" //连接框提示
AuthUserFile /home/svnroot/repository/authfile //用户配置文件
</LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user //采用何种认证
</LimitExcept>
</Location>

Where Authfile is passed

Htpasswd-b-c/home/svnroot/repository/authfile username Password//To create

"Require Valid-user" tells Apache that all users in authfile can access it. Without it,

Only the first user can access the new library

Restart Apache

#cd/usr/local/apache2/bin/#./apachectl Restart

Open the browser to access the http://localhost/svn/test/, if something appears to indicate success.

4. Rights Management

1) Increase user

# Htpasswd/home/svnroot/repository/authfile Name

The first time you set up a user, use-c indicates a new user file. Enter user password after carriage return, complete the increase to the user

# htpasswd Authfile username (add new user)

2) Permission Assignment

To configure user access rights:

Vi/home/svnroot/repository/authz.conf

To simplify configuration, the 3 version libraries share 1 rights profile/home/svnroot/repository/pwd.conf. If necessary, can also be separated.

The user group and version Library directory permissions are defined in the file.

Attention:

* The user name that appears in the permissions profile must already be defined in the user profile.

* Changes to the permissions profile take effect immediately, and you do not have to restart SVN.

User group format:

[Groups]

< user group name > = < user 1>,< user 2>

Of these, 1 user groups can contain 1 or more users, separated by commas.

Version Library catalog format:

[< Version Library >:/project/directory]

@< user Group Name > = < permissions >

< user name > = < permissions >

Some of the box numbers can be written in several ways:

/, representing the root directory and below. The root directory is specified when the Svnserve is started, and we specify/home/svnroot/repository. This way,/means to set permissions on all versions of the library.

test:/, which indicates that permissions are set on the version library test

A permission principal can be a user group, user, or *, and the user group adds @,* to the front to represent all users. Permissions can be W, R, WR, and NULL, and NULL means no permissions.

Example:

[Groups]

admin = Mangosoft

[/]

@admin = RW

[test:/]

@admin = RW

LSW = RW



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.