Linux 学习
来源:互联网 发布:康拉德格拉夫钢琴 知乎 编辑:程序博客网 时间:2024/05/20 08:21
- 安装 SVN
- 安装 Apache
- 整合
- 遇到问题
对于需要使用 SVN的用户来说,如果想要搭建一个自己的版本控制,SVN相对于GIT 来说简单很多。
之前写了一个只搭建 SVN的教程,链接:Ubuntu学习 - SVN服务搭建
- SVN 的默认端口是:3690 有的服务器不给开这个端口
- 单独只搭建 SVN是无法用网页打开查看 SVN项目的。
安装 SVN
sudo apt-get install subversion //创建项目目录mkdir ~/svncd svn/svnadmin create new_projectcd ../sudo chown -R www-data:www-data ./svn
安装 Apache
安装:
sudo apt-get install apache2
整合
- 安装模块
sudo apt-get install libapache2-svn sudo apt-get install apache2-utils
- 修改配置
sudo vim /etc/apache2/mods-available/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 #SVNPath /var/lib/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 /home/alps/repository # 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 /home/alps/repository/slowtech/conf/passwd # To enable authorization via mod_authz_svn (enable that module separately): #<IfModule mod_authz_svn.c> #AuthzSVNAccessFile /etc/apache2/dav_svn.authz #</IfModule> # 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>
其中Location /svn
这里是要访问的地址后缀。
AuthUserFile //这个是 passwd文件
然后添加一个用户:
sudo htpasswd ~/svn/new_project/conf/passwd alps//要求输入密码
会在 passwd
的文件里生成用户名和你刚才输入的密码
- 重启 apache2
sudo apachectl restart
- 打开 http://localhost/svn
遇到问题
<D:error xmlns:D="DAV:" xmlns:m="http://apache.org/dav/xmlns" xmlns:C="svn:"><C:error/><m:human-readable errcode="13">Could not open the requested SVN filesystem</m:human-readable></D:error>
这个错误首先看配置文件是否有错。
然后看文件夹的权限配置是否有错。
参考:StackOverflow Ubuntu + SVN: Could not open the requested SVN filesystem
阅读全文
0 0
- Linux学习
- 学习linux
- LINUX学习.....
- 学习Linux
- LINUX学习
- linux 学习
- LINUX学习
- Linux学习
- 学习linux
- linux学习
- linux学习!
- LInux学习
- 学习linux
- Linux学习
- linux 学习
- linux 学习
- 学习Linux
- 学习Linux
- 解决jsp无法读入css、js等文件的问题
- C++中利用类名动态创建对象【反射写法】
- 计算机术语 编程和语言
- Python语法备忘(I)
- 怎么解决VMware“该虚拟机似乎正在使用中”问题
- Linux 学习
- 计算机术语 网络
- Dorado 64位安装所需全部软件
- qt开发环境
- 对现阶段存在并发场景的OD项目相关编码的一些思考
- 在Eclipse中开发C/C++项目
- 计算机设备名称英语词汇(1)
- CodeForce #429 DIV2 A B C题解
- 设计模式(3) 代理模式 动态代理