如何在CentOS 7中安装Subversion
1个回答
展开全部
1、开始在CentOS 7中安装培信或Subversion
yum install mod_dav_svn subversion
2、加配置文件到Apache
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/bkjiasvn
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile /etc/svn-auth-users
Require valid-user
</Location>
3、创建SVN用户
[root@bkjia-centos7 ~]# htpasswd -cm /etc/svn-auth-users testuser1
New password:
Re-type new password:
Adding password for user testuser1
[root@bkjia-centos7 ~]#
4、创建和配置SVN仓坦粗库
mkdir /var/www/bkjiasvn
cd /var/www/bkjiasvn
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/bkjiasvn/repo
chcon -R -t httpd_sys_rw_content_t /var/www/bkjiasvn/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/bkjiasvn/repo/
Adding /tmp/svn-structure-template/branches
Adding /tmp/svn-structure-template/tags
Adding /tmp/svn-structure-template/trunk
Committed revision 1.
OK。
yum install mod_dav_svn subversion
2、加配置文件到Apache
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/bkjiasvn
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile /etc/svn-auth-users
Require valid-user
</Location>
3、创建SVN用户
[root@bkjia-centos7 ~]# htpasswd -cm /etc/svn-auth-users testuser1
New password:
Re-type new password:
Adding password for user testuser1
[root@bkjia-centos7 ~]#
4、创建和配置SVN仓坦粗库
mkdir /var/www/bkjiasvn
cd /var/www/bkjiasvn
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/bkjiasvn/repo
chcon -R -t httpd_sys_rw_content_t /var/www/bkjiasvn/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/bkjiasvn/repo/
Adding /tmp/svn-structure-template/branches
Adding /tmp/svn-structure-template/tags
Adding /tmp/svn-structure-template/trunk
Committed revision 1.
OK。
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询