yum install -y subversion //安装svn服务端
/url/bin/ //svnadmin的存放目录 ./svnadmin create /home/svnroot/test //创建仓库 svn import file:///home/svnroot/test/ -m 'sss' //导入文件
http://developer.51cto.com/art/201005/201412.htm http://blog.csdn.net/newnewman80/article/details/8109569
http://www.ha97.com/4467.html (可用)
yum install subversion mysql-server httpd mod_dav_svn mod_perl sendmail wget gcc-c++ make unzip perl* ntsysv vim-enhanced
CentOS搭建Nginx+Subversion环境
server { listen 80; server_name XXXX.com; index index.html index.htm index.php; root /var/svndata; location ~ .*$ { proxy_pass http://127.0.0.1:802; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } #access_log /data1/logs/svn.log alog; }
vim /etc/httpd/conf/httpd.conf
LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so <Location /aj123> DAV svn #SVNListParentPath on #SVNParentPath /opt/svn123 SVNPath /opt/svn123/aj123 AuthType Basic AuthName "Authorization Realm" # AuthUserFile /opt/svn123/aj123/conf/passwd AuthUserFile /etc/svn-auth-conf # AuthzSVNAccessFile /opt/svn123/aj123/conf/authz AuthzSVNAccessFile /etc/svn-accesspolicy Satisfy Any Require valid-user </Location>
增加用户校验:
htpasswd /etc/svn-auth-conf username,设定密码
新建文件/etc/svn-accesspolicy,文件内容如下:
[groups]
developers = username
[/]
@developers = rw
如果出现浏览器上svn可以访问,而用小乌龟checkout 报错找不到路径
注释掉下面该行代码,因为会出现多少个apache指向的访问地址
DocumentRoot "/var/www/html"
如果小乌龟的checkout http://45.78.xxx.xxx/aj123 用这个还是提示没有找到路径
可以换成 svn://45.78.xxx.xxx/aj123
参考网页:
http://www.server110.com/nginx/201310/2120.html
http://www.opstool.com/article/282
https://www.lixiaodong.com/?p=27 (主)