- [users]
- luowei = luowei
- zhangyp = zyp
- [groups]
- admin = luowei,zhangyp
- [/]
- @admin = rw
- * =
- [general]
- anon-access = none
- auth-access = write
- password-db = /data/svn/project/conf/passwd
- authz-db = /data/svn/project/conf/authz
- #!/usr/bin/perl
- #
- use warnings;
- use strict;
- #open the svn passwd file
- open (FILE, "passwd") or die ("Cannot open the passwd file!!!n");
- #clear the apache passwd file
- open (OUT_FILE, ">webpasswd") or die ("Cannot open the webpasswd file!!!n");
- close (OUT_FILE);
- #begin
- foreach (<FILE>) {
- if($_ =~ m/^[^#].*=/)
- { $_ =~ s/=//;
- `htpasswd -b webpasswd $_`;
- }
- }
# chown -R apache.apache /data/svn/project/ 重啓apache服務:# service httpd restart
- <Location /project>
- DAV svn
- SVNPath /data/svn/project/
- AuthType Basic
- AuthName "svn for project"
- AuthUserFile /data/svn/project/conf/webpasswd
- AuthzSVNAccessFile /data/svn/project/conf/authz
- Satisfy all
- Require valid-user
- </Location>
- SSLCertificateFile /etc/httpd/conf/httpd.pem
- SSLCertificateKeyFile /etc/httpd/conf/httpd.key
- <Directory />
- Options FollowSymLinks
- AllowOverride None
- SSLRequireSSL //添加這一行
- </Directory>
- # tar xvf Module-Build-0.36_11.tar.gz
- # cd Module-Build-0.36_11
- # perl Build.PL
- # ./Build
- # ./Build test
- # ./Build install
- # cd ..
- # tar xvf Authen-SASL-2.15.tar.gz
- # cd Authen-SASL-2.15
- # perl Makefile.PL
- # make test
- # make install
- # cd ..
- # tar xvf Net-SMTP_auth-0.08.tar.gz
- # cd Net-SMTP_auth-0.08
- # perl Makefile.PL
- # make test
- # make install
- # cd ..
- # tar xvf SVN-Notify-2.80.tar.gz
- # cd SVN-Notify-2.80
- # perl Build.PL
- # ./Build
- # ./Build test
- # ./Build install
- # cd ..
- #!/bin/sh
- REPOS="$1"
- REV="$2"
- cat >/tmp/userlist<<EOF
- luoweiro@126.com
- wei.luo@baisonmail.com
- EOF //添加郵件通知的列表
- IFS=$'\n'
- for LINE in `cat /tmp/userlist`;do
- /usr/bin/svnnotify --repos-path "$1" --revision "$2" --to $LINE --from 282127408@qq.com --handler "HTML::ColorDiff" --with-diff --smtp localhost --smtp-user root --smtp-pass 5201314318 -c "UTF-8" -g zh_CN -O raw --svnlook /usr/bin/svnlook --subject-prefix '[SVN UPDATE]'
- done
- # rpm -ivh jre-6u20-linux-i586.rpm
- # wget http://downloads.sourceforge.net/project/svnstat/svnstat/Release-1.0/SvnStat-1.0.zip?use_mirror=jaist
- # unzip SvnStat-1.0.zip
- # svn log project -v --xml --non-interactive > project.log
- # cd SvnStat-1.0
- # java -classpath SvnStat-all.jar de.agentlab.svnstat.SvnStat -jar SvnStat-all.jar -r /root/project.log -d /var/www/html/
- # unzip statsvn-0.7.0.zip
- # cd statsvn-0.7.0
- # mkdir /var/www/html/statsvn
- # java -jar statsvn.jar -verbose -output-dir /var/www/html/statsvn/ /root/project.log /root/project
到此配置完成! html