SVN+http(RPM安装版)
1. 检测SVN、httpd、http调用svn模块,软件是否安装
[root@localhost ~]# rpm -qa |grep http
[root@localhost ~]# rpm -qa |grep subversion
[root@localhost ~]# rpm -qa |grepmod_dav_svn
2. 安装所需软件。
[root@localhost ~]# yum install -y httpd subversion mod_dav_svn
3. 启动httpd,并关闭防火墙。
[root@localhost ~]# servicehttpd start
[root@localhost ~]# chkconfighttpd on
[root@localhost ~]# chkconfighttpd --list
[root@localhost ~]# serviceiptables stop
[root@localhost ~]# chkconfigiptables off
[root@localhost ~]# chkconfigiptables --list
4. 创建SVN目录,并创建库文件。
[root@localhost ~]# mkdir /svn
[root@localhost ~]# cd /svn/
[root@localhostsvn]# svnadmin create test
5. 进入httpd中的svn配置文件。
[root@localhostsvn]# vi /etc/httpd/conf.d/subversion.conf
6. 配置允许http访问的svn配置文件。
7. 设置svn库文件,允许apache用户进行管理权限(及httpd服务用户访问权限)
[root@localhostsvn]# cd /svn/
[root@localhostsvn]# ll
[root@localhostsvn]# chownapache:apache-R test
[root@localhostSVN]# chmod 755 test
8. 创建允许访问svn的用户帐号。
[root@localhost /]# mkdir /etc/svn
[root@localhost /]# htpasswd -cm /etc/svn/svn.passwdtiantian
New password:
Re-type new password:
Adding password for user tiantian
[root@localhost /]#
[root@localhost /]# htpasswd -m /etc/svn/svn.passwdtianshi
New password:
Re-type new password:
Adding password for user tianshi
[root@localhost /]#
9. 配置用户访问权限。
[root@localhost /]# touch /etc/svn/svn.access
[root@localhost /]# vi /etc/svn/svn.access
10. 重启httpd服务。
11. 但仍然无法访问,是因为我们当时只关闭防火墙,并没关闭selinux
查看selinux和iptables状态
[root@localhost ~]# serviceiptables status
[root@localhost ~]# sestatus
关闭selinux
[root@localhost ~]# vi /etc/sysconfig/selinux
重启计算机
[root@localhost ~]# init 6
查看selinux和iptables状态
12. 测试
完成。
注意事项:
1. 软件是否安装完整,mod_dav_svn模块很多人忘记安装,并查看httpd配置文件中是否有模块信息。
2. Subversion.conf文件中的指定的svn库、用户帐号、访问权限文件目录是否正确。
3. Svn库、用户帐号、访问权限文件,是否有httpd可以控制的权限。
4. 注意关闭selinux和防火墙、或设置允许访问的权限。修改完selinux必须要重启计算机。
5. 输入地址是否正确,请求头是否正确。必须和配置文件中的呼应。
本文档为【SVN http(RPM安装版)】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。