CentOS7.4上部署SVN服务器

一、说明

环境说明

  • CentOS 7.4
  • Subversion 1.10

参考网址

Subversion下载网址: https://www.aliyun.com/jiaocheng/141813.html
配置过程参考网址: https://wiki.centos.org/HowTos/Subversion
权限问题: https://serverfault.com/questions/625579/svn-cant-open-file-var-www-svn-repo-db-txn-current-lock-permission-denied

二、配置过程

// step1: Installation Packages
$ yum install mod_dav_svn subversion

// step2: apache
$ systemctl start httpd
$ chkconfig httpd on

// step3: Subversion’s apache configurations
$ vim /etc/httpd/conf.d/subversion.conf
$ Make sure you uncomment the following if they are commented out
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

# Add the following to allow a basic authentication and point Apache to where the actual
# repository resides.
<Location /human>
        DAV svn
        SVNPath /var/www/svn/human
        AuthType Basic
        AuthName "Subversion repos"
        AuthUserFile /etc/svn-auth-conf
        Require valid-user
</Location>

// step4: add user
$ htpasswd -cm /etc/svn-auth-conf yourusername
New password:
Re-type new password:
Adding password for user yourusername

// step5: Configure your repository
$ cd /var/www
$ mkdir svn
$ cd svn
$ svnadmin create human
$ chown -R apache.apache human
$ setsebool -P httpd_unified=1			//close selinux
$ systemctl restart httpd

三、问题汇总

发现服务器无法连接?
问题分析:这种情况可能是由于服务的的防火墙开启,导致远程访问被屏蔽,因此需要关闭防火墙和selinux
解决方案:

//close firewall
$ systemctl stop firewalld.service
$ systemctl disable firewalld.service
$ vim /etc/selinux/config  //disable selinux
$ reboot

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

42方生科技

谢谢!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值