This article is for situations where you want to use HTTP to access SVN after you've installed SVN!
Be sure to close the Selinx, be sure to close the Selinx, be sure to close the Selinx, important things to say three times!!!
Turn off SELinux
Vi/etc/selinux/config
#SELINUX =enforcing #注释掉
#SELINUXTYPE =targeted #注释掉
selinux=disabled #增加
: wq! #保存退出
Setenforce 0 #使配置立即生效
All right, let's talk right now.
Installing Apache
Yum install httpd Apr apr-util httpd-devel
Yum Install MOD_DAV_SVN
cd/etc/httpd/modules/
[email protected] modules]# ll |grep mod_dav_svn.so
-rwxr-xr-x. 1 root root 155360 mod_dav_svn.so
[email protected] modules]# ll |grep mod_authz_svn.so
-rwxr-xr-x. 1 root root 13456 mod_authz_svn.so
Have seen mod_dav_svn.so mod_authz_svn.so prove to have been installed successfully.
Configuring SVN to support HTTP access
HTPASSWD-CM/HOME/SVN/CONF/HTTP_PASSWD XXXXXXX
Attention:
The/home/svn/conf/directory below the passwd file is the authentication file used by the Svnserve standalone server, the password is not encrypted and is displayed in clear text.
The/home/svn/conf/directory below the http_passwd file is the authentication file used by Apache HTTP mode, and the password is encrypted using MD5.
passwd and http_passwd files, the account password must be set to the same.
Setting up the Apache configuration file
Vi/etc/httpd/conf.d/subversion.conf #编辑, add the following code at the end
<Location/svn>
DAV SVN
#SVNPath/HOME/SVN #访问单一文件夹的
SVNPARENTPATH/HOME/SVN #访问多个文件夹的
# # Limit Write permission to list of valid users.
# <limitexcept GET PROPFIND OPTIONS report>
# # Require SSL connection for password protection.
# # Sslrequiressl
#
AuthType Basic
AuthName "Authorization SVN"
Authzsvnaccessfile /home/svn/conf/authz
AuthUserFile /home/svn/conf/http_passwd
Require Valid-user
# </LimitExcept>
</Location>
: wq! #保存退出
Set directory Permissions
Chown apache:apache/home/svn-r #设置svn目录所有者为Apache服务运行账号apache
The above contents refer to
Http://www.osyunwei.com/archives/9145.html
This article is from the "Learning Exchange" blog, please be sure to keep this source http://725689.blog.51cto.com/715689/1772200
Using HTTP proxy svn access