Environment: Centos5.664-bit IP address: 192.168.1.98 Step 1: install 1. install Apacheyuminstall & amp; ndash; yhttpd2. install Subversionyuminstall & amp; ndash; ymod_dav_svnsubversion. Step 2: Configure apache1: vi/etc/httpd/conf.
Environment: Centos 5.6 64-bit IP address: 192.168.1.98
Step 1: Install
1. install Apache
Yum install-y httpd
2. install Subversion
Yum install-y mod_dav_svn subversion
Step 2 configure apache
1: vi/etc/httpd/conf/httpd. conf
2: Find ServerName, remove # from the front, and change it to ServerName 192.168.1.98: 80.
3: execute service httpd restart
4: open http: // 192.168.1.98 in a windows browser to view the apache homepage.
Note: If a firewall exists, you need to configure port 80 that can be accessed externally. enter the following
1:/sbin/iptables-I INPUT-p tcp -- dport 80-j ACCEPT
2:/etc/rc. d/init. d/iptables save
3:/etc/init. d/iptables restart
Step 3: Configure subversion
1: cd/var/www
2: mkdir svn (created if svn does not exist)
3: cd svn
4: svnadmin create repos
5: chown-R apache. apache repos
6: vi/etc/httpd/conf. d/subversion. conf
Configure Localtion as follows: note that the default value is SVNParentPath, which is changed to SVNPath.
DAV svn
SVNPath/var/www/svn/repos
# Limit write permission to list of valid users.
#
# Require SSL connection for password protection.
# SSLRequireSSL
AuthType Basic
AuthName "Subversion repos"
AuthUserFile/etc/svn-auth-conf
Require valid-user
#
7. create a user name and password
Input: htpasswd-cm/etc/svn-auth-conf yourusername
8: service httpd restart
9: in windows, open http: // 192.168.1.98/repos and enter the user name and password.
10: in windows, use the CheckOut of TortoiseSVN and enter http: // 192.168.1.98/repos.
Step 4: svn access control list
For multiple users, different access permission control needs to be used for those who do not understand. This section describes the configuration.
1: vi/etc/httpd/conf. d/subversion. conf
Added: AuthzSVNAccessFile/etc/svn-acl-conf
The result is as follows:
DAV svn
SVNPath/var/www/svn/repos
AuthzSVNAccessFile/etc/svn-acl-conf
# Limit write permission to list of valid users.
#
# Require SSL connection for password protection.
# SSLRequireSSL
AuthType Basic
AuthName "Subversion repos"
AuthUserFile/etc/svn-auth-conf
Require valid-user
#
2: vi/etc/svn-acl-conf
The content is as follows:
[Repos:/]
Allgroup = r
Zdhsoft = rw
[/]
* = R
[Groups]
Devgroup = zdhsoft1, zdhsoft2, zdhsoft3
[Repos:/]
Zdhsoft = rw
@ Devgroup = r