linux 构建subversion服务器

来源:互联网 发布:mp4高清播放软件 编辑:程序博客网 时间:2024/05/15 12:55

首先准备工作是得先安装好apr、apr-util、openssl以及SQLite,这些可以下载源代码包进行安装,在这里就不用多说了

 

  • 安装apache2

 ./configure --prefix=/app/apache/ --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr/ --enable-maintainer-mode --enable-ssl --enable-mods-shared=all --with-system-libtool

--enable-mods-shared=all一定要shared包,否则static安装不能使用subversion

  • 安装subversion server

 

   sudo ./configure --enable-maintainer-mode   --with-apxs=/app/apache/bin/apxs --prefix=/app/subversion --with-apr=/app/apache/ --with-apr-util=/usr/local/apr/ --with-ssl

 

如果出现如下问题:

/usr/bin/ld: cannot find -lexpat Ubuntu的解决方法是sudo apt-get install libexpat-dev

make && make install

  • 创建仓库

 mkdir  /data

创建测试

/app/subversion/bin/svnadmin create /data/test

  • 配置apache的httpd.conf

在类似有这样句式的位置添加

LoadModule dav_svn_module modules/mod_dav_svn.so

LoadModule authz_svn_module modules/mod_authz_svn.so 如果没有自动添加上的话

本例中采用虚拟主机的方式配置

http_vhost.conf配置如下

NameVirtualHost 200.200.200.168:80
<VirtualHost 200.200.200.168:80>
<Location />
    DAV svn
    SVNListParentPath on                  监听父目录
    SVNParentPath /data/                  使用父目录方式
    #AuthType Basic
    #AuthName "Subversion repository"
   # AuthUserFile /data/authfile
    #AuthzSVNAccessFile /data/authz.conf
    #Require valid-user
</Location>
    ErrorLog "logs/svn_error_log"
    CustomLog "logs/svn_access_log" common
</VirtualHost>

到这里只是能够简单的配置通subversion,未完待续

原创粉丝点击