redhat enterprise 6.1下httpd+svn服务搭建记录
这两天配了个http+svn的服务器,从一开始的什么都不懂到最后可以svn commit,经历了一些波折。在网上查了大量的资料,有很多没有记住都是谁写的了。无法将我参考过的文章链接列出来,报歉!
以下是我安装配置的过程,以便以后需要的时候再次翻阅。现在记性太差了。。。。。
操作系统:Linux RHE_6.1 (redhat enterprise 6.1)
需要软件包:Apache(httpd), Subversion?一,安装必须软件在/etc/rc.d/init.d目录下编辑启动脚本。
拷贝自动启动的服务程序到 /etc/rc.d/init.d 目录下:
例如:将 appache2的驱动程序appachectl拷贝至/etc/rc.d/init.d目录下并改名为:httpd
cp /usr/sbin/apachectl /etc/rc.d/init.d/httpd
使用编辑器打开httpd文件,并在第一行#!/bin/sh下增加两行文字如下
# chkconfig: - 85 15
# description: Apache
更改httpd文件执行权限:
chmod 700 /etc/rc.d/init.d/httpd
1.3.2 将httpd注册到开机启动中chkconfig --add httpdchkconfig --level 3 httpd onchkconfig --level 5 httpd on?2 SVN权限配置?2.1 配置svn权限vi /home/svnroot/auth/authz.conf?顶部添加:[groups]Admin=xxx,xxx1testuser=test1,test2?[/]*=r?[test:/]@Admin=rw@testuser=rw*=r?这个是设置用户对SVN各目录的权限的。?3 防火墙服务设置?3.1 SELinux设置这个东东的详细情况我还没有去学习了解,目前情况下只好把它禁掉了,不然的话svn配置好后会出现不停的要求输入用户名和密码即使用正确的用户名和密码也无法进入。命令行提示是:Authentication realm: <http://xxxxxxxxxxxx> AuthNamePassword for 'Your user':Authentication realm: <http://xxxxxxxxxxxx> AuthNameUsername:?Password for 'Your user':Authentication realm: <http://xxxxxxxxxxxx> AuthNameUsername:?Password for 'Your user':svn: OPTIONS of ''http://xxxxxxxxxxxx: authorization failed: Could not authenticate to server: rejected Basic challenge (http://xxxxxxxxxxxx)?查看SELinux的配置,看其是否是enforce的。如果SELinux是enforce的话,会导致svn一直要求输入用户名和密码,并永远也通不过(即使用正确的用户名和密码)修改/etc/sysconfig/selinux 将其改成 disable就好了。?3.2 iptables设置如果你的iptables是开启的,并且并没有将80端口的访问打开的话那么你将连不上svn。查看并设置自己的iptables设置,这里贴出我自己的:-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT-A INPUT -p icmp -j ACCEPT-A INPUT -i lo -j ACCEPT-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT