下面讲解下如何在 7中安装Subversion的详细过程。
1、开始在CentOS 7中安装Subversion
yum install mod_dav_svn subversion
示例输出:
=====================================================
Package Arch Version Repository Size
=====================================================
Installing:
mod_dav_svn x86_64 1.7.14-6.el7 base 101 k
subversion x86_64 1.7.14-6.el7 base 1.0 M
Installing for dependencies:
apr x86_64 1.4.8-3.el7 base 103 k
apr-util x86_64 1.5.2-6.el7 base 92 k
httpd x86_64 2.4.6-18.el7.centos updates 2.7 M
httpd-tools x86_64 2.4.6-18.el7.centos updates 77 k
mailcap noarch 2.1.41-2.el7 base 31 k
neon x86_64 0.30.0-3.el7 base 165 k
pakchois x86_64 0.4-10.el7 base 14 k
subversion-libs x86_64 1.7.14-6.el7 base 921 k
Transaction Summary
=====================================================
2、加配置文件到Apache
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
DAV svn
SVNParentPath /var/www/linuxidcsvn
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile /etc/svn-auth-users
Require valid-user
3、创建SVN用户
[root@linuxidc-centos7 ~]# htpasswd -cm /etc/svn-auth-users testuser1
New password:
Re-type new password:
Adding password for user testuser1
[root@linuxidc-centos7 ~]#
4、创建和配置SVN仓库
mkdir /var/www/linuxidcsvn
cd /var/www/linuxidcsvn
svnadmin create repo
chown -R apache.apache repo
# If you still have issues with SELinux Security please apply this:
chcon -R -t httpd_sys_content_t /var/www/linuxidcsvn/repo
chcon -R -t httpd_sys_rw_content_t /var/www/linuxidcsvn/repo
5、你可以用这种方式–HTTP和HTTPS
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
6、启用并启动HTTP服务
systemctl enable httpd.service
systemctl restart httpd.service
7、加入下面这个到conf/svnserve.conf
anon-access = none
auth-access = authz
8、branches&tags&trunk模式下建svn库
mkdir -p /tmp/svn-structure-template/{trunk,branches,tags}
svn import -m "Initial repository" /tmp/svn-structure-template file:///var/www/linuxidcsvn/repo/
Adding /tmp/svn-structure-template/branches
Adding /tmp/svn-structure-template/tags
Adding /tmp/svn-structure-template/trunk
Committed revision 1.
OK。
CentOS 6 编译安装Subversion-1.8.10+Apache2.4
Linux中Subversion配置实例
CentOS 6.2 SVN搭建 (YUM安装)
Apache+SVN搭建SVN服务器
Windows下SVN服务器搭建和使用 + 客户端重新设置密码
Server 12.04 安装 SVN 并迁移 Virtual SVN数据
Ubuntu Server搭建svn服务以及迁移方法
作者:华帝在哪 想了解作者请访问
Linux公社原创翻译频道:
本文永久更新链接地址: