Home > System Tutorial > LINUX > Detailed explanation: SVN cooperates with Apache under Centos6.6

Detailed explanation: SVN cooperates with Apache under Centos6.6

WBOY
Release: 2024-05-04 08:13:19
forward
532 people have browsed it

Detailed explanation: SVN cooperates with Apache under Centos6.6

Install svn and Apache
yum install -y httpd httpd-devel subversion mod_dav_svn
Copy after login
Make sure the svn module has been installed: mod_dav_svn
#cd /etc/httpd/modules            
#ls | grep svn 
mod_authz_svn.so
mod_dav_svn.so
Copy after login
Confirm that svn has been installed
#svn- -version
Copy after login
SVN configuration

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
Copy after login
Svn warehouse configuration
# 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>
Copy after login
Create Apathce accessible user information
# htpasswd -c /var/svn/passwd Justin  //创建一个httpd的用户 ,第一次使用需要用 -c 选项
 # servicehttpd restart 
Copy after login
Create user information that can access svn

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.

Permission control authz configuration

There is an authz file under the created SVN warehouse myapp/conf/authzz to configure user permissions

Start svn
svnserve -d -r /home/svn/myapp 
ps aux | grep svn
Copy after login

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!

source:linuxprobe.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template