标签:style blog http color os io 文件 for
分别安装Apache subversion
http://my.oschina.net/u/234018/blog/297849
http://my.oschina.net/u/234018/blog/298292
修改apache 配置
2.1 mod_authz_svn.so 和 mod_dav_svn.so 复制到apache /usr/local/apache/modules/
[root@localhost libexec]# cd /usr/local/subversion/libexec/ [root@localhost libexec]# ll 总用量 3968 -rwxr-xr-x 1 root root 197099 8月 5 13:55 mod_authz_svn.so -rwxr-xr-x 1 root root 3860365 8月 5 13:55 mod_dav_svn.so cp /usr/local/subversion/libexec/mod_authz_svn.so /usr/local/apache/modules/ cp /usr/local/subversion/libexec/mod_dav_svn.so /usr/local/apache/modules/
2.2 修改配置httpd.conf文件
去掉注释 LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so 新加 LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so 文件尾加上这个 <Location /home/devtac/svn/case> DAV svn SVNPATH /home/devtac/svn/case </Location>
PS: 一定要检查/usr/local/apache/modules/里有没有对应的.so 文件
apache 配置到此结束
3 subversion 配置
3.1 导出资源库到apache web目录下
svn checkout --username=admin --password=admin file:///home/devtac/svn/case/ /usr/local/apache/htdocs/
3.2 修改hook文件
[root@localhost modules]# cd /home/devtac/svn/case/hooks/ [root@localhost hooks]# pwd /home/devtac/svn/case/hooks [root@localhost hooks]# ll 总用量 40 -rwxrwxrwx 1 root root 2215 8月 6 10:32 post-commit -rw-r--r-- 1 root root 1977 8月 5 16:36 post-commit.tmpl -rw-r--r-- 1 root root 1638 8月 5 16:36 post-lock.tmpl -rw-r--r-- 1 root root 2289 8月 5 16:36 post-revprop-change.tmpl -rw-r--r-- 1 root root 1567 8月 5 16:36 post-unlock.tmpl -rw-r--r-- 1 root root 3426 8月 5 16:36 pre-commit.tmpl -rw-r--r-- 1 root root 2410 8月 5 16:36 pre-lock.tmpl -rw-r--r-- 1 root root 2786 8月 5 16:36 pre-revprop-change.tmpl -rw-r--r-- 1 root root 2100 8月 5 16:36 pre-unlock.tmpl -rw-r--r-- 1 root root 2780 8月 5 16:36 start-commit.tmpl cp post-commit.tmpl post-commit post-commit 文件尾加上 SVN=/usr/local/subversion/bin/svn #svn command directory WEB=/usr/local/apache/htdocs #apache htdoc directory $SVN update --username admin --password admin $WEB 文件修改结束 赋予执行权限 chmod 777 post-commit
svn 配置修改完毕
3.2 执行post-commit 报错
svn: E155036: Please see the ‘svn upgrade‘ command
svn: E155036: The working copy at ‘E:\we‘
is too old (format 10) to work with client version ‘1.8.9 (r1591380)‘ (expects f
ormat 31). You need to upgrade the working copy first.
方法:
[root@localhost hooks]# cd /usr/local/apache/htdocs/
[root@localhost htdocs]# /usr/local/subversion/bin/svn upgrade
然后在执行 post-commit 就好了
源码安装 linux apache 集成 subversion 初探,布布扣,bubuko.com
源码安装 linux apache 集成 subversion 初探
标签:style blog http color os io 文件 for
原文地址:http://my.oschina.net/u/234018/blog/298473