Apache + svn service setup
1. Install the service
# Install apache service yum install httpd # install svn service and httpd module yum install subversion mod_dav_svn
2. Create an svn Repository
# Create a repository directory mkdir-p/var/www/svn # create a svn repository svnadmin create/var/www/svn/project # configure and modify the repository configuration file vim/var/www/ svn/project/conf/svnserve. conf # disable anonymous users and enable user authentication. Anon-access = noneauth-access = write
3. Integrate apache with svn
# Configure the subversion. conf file as follows:
LoadModule dav_svn_module modules/mod_dav_svn.soLoadModule authz_svn_module modules/mod_authz_svn.so
DAV svnSVNPath /var/www/svn/project/ AuthType BasicAuthName "svn" AuthUserFile /var/www/svn/project/conf/passwdRequire valid-user
# Modify/var/www/svn permission chown apache. apache/var/www/svn-Rchmod 777/var/www/svn-R # disable SELinuxsetenforce 0 # restart apache service httpd restart
4. Create svn users
Cd/var/www/svn/project/conf # Use htpasswd to create a user, create user htpasswd-cb passwd user password for the first time # Add user htpasswd-B passwd new-user new-password # delete user htpasswd-D passwd user # Change user password htpasswd passwd user
5. Configure svn Permissions
# Edit the authz file and set the guest group to contain two users: test and abc.
[Groups]
Guest = test, abc
# Configure group permissions. Set the guest group in the root directory to read and write, and set other users to read.
[/]
Guest = rw
* = R
6. Start the svn Service
# Shut down the svn Service
Killall svnserve
# Start the svn Service
Svnserve-d-r/var/www/svn/project
7. Client test svn
Enter http: // IP/project in the browser
Enter the user name and password to access
Enter http: // IP/project in the svn Client
Enter the user name and password to access