|
1. 编译安装httpd
# tar xvzf httpd-2.0.54.tar.gz
# cd httpd-2.0.54
# ./configure --enable-dav --enable-so --prefix=/usr/local/apache2/
# make
# make install # /usr/local/apache2/bin/apachectl start & 打开浏览器http://localhost/,测试页出现,已经安装成功
2. 安装Subversion
# tar xvzf Subversion-1.1.4.tar.gz # cd Subversion-1.1.4
# ./configure --with-apxs=/usr/local/apache2/bin/apxs --prefix=/usr/local/subversion
# make
# make install
# mkdir /usr/local/repository
# vi /etc/profile
# export PATH=$PATH:/usr/local/subversion/bin source /etc/profile
# svnadmin create /usr/local /repository/test //创建仓库
/usr/local/repository/test多了些文件,Subversion安装成功.
#svn import [源目录路径] file:///[数据仓库路径] –m ‘note’ //将源目录导入数据仓库
4. 下面来修改apache让subversion和apache一起工作
修改"/usr/local/apache2/conf/httpd.conf" 在最下面添加
LoadModule dav_svn_module modules/mod_dav_svn.so(安装svn后自动添加)
LoadModule authz_svn_module modules/mod_authz_svn.so(安装svn后自动添加)
<Location /svn>
DAV svn
SVNParentPath /usr/local/repository/ //svn父目录
AuthzSVNAccessFile /usr/local/repository/authz.conf //权限配置文件
AuthType Basic //连接类型设置
AuthName "Subversion.zoneyump" //连接框提示
AuthUserFile /usr/local/repository/authfile //用户配置文件
Require valid-user //采用何种认证
</Location>
htpasswd –c /usr/local/repository/authfile john
#/usr/local/apache2/bin/apachectl restart
http://localhost/svn/test
没有访问权限,请高手帮助啊 |
|