免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3928 | 回复: 6
打印 上一主题 下一主题

apache+svn问题,急啊!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-10-30 15:07 |只看该作者 |倒序浏览
我是按照下边的文档装的!!!

1、安装APR-1.2.7和APR-util-1.2.7

    下载地址:http://apr.apache.org/   

    tar zxvf  apr-1.2.7.tar.gz

   ./configure

    make

    make install

    tar zxvf apr-util-1.2.7.tar.gz

    ./configure --with-apr=/usr/local/apr/

     make

     make install

2、编译安装APACHE。

    tar zxvf httpd-2.2.3.tar.gz
    cd httpd-2.2.3
    ./configure --prefix=/opt/apache --enable-dav --enable-so --enable-maintainer-mode --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config

     make
     make install

3、安装subversion-1.4.0

     tar zxvf subversion-1.4.0.tar.gz

     ./configure --with-apxs=/opt/apache/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr

     make

     make install

4、查看subversion两个动态库有没有安装成功

     vi /opt/apache/conf/httpd.conf

    看到下面两个模块说明安装成功

     LoadModule dav_svn_module     modules/mod_dav_svn.so
     LoadModule authz_svn_module   modules/mod_authz_svn.so

5、配置SVN

    vi /opt/apache/conf/httpd.conf

     以下大概是我的配置:

    <Location /svn>
       DAV svn
        SVNParentPath /data/svn/repos
        AuthType Basic
        AuthName "Subversion repository"
        AuthUserFile /data/svn/passwd
        AuthzSVNAccessFile /data/svn/auth
        Require valid-user
    </Location>
6、建立SVN存储仓库

     #mkdir -p /data/svn/repos

    #svnadmin create /data/svn/repos/tony.tang

    备份以前的SVN库

    #svnadmin dump /data/svn/repos/tony.tang/ > /root/tony.tang

    把备份出来的数据恢复到本地

    #svnadmin load /data/svn/repos/tony.tang/ < /home/tony.tang

7、建立本地访问控制文件

    /opt/apache/bin/htpasswd -c /data/svn/passwd clay.li

   会提示你输入密码,默认是MD5加密

8、建立本地项目控制文件

    touch /data/svn/auth

    我的文件内容为:

[groups]
[hms.rd.ikang.com:/]
#wxy = rw
chen.shanshan = rw
nuo = rw
jonathan.sun = rw

[php.ikang.com:/]
#wxy = rw
peter = rw

[tony.tang:/]
tony.tang = rw
jonathan.sun = rw
clay.li      =rw

9、安装客户端,访问服务器

    因为我的apache配置端口为88所以访问服务器的时候必须加上端口号。

    http://192.168.7.10:88/svn/tony.tang

   注意:SVN是APACHE配置的时候加上去的。

10、到此安装基本结束

     修改一下/data/svn/repos属性,否则会导致文件上传失败。

    cd /data/svn/

     chmod -R apache.apache repos

论坛徽章:
0
2 [报告]
发表于 2007-10-30 15:09 |只看该作者
装完以后,用客户端登陆,SVN://192.168.1.111/svn/的时候提示没有库.
http://192.168.1.111/svn登陆,提示输入用户名和密码.可我怎么输入都不行.
下边是我的配置文件.

论坛徽章:
0
3 [报告]
发表于 2007-10-30 15:13 |只看该作者
/var/svn/passwd

gaoyuanapr1$7EmkO/..$qP0uDSMMqHmutd99yYEag.
jianxin:YBT1WQJ1IPNAA

密码我用MD5的和不用MD5的,结果都是一样

[ 本帖最后由 pstree 于 2007-10-30 15:15 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2007-10-30 15:13 |只看该作者
httpd.conf

ServerRoot "/usr/local/apache"
PidFile /usr/local/apache/logs/httpd.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 400
KeepAliveTimeout 15
MinSpareServers 50
MaxSpareServers 500
StartServers 50
ServerLimit 586
MaxClients 586
MaxRequestsPerChild 0
User apache
Group apache

Listen 80
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule php5_module        modules/libphp5.so
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

ServerAdmin webmaster@u11.com
ServerName web

DocumentRoot "/usr/local/apache/htdocs"

ErrorLog logs/error_log
HostnameLookups Off

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

<Directory "/usr/local/apache/htdocs">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule dir_module>
    DirectoryIndex index.php
</IfModule>

<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>


LogLevel warn

<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    CustomLog logs/access_log common
    #CustomLog logs/access_log combined
</IfModule>

<IfModule alias_module>
    ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
</IfModule>

<IfModule cgid_module>
    #
    # ScriptSock: On threaded servers, designate the path to the UNIX
    # socket used to communicate with the CGI daemon of mod_cgid.
    #
    #Scriptsock logs/cgisock
</IfModule>

<Directory "/usr/local/apache/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
    TypesConfig conf/mime.types

    #AddType application/x-gzip .tgz
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    #AddHandler cgi-script .cgi

    #AddHandler type-map var

    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>

# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
ErrorDocument 500 "The server made a boo boo."
ErrorDocument 404 /missing.html
ErrorDocument 402 http://www.example.com/subscription_info.html

# Server-pool management (MPM specific)
#Include conf/extra/httpd-mpm.conf

# Multi-language error messages
Include conf/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
#Include conf/extra/httpd-autoindex.conf

# Language settings
#Include conf/extra/httpd-languages.conf

AddDefaultCharset utf-8

# User home directories
#Include conf/extra/httpd-userdir.conf

# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf

# Various default settings
#Include conf/extra/httpd-default.conf

# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

论坛徽章:
0
5 [报告]
发表于 2007-10-30 15:14 |只看该作者
httpd-vhosts.conf


#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
    <Location /svn>
       DAV svn
        SVNParentPath /var/svn/repos
        AuthType Basic
        Satisfy Any
        AuthName "Subversion repository"
        AuthUserFile /var/svn/passwd.txt
        AuthzSVNAccessFile /var/svn/auth
        Require valid-user
    </Location>

论坛徽章:
0
6 [报告]
发表于 2007-10-30 15:16 |只看该作者
谢谢各位老大!!帮我看看哦!!!着急着呢.呵呵!!

论坛徽章:
0
7 [报告]
发表于 2007-10-30 15:23 |只看该作者
下边的活,全因为这个SVN,都进行不下去了.....
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP