SVN是想用来代替CVS的版本管理工具了,好像很多人都比较喜欢用。

软件主页

​http://httpd.apache.org/download.cgi​

​http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260&expandFolder=74​

安装帮助文档   ​​http://svn.collab.net/repos/svn/trunk/INSTALL​​  

svn 使用帮助​​http://www.subversion.org.cn/svnbook/​

--------------------------------------------------------------

安装apache

wget ​​http://apache.mirror.phpchina.com/httpd/httpd-2.2.9.tar.gz​

tar -xzf httpd-2.2.9.tar.gz

./configure --prefix=/dddd/apache --enable-dav --enable-so --enable-maintainer-mode

make

make install

/dddd/apache/bin/httpd -k start

--------------------------

安装 openssl

wget ​​http://www.openssl.org/source/openssl-0.9.8g.tar.gz​

tar xzvf openssl-0.9.8g.tar.gz

./config

make

make install

---------------------------

安装 zlib库, ​​http://www.zlib.net/​

wget ​​http://www.zlib.net/zlib-1.2.3.tar.gz​

tar xzvf zlib-1.2.3.tar.gz

./configure --shared

make

make install

----------------------------

安装 expat     一个xml解释器,不装这个编译时出现 /usr/bin/ld: cannot find -lexpat 错误

wget ​​http://downloads.sourceforge.net/expat/expat-2.0.0.tar.gz​

tar xzvf expat-2.0.0.tar.gz

cd expat-2.0.0

./configure

make

make install

-----------------------------

解压subversion 包

wget ​​http://subversion.tigris.org/downloads/subversion-1.5.0.tar.gz​

tar xzvf subversion-1.5.0.tar.gz

----------------------------------

切换的subversion-1.5.0 目录

这里,我取消serf 和neon 库了,具体解释见帮助文档

cd subversion-1.5.0

./autogen.sh

./configure --with-apxs=/dddd/apache/bin/apxs --with-openssl=/usr/bin/openssl   --without-serf --without-neon --with-apr=/dddd/apache --with-apr-util=/dddd/apache

make

make install

-----------------------------------------

[root@widebright subversion-1.5.0]# svn help

usage: svn <subcommand> [options] [args]

Subversion command-line client, version 1.5.0.

Type 'svn help <subcommand>' for help on a specific subcommand.

Type 'svn --version' to see the program version and RA modules

or 'svn --version --quiet' to see just the version number.

Most subcommands take file and/or directory arguments, recursing

on the directories. If no arguments are supplied to such a

command, it recurses on the current directory (inclusive) by default.

Available subcommands:

add

blame (praise, annotate, ann)

cat

changelist (cl)

checkout (co)

cleanup

commit (ci)

copy (cp)

delete (del, remove, rm)

diff (di)

export

help (?, h)

import

info

list (ls)

lock

log

merge

mergeinfo

mkdir

move (mv, rename, ren)

propdel (pdel, pd)

propedit (pedit, pe)

propget (pget, pg)

proplist (plist, pl)

propset (pset, ps)

resolve

resolved

revert

status (stat, st)

switch (sw)

unlock

update (up)

Subversion is a tool for version control.

For additional information, see ​​http://subversion.tigris.org/​

==========================

[root@widebright]# ls /dddd/apache/modules

httpd.exp mod_authz_svn.so mod_dav_svn.so

可以看到 mod_dav_svn 等库已经被复制到 apache的 modules目录了

apache中配置 svn支持,参考文档 ​​http://www.subversion.org.cn/svnbook/1.4/svn.serverconfig.httpd.html#svn.serverconfig.httpd.basic​

安装svn时 , 它已经帮我们把

LoadModule dav_svn_module     modules/mod_dav_svn.so

LoadModule authz_svn_module   modules/mod_authz_svn.so

这两句加到apache的配置文件 httpd.conf 里面去了。

我又在 httpd.conf文件 最后加上

<Location /svn>

DAV svn

SVNPath /ddddd

</Location>

---------------------------------------

新建 svn 版本库

svnadmin create /ddddd     

可以看到他生成了相应的目录

[root@widebrihgt ddddd]# pwd

/ddddd

[root@liu-ps11 ddddd]# ls

conf db format hooks locks README.txt

-----------------------------------

启动服务

svnserve -d -r /ddddd

-----------------------------------

添加文件到 svn 版本库

