1、系统为linux
相关软件为;apr-1.3.6.tar.gz、 apr-util-1.3.8.tar.gz 、subversion-1.6.3.tar.gz、subversion-deps-1.6.3.tar.gz
httpd-2.2.15.tar.gz
2、解压安装:
tar -zxvf httpd-2.2.15.tar.gz
cd httpd-2.2.15
./configure --prefix=/usr/local/apache --enable-so --enable-modules=most --enable-dav --with-included-apr --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config --enable-maintainer-mode
make; make install
tar -zxvf apr-1.3.6.tar.gz
cd apr-1.3.6
ls
./configure
make; make install
tar -zxvf apr-util-1.3.8.tar.gz
cd apr-util-1.3.8
./configure --with-apr=/usr/local/apr
make ; make install
tar -zxvf apr-1.3.6.tar.gz
cd apr-1.3.6
ls
./configure
make; make install
tar -zxvf subversion-1.6.3.tar.gz
tar -zxvf subversion-deps-1.6.3.tar.gz
cd subversion-deps-1.6.3.tar.gz
./configure --prefix=/usr/local/svn --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config --with-ssl --with-zlib=/usr/lib --enable-maintainer-mode
make; make install
useradd svnroot
passwd svnroot
2、相关配置及配置文件
mkdir -p /svn/repository
/usr/local/apache/bin/htpasswd -c /svn/repository/user
以后建SVN库用:su - svnroot
svnadmin create /svn/repository/test
加用户为htpasswd /svn/repository/user test1
删除用户为htpasswd -D user test1
access.conf
[groups]
admin=test, test2
test = test, test2
[/]
@admin=rw
test = rw
2、httpd.conf
切记默认启动项为:
#User daemon
#Group daemon
User svnroot
Group svnroot
否则可能会出现权限问题报错.
<Location /svn/>
DAV svn
SVNListParentPath on
SVNParentPath /SVN/repository/
AuthzSVNAccessFile /SVN/repository/access.conf
AuthType Basic
AuthName "CBCV SVN"
AuthUserFile /SVN/repository/user
Require valid-user
#Order Deny,Allow
#Deny from all
#Allow from CBCV.net
</Location>
报错转载:
附:安装过程中遇到的问题
1. 编译subversion时出现少expat库
解决:下载expat-2.0.0.tar.gz安装皆可
2. 安装subversion时,编译到会出现一段
configure: WARNING: we have configured without BDB filesystem support
大概是不能创建db格式的版本库
解决:这个没什么关系,一般不会有多大影响
3. 安装subversion时,make没问题,make install时出现
/usr/local/src/subversion-1.5.2/subversion/svnversion/.libs/lt-svnversion: error while loading shared libraries: libexpat.so.1: cannot open shared object file: No such file or directory
意思是找不到libexpat.so.1这个文件
运行 whereis libexpat.so.1
libexpat.so: /lib/libexpat.so.0 /usr/local/lib/libexpat.so /usr/local/lib/libexpat.so.1
解决:vi /etc/ld.so.conf
加入libexpat.so.1的目录 /usr/local/lib/ 保存退出
运行ldconfig
本人遇到此报错:原来是直接把/usr/local/lib保存到/etc/ld.so.conf中.再运行ldconfig
4. 安装好了后,浏览器打开http://服务器ip/svn,登陆出现不了页面,出现:
<D:error> <C:error/> <m:human-readable errcode="2"> Could not open the requested SVN filesystem </
|