SVN Installation

晴,冷。

无聊摇个出个cindy,莫非是?速加。。。。。。侃上几句,证明完全不是,丢一边睡觉。ok,我承认我想象力太丰富了。trueman‘s world,trueman’s world......这又是个巧合?

1、

yum install mod_dav_svn subversion
2、查看 /etc/httpd/conf.d/subversion.conf  有如如下配置,如果没有添加到里面
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so
 
<Location /svn>
   DAV svn
   SVNParentPath /var/www/svn
   AuthType Basic
   AuthName "Subversion repositories"
   AuthUserFile /etc/svn-auth-users
   Require valid-user
</Location>
 3、创建用户
htpasswd -cm /etc/svn-auth-users tangyu
htpasswd -c /etc/svn-auth-users manager_liu
4、创建版本库
mkdir /var/www/svn
cd /var/www/svn
svnadmin create testrepo
chown -R apache.apache testrepo
chcon -R -t httpd_sys_content_t /var/www/svn/testrepo
chcon -R -t httpd_sys_rw_content_t /var/www/svn/testrepo
   testrepo为库名 关于上下文的配置如果selinux是disable的状态,那后面两条不运行也可以,事实上如果为disable状态,也无法运行后面两条指令^_^,别太纠结 5、访问控制  在你建立的库文件夹下如/var/www/svn,打开conf
## Disable anonymous access ##
anon-access = none
 
## Enable access control ##
authz-db = authz
特别特别注意:anon-access和authz-db前不要留空格     重启httpd 6、导入项目
mkdir -p /tmp/svn-structure-template/{trunk,branches,tags}
svn import -m 'Initial import' /tmp/svn-structure-template/ http://localhost/svn/testrepo
Adding        /tmp/svn-structure-template/trunk

Adding         /tmp/svn-structure-template/branches

Adding         /tmp/svn-structure-template/tags
 7、http://127.0.0.1/svn/testrepo 测试一下

猜你喜欢

转载自tank-tang.iteye.com/blog/1983078
svn
今日推荐