1 有旧低版本的,建议先强制删除掉
wget
./configure --prefix=$HOME/apr
make
make install
wget
./configure --with-apr=$HOME/apr --prefix=$HOME/apr-utl
make
make install
2 wget
./configure --enable-dav --enable-dav-fs --prefix=$HOME/httpd
make
make install
3 wget
./configure --prefix=$HOME/sqlite
有旧低版本的sqlite建议先强制删除掉
4 wget neon-0.29.6.tar.gz
tar zxf neon/neon-0.29.6.tar.gz -C neon
./configure --prefix=$HOME/neon
5. download svn serverwget
tar zxf subversion/subversion-1.7.5.tar.gz
./configure --with-apxs=$HOME/httpd/bin/apxs \
--with-sqlite=$HOME/sqlite \
--with-apr=$HOME/apr \
--with-apr-util=$HOME/apr-utl \
--with-neon=$HOME/neon \
--with-ssl \
--without-berkeley-db \
--prefix=$HOME/svn
make
make install
6 验证各个模块确认需要的apache模块产生了
find $HOME/httpd -name mod_dav_svn.so
find $HOME/httpd -name mod_authz_svn.so
确认svn客户端的模块都有了
svn --version
确认有ra_neon, ra_svn ,ra_local 三個modules
7 初始化repositorymkdir -p $HOME/data/
svnadmin create $HOME/data/
svn import httpd/conf file://$HOME/data -m "New repository test"
svn list file://$HOME/data
8 安装各个依赖软件的共享库echo "$HOME/sqlite/lib" >> SVN.conf
echo "$HOME/apr/lib" >> SVN.conf
echo "$HOME/apr-lib/lib" >> SVN.conf
echo "$HOME/httpd/lib" >> SVN.conf
echo "$HOME/svn/lib" >> SVN.conf
sudo cat SVN.conf > /etc/ld.so.conf.d/SVN.conf
sudo ldconfig
9 配置编辑httpd.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
确认模块能正确装载
$HOME/httpd/bin/httpd -M
建立用户文件
htpasswd -bcm svn/svn-auth-file svn password123
htpasswd -bm svn/svn-auth-file svnadmin password123
再次编辑httpd.conf
DAV svn 这个URL由DAV模块处理
SVNPath /home/svn/data
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /home/svn/svn/svn-auth-file
Require valid-user
AuthzSVNAccessFile /home/svn/svn/svn-access-file
权限控制文件
cat /home/svn/svn/svn-access-file
[groups]
admin = svnadmin, svn
team1 = svn
team2 = svnadmin
[/]
* = r
@admin = rw
[proj1:/]
@team1 = rw
[proj2:/]
@team2 = rw
10 测试apachectl restart
svn list
在浏览器器上看
一种不用编译的安装方法
系统自带的安装方法
阅读(3797) | 评论(0) | 转发(0) |