首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 编程语言 > Java > SubVersion1.4+Apache2.0安装手记
【标  题】:SubVersion1.4+Apache2.0安装手记
【关键字】:SubVersion1.4+Apache2.0
【来  源】:http://blog.csdn.net/Ginger547/archive/2006/10/11/1330356.aspx

SubVersion1.4+Apache2.0安装手记

今天好不容易把SubVersion1.4+Apache2.0环境搭建完毕,这个环境的安装可没有网上传说的那么容易,在这个过程中遇到了不少的问题,以下就是我在安装过程中碰到的问题,我将一一的为大家解释解决的过程。
httpd.exe: Syntax error on line 117 of
C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf:
API module structure `dav_svn_module' in file
C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_dav_svn.so is garbled - perhaps this is not an Apache module DSO?
Note the errors or messages above, and press the <ESC> key to exit.  27...

以上这个问题是我在使用最新版本的Apache2.2版本时候出现的错误,出现这个错误的时候,我也是安装网上的教程来安装的,把该复制的SO,该复制的DLL都复制了,该加的httpd.conf也加了可是无论我怎么重复这个过程,就是没有安装成功,具体参考的文件为一个《Subversion for Windows 安裝指南(繁体)》的文章。最终在查找了大量的e文后发现,是Apache最新版本的问题,所以对最新版本的期望最终放弃。


[Wed Oct 11 15:24:00 2006] [error] (OS 2)系统找不到指定的文件。  : No installed service named "Apache2".
Note the errors or messages above, and press the <ESC> key to exit.  27...
这个错误的是由于在安装的过程中,我设置的管理员的Email地址没有正确的被设置引起的,这个问题的解决也花了很长的时间,一开始并不知道为什么会引起这样的错误,修改httpd.conf,修改的又是上面安装的最新版本的遗留的(我就不明白同样是Apache,为什么2.0和2.2安装出来的路径都是不一致的呢?一个是C:\Program Files\Apache Group\Apache2而另一个是C:\Program Files\Apache Software Foundation\Apache2.2真是奇怪了)。最终找到正确的httpd.conf并把ServerAdmin的EMAIL设置正确后就可以了。

Syntax error on line 198 of C:/Program Files/Apache Group/Apache2/conf/httpd.conf:
ServerAdmin takes one argument, The email address of the server administrator
这是就是上面的问题的具体表现。

Syntax error on line 923 of C:/Program Files/Apache Group/Apache2/conf/httpd.conf:
Invalid command 'DAV', perhaps mis-spelled or defined by a module not included in the server configuration
Note the errors or messages above, and press the <ESC> key to exit.  26...

这个问题的出现更是可恶,我按教程来的可是就是没人说这个DAV模块需要怎么加载啊,实验了好久,终于把问题解决了,解决的办法就是LoadModule dav_module modules/mod_dav.so前面的#去掉。
下面给出一个比较正确的安装过程的连接,其实问题出现不要害怕,只要多google一下,多有心看看输出就能搞定了!

Setting Up A Server on Windows

This is very easy as there is a Subversion Windows installer here.

This will be an Apache based Subversion server.

Installing Subversion

Download and install Apache 2.0.x (where 'x' is 52 or above) from here and the latest version of Subversion from here. If you are using Windows/XP Service Pack 2 you will have to permit the firewall to allow traffic to Apache on port 80.

These instructions assume that Apache is installed in C:\Program Files\Apache Group\Apache2 and Subversion is installed in C:\Program Files\Subversion. Version 2.0.50 of Apache and 1.0.5 of Subversion were used when writing these instructions.

Provided Apache was installed first the Subversion installer will put all the module files and dll's which are required into the Apache modules and bin directory. The 1.1.1 installer fails to configure Apache correctly (intl.dll is missing) and the httpd service is uninstalled. To recover this open a command prompt, go to your Apache installation directory (C:\Program Files\Apache Group\Apache2\bin) and type Apache -k install. Also copy C:\Program Files\Subversion\bin\intl.dll to C:\Program Files\Apache Group\Apache2\modules. You should then be able to start the Apache service using the Apache Service Monitor which is installed in the task bar.

Creating a Repository

Let's say you want your repository to be in c:\svn\repos, type in these commands in a command prompt:

> mkdir c:\svn
> svnadmin create c:\svn\repos

Configure Apache

Edit the Apache configuration file, follow the Windows menus:

Start/All Programs
/Apache HTTP Server 2.0.50
/Configure Apache Server
/Edit the Apache httpd.conf Configuration File

In the modules section of the file uncomment:

LoadModule dav_fs_module modules/mod_dav_fs.so

The subversion modules will have been added by the installer.

Then at the bottom of the file add:

<Location /svn/repos>
DAV svn
SVNPath c:\svn\repos
</Location>

Now restart Apache by double clicking the Apache Service Monitor icon in the taskbar and click the Restart button. If Apache isn't currently running use the Start button instead.

The Subversion server should be running. Point your browser at http://your.server.name/svn/repos and you should see something like this:

Revision 0: /

Powered by Subversion version 1.0.5 (r9954).

That's it, you now have a fully functional Subversion server.

Securing Your Server

You have a working server but with no user authentication so anyone can use it. This has the knock on effect that the server doesn't know who is making commits and so cannot set the svn:author property on that revision.

http basic authentication

Subversion supports http basic authentication. To use this you need to add the following to the Apache Location directive and restart Apache:

AuthType Basic
AuthName "Subversion Repository"
AuthUserFile c:\passwd\passwords
Require valid-user

Then you must create the passwords file:

> mkdir c:\passwd
> "c:\Program Files\Apache Group\Apache2\bin\htpasswd.exe" -c c:\passwd\passwords username
Automatically using MD5 format.
New password: *******
Re-type new password: *******
Adding password for user username

You don't have to put the password file at this location, change the paths if you would prefer to store it somewhere else. The -c flag creates a new file, to add more users leave out the -c.

Now if you visit the URL http://your.server.name/svn/repos you should be prompted for your user name and password.

Windows Domain Authentication

See hints here.

For more detailed information on configuring Apache and access permissions see
Chapter 6 of the subversion book.

You can find a non-Apache based setup guide at http://excastle.com/blog/archive/2005/05/31/1048.aspx?Pending=true

五子棋网络版JAVA实现(二):【上一篇】
OSWorkFlow入门指南:【下一篇】
【相关文章】
没有相关文章
【随机文章】
  • MD5加密算法简介
  • 病毒 密码7005(Trojan-PSW.Win32.Pcik.a)
  • Spring使用中需要注意的地方
  • Hibernate参考文档-前言
  • 什么是RSS?
  • oracle入门知识之体系结构
  • 隐藏在Windows XP中的28个秘密武器
  • ORACLE 9I 重建 TEMP 表空间
  • 无线局域网标准之比较
  • Linux的资源管理器Kruiser
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.