1. RHEL5, APACHE installed by default, with Subversion2. find the mod_dav_svn-1.4.2-2.el5.i386.rpm in the RHEL5 disc, install it, rpm-ivhmod_dav_svn-1.4.2-2.el5.i386.rpm. 3. In this way, the software is ready. 4. Integrate SVN and APPACHE. After the mod_dav_svn module is installed
1. RHEL5. APACHE and Subversion are installed by default.
2. Find the mod_dav_svn-1.4.2-2.el5.i386.rpm, install it, rpm-ivh mod_dav_svn-1.4.2-2.el5.i386.rpm in the RHEL5 disc.
3. In this way, the software is ready.
4. integrate SVN and APPACHE. After the mod_dav_svn module is installed. d/subversion. conf file, which is the main configuration file integrating subversion and APACHE.
Example:
######################################## ############################
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
#
# Example configuration to enable HTTP access for a directory
# Containing Subversion repositories, "/var/www/svn". Each repository
# Must be readable and writable by the 'apache' user. Note that if
# SELinux is enabled, the repositories must be labeled with a context
# Which httpd can write to; this will happen by default
# Directories created in/var/www. Use "restorecon-R/var/www/svn"
# To label the repositories if upgrading from a previous release.
#
#
# To create a new repository "http: // localhost/repos/stuff" using
# This configuration, run as root:
#
# Cd/var/www/svn
# Svnadmin create stuff
# Chown-R apache. apache stuff
#
DAV svn
SVNParentPath/var/www/svn
# Limit write permission to list of valid users.
#
# Require SSL connection for password protection.
# SSLRequireSSL
#
AuthType Basic
AuthName "Subversion repos"
# Username File
AuthUserFile/var/www/svn/passwdfile
# Permission Control
AuthzSVNAccessFile/var/www/svn/aclfile
Require valid-user
#
DAV svn
SVNParentPath/var/www/svn1
# Limit write permission to list of valid users.
#
# Require SSL connection for password protection.
# SSLRequireSSL
#
AuthType Basic
AuthName "Subversion repos"
# Username File
AuthUserFile/var/www/svn1/passwdfile
# Permission Control
AuthzSVNAccessFile/var/www/svn1/aclfile
Require valid-user
#
Here is mainly It mainly tells APACHE that the path of the svn library is there, the authentication file, and the path of the access permission authentication file.
Note that there may be more Nodes, representing multiple SVN libraries.
5. By default, apache users and apache user groups use apache users to access linux folders. For example, SVNParentPath/var/www/svn, you have permissions. Prevents other users from performing operations.
Chown-R apache/var/www/svn
Chmod 700/var/www/svn
In this way, the client does not have permission issues when operating on svn through apache.
6./etc/httpd/conf/httpd. conf is the apache server configuration file. You do not need to modify the content.
7. Add users and Set permissions
Htpasswd-cm/svnrepos/passwdfile username // This is the first user created
Htpasswd-m/svnrepos/passwdfile username will be used later
Edit directory permissions and user groups in the/svnrepos/aclfile file File
For example:
[Groups]
Groupname1 = user1, user2
Groupname2 = user3
[Cmme:/]
@ Groupname1 = rw
@ Groupname2 = r
* = R