SVN 骑猪看日落 2022-05-10 15:40 143阅读 0赞 sudo apt-get install subversion libapache2-svn sudo svnadmin create /svn $ sudo chown -R root:subversion svn $ sudo chmod -R g+rws svn sudo gedit /etc/apache2/mods-enabled/dav\_svn.conf \# dav\_svn.conf - Example Subversion/Apache configuration \# \# For details and further options see the Apache user manual and \# the Subversion book. \# \# NOTE: for a setup with multiple vhosts, you will want to do this \# configuration in /etc/apache2/sites-available/\*, not here. \# <Location URL> ... </Location> \# URL controls how the repository appears to the outside world. \# In this example clients access the repository as http://hostname/svn/ \# Note, a literal /svn should NOT exist in your document root. <Location /svn> \# Uncomment this to enable the repository DAV svn \# Set this to the path to your repository SVNParentPath /svn \# Alternatively, use SVNParentPath if you have multiple repositories under \# under a single directory (/var/lib/svn/repo1, /var/lib/svn/repo2, ...). \# You need either SVNPath and SVNParentPath, but not both. \#SVNParentPath /svn \# Access control is done at 3 levels: (1) Apache authentication, via \# any of several methods. A "Basic Auth" section is commented out \# below. (2) Apache <Limit> and <LimitExcept>, also commented out \# below. (3) mod\_authz\_svn is a svn-specific authorization module \# which offers fine-grained read/write access control for paths \# within a repository. (The first two layers are coarse-grained; you \# can only enable/disable access to an entire repository.) Note that \# mod\_authz\_svn is noticeably slower than the other two layers, so if \# you don't need the fine-grained control, don't configure it. \# Basic Authentication is repository-wide. It is not secure unless \# you are using https. See the 'htpasswd' command to create and \# manage the password file - and the documentation for the \# 'auth\_basic' and 'authn\_file' modules, which you will need for this \# (enable them with 'a2enmod'). AuthType Basic AuthName "Subversion Repository" \#AuthUserFile /etc/apache2/dav\_svn.passwd AuthUserFile /svn/svn1/conf/passwd \# To enable authorization via mod\_authz\_svn \# AuthzSVNAccessFile /etc/apache2/dav\_svn.authz \# AuthzSVNAccessFile /svn/svn1/conf/authz \# The following three lines allow anonymous read, but make \# committers authenticate themselves. It requires the 'authz\_user' \# module (enable it with 'a2enmod'). <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location> > The DAV line needs to be uncommented to enable the dav module > \# Uncomment this to enable the repository, > DAV svn The SVNPath line should be set to the same place your created the repository with the svnadmin command. > \# Set this to the path to your repository > SVNPath /svn The next section will let you turn on authentication. This is just basic authentication, so don't consider it extremely secure. The password file will be located where the AuthUserFile setting sets it to… probably best to leave it at the default. > \# Uncomment the following 3 lines to enable Basic Authentication > AuthType Basic > AuthName "Subversion Repository" > AuthUserFile /etc/apache2/dav\_svn.passwd To create a user on the repository use, the following command: sudo htpasswd2 -cm /etc/apache2/dav\_svn.passwd geek New password: Re-type new password: Adding password for user geek This installs the apache2-mpm-worker package, which is now preferred over the older apache2-mpm-prefork apt-get install apache2 apache2-doc file lynx sudo /etc/init.d/apache2 restart svn co svn ci svn update If you want to add new files to the repository:: svn add \[filename\] To get a status of which files have changed:: svn stat SubVersion for local repositories Ubuntu feisty中的apache2安装包有BUG,安装后缺少apache2-ssl-certificate命令,这样如果我们要启用apache的ssl服务,就生成不了站点证书 可以通过自己编译apache2源码来安装,安装方法如下: wget http://librarian.launchpad.net/6917265/files.tar tar xvf files.tar 然后安装Apache2 deb源代码及相关编译依赖包,然后编译安装apache2: sudo apt-get build-dep apache2 sudo apt-get source -d apache2 dpkg-source -x apache2_2.2.3-3.2build1.dsc cd apache2-2.2.3 fakeroot debian/rules binary(如果没有安装fakeroot,请先安装) sudo dpkg -i ../*.deb(您也可以选择性的安装您需要的Apache2 deb包) 如果您不愿自己编译,可以到[这里][Link 1]下载编译好的Apache2 Deb包。 这样安装的apache2包含完整的工具,下面我们来配置Apache2 ssl支持: 先生成站点证书: sudo apache2-ssl-certificate -days 365 接着启用Apache2 的ssl模块: sudo a2enmod ssl 增加ssl端口443监听: echo "Listen 443" | sudo tee -a /etc/apache2/ports.conf 创建并启用ssl站点: sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl sudo gedit /etc/apache2/sites-available/ssl 修改其内容,设定对应端口,启用ssl,指定站点证书文件位置等,修改后类似如下: NameVirtualHost *:443 *:443> ServerAdmin webmaster@localhost SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.pem DocumentRoot /var/www/ /> Options FollowSymLinks AllowOverride None > /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all # This directive allows us to have apache2's default start page # in /apache2-default/, but still have / go to the right place # Commented out for Ubuntu #RedirectMatch ^/$ /apache2-default/ > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ "/usr/lib/cgi-bin"> AllowOverride None Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all > ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On Alias /doc/ "/usr/share/doc/" "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 > > 修改default站点配置,指定其端口为80: sudo gedit /etc/apache2/sites-available/default 将其内容前面两行修改为: NameVirtualHost *:80 80> 然后启用上面配置的ssl站点: sudo a2ensite ssl 启动Apache2: sudo /etc/init.d/apache2 start 大功告成,现在您可以使用https://127.0.0.1测试服务是否正常启动,也可以使用以下命令查看apache ssl服务是否启动: netstat -na|grep :443 正常的话您应该可以看到如下的输入: tcp6 0 0 :::443 :::* LISTEN 建立控制用户访问权限的文件svn-access-filename \[svn1:/\] //这表示,仓库svn1的根目录下的访问权限 harry = rw // svn1仓库harry用户具有读和写权限 sally = r // svn1仓库sally用户具有读权限 \[svn2:/\] //svn2仓库根目录下的访问权限 harry = r // harry用户在svn2仓库根目录下只有读权限 sally = // sally用户在 svn2仓库根目录下无任何权限 \[svn2:/src\] //svn2仓库下src目录的访问权限 harry=rw sally=r \[/\] // 这个表示在所有仓库的根目录下 \* = r // 这个表示对所有的用户都具有读权限 \[groups\] // 这个表示群组设置 svn1-developers = harry, sally // 这个表示某群组里的成员 svn2-developers = sally \[svn1:/\] @svn1-developers = rw // 如果在前面加上@符号,则表示这是个群组权限设置 然后修改httpd.conf配置: <Location /svn> DAV svn SVNParentPath /svn AuthType Basic AuthName “Subversion repository” AuthUserFile /svn-auth-filename (保存用户名和密码) Require valid-user AuthzSVNAccessFile /svn-access-filename(保存用户访问的权限策略) </Location> [Link 1]: http://labs.eshangrao.com/files/apache2
相关 svn 转自:http://blog.csdn.net/daobantutu/article/details/60467185 搭建SVN服务器详细教程 本教程会从最基本的 小咪咪/ 2022年05月29日 07:47/ 0 赞/ 166 阅读
相关 svn 以下文章转自:http://developer.51cto.com/art/201005/201764.htm 1、在本文的操作过程中如果遇到相关问题。比如命令找不 旧城等待,/ 2022年05月29日 02:46/ 0 赞/ 169 阅读
相关 【SVN】SVN初识 <table> <tbody> <tr> <td><font> SVN 介绍</font></td> </tr> </tbody> </table 港控/mmm°/ 2022年05月16日 05:26/ 0 赞/ 203 阅读
相关 SVN sudo apt-get install subversion libapache2-svn sudo svnadmin create /svn $ s 骑猪看日落/ 2022年05月10日 15:40/ 0 赞/ 144 阅读
相关 SVN SVN简介 SVN是Subversion的简称,是一个开放源代码的版本控制系统,相较于RCS、CVS,它采用了分支管理系统,它的设计目标就是取代CVS。互联网上很多版本控 た 入场券/ 2022年04月23日 22:24/ 0 赞/ 191 阅读
相关 SVN 一、准备工作 1. Subversion服务器程序 先到官方网站上下载最新版本,\[url\]http://subversion.tigris.org/se 水深无声/ 2022年04月14日 04:21/ 0 赞/ 188 阅读
相关 svn apache产品,下载https://www.visualsvn.com/downloads/ ![1382212-20190411223038268-2119141780 曾经终败给现在/ 2022年01月06日 04:41/ 0 赞/ 253 阅读
相关 svn 安装svn 1. 客户端 [客户端][Link 1] ![1250855-20190722160356912-317256987.png][] [服务器端] 旧城等待,/ 2021年11月09日 22:06/ 0 赞/ 265 阅读
相关 svn 1.装包配置conf目录下authz passwd svnserve.conf三个配置文件,配置规则登录用户名和权限。 2.svn import . file:///var/ 女爷i/ 2021年10月30日 04:48/ 0 赞/ 284 阅读
相关 SVN 版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/maplejaw_/article/details/52874 约定不等于承诺〃/ 2021年09月18日 01:20/ 0 赞/ 339 阅读
还没有评论,来说两句吧...