[root@widebright apache]# svn import include -m "haha widebright"

Adding         include/apu_version.h

Adding         include/util_xml.h

Adding         include/mpm_default.h

Adding         include/apr_sha1.h

Adding         include/http_connection.h

Adding         include/ap_release.h

Adding         include/mod_cgi.h

Adding         include/apr_ring.h

Adding         include/apr_buckets.h

Adding         include/apr_xml.h

Adding         include/apr_dbm.h

Adding         include/apr_getopt.h

Adding         include/apr_inherit.h

Adding         include/apr_ldap_rebind.h

Adding         include/mod_log_config.h

Adding         include/mod_dav.h

Adding         include/apr_portable.h

Adding         include/apu_want.h

Adding         include/apr_support.h

Adding         include/apr_general.h

Adding         include/os.h

Adding         include/apr_ldap.h

Adding         include/apr.h

Adding         include/mod_include.h

Adding         include/util_md5.h

Adding         include/mod_status.h

Adding         include/util_filter.h

Adding         include/apr_global_mutex.h

Adding         include/util_charset.h

Adding         include/apr_sdbm.h

Adding         include/apr_md5.h

Adding         include/apr_strmatch.h

Adding         include/apr_reslist.h

Adding         include/apr_proc_mutex.h

Adding         include/apr_thread_mutex.h

Adding         include/apr_thread_proc.h

Adding         include/apr_pools.h

Adding         include/mod_auth.h

Adding         include/mpm_common.h

Adding         include/apr_uri.h

Adding         include/apr_anylock.h

Adding         include/ap_compat.h

Adding         include/http_config.h

Adding         include/apr_tables.h

Adding         include/apr_signal.h

Adding         include/apr_xlate.h

Adding         include/apr_random.h

Adding         include/scoreboard.h

Adding         include/apr_hooks.h

Adding         include/apr_base64.h

Adding         include/http_request.h

Adding         include/http_core.h

Adding         include/apr_version.h

Adding         include/apr_thread_rwlock.h

Adding         include/apr_optional_hooks.h

Adding         include/util_time.h

Adding         include/apr_dbd.h

Adding         include/apr_mmap.h

Adding         include/apr_rmm.h

Adding         include/http_protocol.h

Adding         include/apr_ldap_init.h

Adding         include/ap_regkey.h

Adding         include/apr_file_io.h

Adding         include/apr_uuid.h

Adding         include/apr_poll.h

Adding         include/ap_mpm.h

Adding         include/ap_provider.h

Adding         include/util_cfgtree.h

Adding         include/apr_thread_cond.h

Adding         include/ap_listen.h

Adding         include/apr_user.h

Adding         include/http_main.h

Adding         include/apu.h

Adding         include/apr_hash.h

Adding         include/apr_md4.h

Adding         include/mod_core.h

Adding         include/apr_optional.h

Adding         include/mod_dbd.h

Adding         include/apr_shm.h

Adding         include/mpm.h

Adding         include/apr_env.h

Adding         include/ap_regex.h

Adding         include/apr_strings.h

Adding         include/apr_file_info.h

Adding         include/apr_time.h

Adding         include/mod_ssl.h

Adding         include/util_script.h

Adding         include/apr_thread_pool.h

Adding         include/http_vhost.h

Adding         include/apr_memcache.h

Adding         include/apr_ldap_url.h

Adding         include/util_ebcdic.h

Adding         include/ap_mmn.h

Adding         include/apr_lib.h

Adding         include/apr_ldap_option.h

Adding         include/apr_want.h

Adding         include/util_ldap.h

Adding         include/ap_config_auto.h

Adding         include/apr_atomic.h

Adding         include/apr_date.h

Adding         include/http_log.h

Adding         include/mod_proxy.h

Adding         include/ap_config_layout.h

Adding         include/apr_network_io.h

Adding         include/apr_fnmatch.h

Adding         include/apr_allocator.h

Adding         include/httpd.h

Adding         include/ap_config.h

Adding         include/apr_queue.h

Adding         include/unixd.h

Adding         include/apr_dso.h

Adding         include/apr_errno.h

Committed revision 1.

-------------------------------------

启动apache

/dddd/apache/bin/apachectl start

可以看到svn和apache已经可以正常协同合作了。版本库中的文件可以正确的在浏览器中显示出来。

在redhat 上面编译安装配置svn的apache网页支持_.net