yum install -y httpd httpd-devel subversion mod_dav_svn
#cd /etc/httpd/modules #ls | grep svn mod_authz_svn.so mod_dav_svn.so
#svn- -version
Go to the /etc/httpd/conf.d directory and use vim to open the subversion.conf configuration file to modify the options
Module configuration must ensure that the following two sentences exist in the configuration file, otherwise the svn warehouse will not be accessible
LoadModuledav_svn_module modules/mod_dav_svn.so LoadModuleauthz_svn_module modules/mod_authz_svn.so
# mkdir -p /home/svn # cd /home/svn # svnadmin create myapp # chown -R apache.apache myapp $apache是httped服务的默认用户 # vi /etc/httpd/conf.d/subversion.conf 加入以下配置 LoadModuledav_svn_module modules/mod_dav_svn.so LoadModuleauthz_svn_module modules/mod_authz_svn.so <location> DAV svn SVNParentPath /svn 仓库目录 SVNListParentPath on 使用多仓库 AuthType Basic AuthName "Authorization Realm" AuthUserFile /home/svn/svn/httpdpasswd 使用的用户文件 AuthzSVNAccessFile /home/svn/authz 使用的用户配置 Require valid-user 用户需要验证才能登录 </location>
# htpasswd -c /var/svn/passwd Justin //创建一个httpd的用户 ,第一次使用需要用 -c 选项 # servicehttpd restart
There is a passwd file under the created SVN warehouse myapp/conf/passwd. Create user information and user password passwd configuration by editing the file.
There is an authz file under the created SVN warehouse myapp/conf/authzz to configure user permissions
svnserve -d -r /home/svn/myapp ps aux | grep svn
The above is the detailed content of Detailed explanation: SVN cooperates with Apache under Centos6.6. For more information, please follow other related articles on the PHP Chinese website!