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

你可能感兴趣的:(环境部署,svn,服务器,运维)