SubVersion for repository administrators (using Apache)
In order to create a repository you need to follow these steps (do it with sudo or in a root shell):
Install the needed packages, which are in the Universe repository. For more information on adding repositories, see AddingRepositoriesHowto.
apt-get install subversion
apt-get install libapache2-svn
Create a virtual host in Apache2's configuration file /etc/apache2/apache2.conf and point it to /home/svn. Configuration sniplet:
<Location /faq>
DAV svn
SVNPath /home/svn/faq
AuthType Basic
AuthName "Documentation Team Repository"
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
(Important: Don't use a DocumentRoot setting for this virtual host!")
Restart apache (if needed):
/etc/init.d/apache2 reload
Create the repository:
svnadmin create /home/svn/faq
Create a password file:
htpasswd2 -c /etc/subversion/passwd [username]
Try accessing it:
lynx http://server/faq
(You will not be prompted for credentials. That's normal.)
Try to check out the file:
svn co http://server/faq
Voila. The repository is set up.
SubVersion for repository users
To checkout (=download) the files in the repository for the very first time run this command::
svn co http://server/faq
Don't worry about other people working on the same files. Just do your changes to the files and when you seem to have a stable state (make sure everything works well enough so not everything will break for others) you should check in your work::
svn ci
(Only when committing your changes you will be prompted for your username and password.)
Run the following command regularly to get the changes from other contributors::
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
This type of istallation is used when you want subversion to track your local files but don't want/need to put it on a host. You can create a local repository and access it directly. This repository is not password protected and it's permissions depend on the filesystem's permissions.
Install the needed packages (as root or with sudo):
apt-get install subversion
Create the repository (with your user):
svnadmin create /home/joe/repositorie
The url to your repository is it's path preceeded with file://. For example to checkout you would do the following::
svn co file:///home/joe/repositorie
Resources
* [WWW] Subversion's Official Homepage
* [WWW] Online free book: Version Control with Subversion
*Christoph Haas, Tiago Cogumbreiro*
From JoshBjornson Mon Jan 31 09:52:17 +0000 2005 From: Josh Bjornson Date: Mon, 31 Jan 2005 09:52:17 +0000 Subject: Setup instructions not complete Message-ID: <20050131095217+0000@[WWW] https://www.ubuntulinux.org>
There is one thing missing from the apache setup to get it working properly. "/home/svn" and all files it includes must be accessable by the process that apache runs as, so the following command must be run:
chown -R www-data.www-data /home/svn
https://wiki.ubuntu.com/SubVersion
[wiki]SubVersion
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
- leal
- 帖子: 1119
- 注册时间: 2005-08-29 14:49
- 来自: 杭州
- 联系:
Re: SubVersion
SubVersion之仓库管理员(使用Apache)
要新建一个仓库,你需要遵循下列这些步骤(用sudo或在root shell中执行):
安装所需要的包,位于Universe软件库。添加软件库的详细信息请参见AddingRepositoriesHowto。
apt-get install subversion
apt-get install libapache2-svn
在Apache2配置文件/etc/apache2/apache2.conf中新建一个虚拟主机,并将它指向/home/svn。配置信息节选:
<Location /faq>
DAV svn
SVNPath /home/svn/faq
AuthType Basic
AuthName "Documentation Team Repository"
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
(重要提示:不要对这个虚拟主机使用DocumentRoot设置!)
重启apache(如果需要):
/etc/init.d/apache2 reload
创建仓库:
svnadmin create /home/svn/faq
创建密码文件:
htpasswd2 -c /etc/subversion/passwd [username]
试试能否访问它:
lynx http://server/faq
(可能并未提示你要求输入认证信息。这是正常情况。)
尝试检出文件:
svn co http://server/faq
Voila(看),仓库就这么建起来了。
要新建一个仓库,你需要遵循下列这些步骤(用sudo或在root shell中执行):
安装所需要的包,位于Universe软件库。添加软件库的详细信息请参见AddingRepositoriesHowto。
apt-get install subversion
apt-get install libapache2-svn
在Apache2配置文件/etc/apache2/apache2.conf中新建一个虚拟主机,并将它指向/home/svn。配置信息节选:
<Location /faq>
DAV svn
SVNPath /home/svn/faq
AuthType Basic
AuthName "Documentation Team Repository"
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
(重要提示:不要对这个虚拟主机使用DocumentRoot设置!)
重启apache(如果需要):
/etc/init.d/apache2 reload
创建仓库:
svnadmin create /home/svn/faq
创建密码文件:
htpasswd2 -c /etc/subversion/passwd [username]
试试能否访问它:
lynx http://server/faq
(可能并未提示你要求输入认证信息。这是正常情况。)
尝试检出文件:
svn co http://server/faq
Voila(看),仓库就这么建起来了。
上次由 leal 在 2005-10-11 13:57,总共编辑 3 次。
- leal
- 帖子: 1119
- 注册时间: 2005-08-29 14:49
- 来自: 杭州
- 联系:
SubVersion之仓库使用者
开天荒的第一次从仓库检出(即下载)文件,只需运行这个命令::
svn co http://server/faq
别担心正在编辑同一些文件的其他人。只管自己对这些文件进行变更,当你觉得已经达到稳定状态时(确保一切工作良好,且不会影响其他人所做变动Need Improvement),你应该检入自己所做的工作::
svn ci
(只有当你提交自己所做的变更时,才会提示你输入用户名和密码。)
定期运行如下命令以获取其他贡献者所做的变更::
svn update
如果你要在仓库中添加新文件::
svn add [filename]
获取已变更文件的状态::
svn stat
开天荒的第一次从仓库检出(即下载)文件,只需运行这个命令::
svn co http://server/faq
别担心正在编辑同一些文件的其他人。只管自己对这些文件进行变更,当你觉得已经达到稳定状态时(确保一切工作良好,且不会影响其他人所做变动Need Improvement),你应该检入自己所做的工作::
svn ci
(只有当你提交自己所做的变更时,才会提示你输入用户名和密码。)
定期运行如下命令以获取其他贡献者所做的变更::
svn update
如果你要在仓库中添加新文件::
svn add [filename]
获取已变更文件的状态::
svn stat
上次由 leal 在 2005-10-11 13:58,总共编辑 1 次。
- leal
- 帖子: 1119
- 注册时间: 2005-08-29 14:49
- 来自: 杭州
- 联系:
SubVersion之本地仓库
如果你想用subversion跟踪你的本地文件且不想或不需将其置于主机(host)上,那么可以使用这种安装方法。你可以创建一个本地仓库,然后直接访问它。这个仓库不受密码保护,其权限由文件系统的权限决定。
安装必需的包(以root或使用sudo):
apt-get install subversion
创建仓库(用自己的用户):
svnadmin create /home/joe/repositorie
你的仓库url便是上述路径前面再加上file://。例如,如要检出,你应这么做::
svn co file:///home/joe/repositorie
资源
* [WWW] Subversion官方主页
* [WWW] 在线自由书籍:Version Control with Subversion(使用Subversion进行版本控制)
*Christoph Haas, Tiago Cogumbreiro*
From JoshBjornson Mon Jan 31 09:52:17 +0000 2005 From: Josh Bjornson Date: Mon, 31 Jan 2005 09:52:17 +0000 Subject: Setup instructions not complete Message-ID: <20050131095217+0000@[WWW] https://www.ubuntulinux.org>
在apache安装中,若要使其正确工作,还少一件事。"/home/svn"和其内的所有文件必须是apache运行时的进程可访问的,因此必须运行如下命令:
chown -R www-data.www-data /home/svn
https://wiki.ubuntu.com/SubVersion
如果你想用subversion跟踪你的本地文件且不想或不需将其置于主机(host)上,那么可以使用这种安装方法。你可以创建一个本地仓库,然后直接访问它。这个仓库不受密码保护,其权限由文件系统的权限决定。
安装必需的包(以root或使用sudo):
apt-get install subversion
创建仓库(用自己的用户):
svnadmin create /home/joe/repositorie
你的仓库url便是上述路径前面再加上file://。例如,如要检出,你应这么做::
svn co file:///home/joe/repositorie
资源
* [WWW] Subversion官方主页
* [WWW] 在线自由书籍:Version Control with Subversion(使用Subversion进行版本控制)
*Christoph Haas, Tiago Cogumbreiro*
From JoshBjornson Mon Jan 31 09:52:17 +0000 2005 From: Josh Bjornson Date: Mon, 31 Jan 2005 09:52:17 +0000 Subject: Setup instructions not complete Message-ID: <20050131095217+0000@[WWW] https://www.ubuntulinux.org>
在apache安装中,若要使其正确工作,还少一件事。"/home/svn"和其内的所有文件必须是apache运行时的进程可访问的,因此必须运行如下命令:
chown -R www-data.www-data /home/svn
https://wiki.ubuntu.com/SubVersion
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
-
- 帖子: 29
- 注册时间: 2005-11-04 1:19
下面是我的source.list,难道是这里没有?
代码: 全选
deb cdrom:[Ubuntu 5.10 _Breezy Badger_ - Release i386 (20051012)]/ breezy main restricted
deb http://us.archive.ubuntu.com/ubuntu breezy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu breezy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu breezy-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu breezy-updates main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://us.archive.ubuntu.com/ubuntu breezy universe
# deb-src http://us.archive.ubuntu.com/ubuntu breezy universe
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us.archive.ubuntu.com/ubuntu breezy-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu breezy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu breezy-security main restricted
deb-src http://security.ubuntu.com/ubuntu breezy-security main restricted
# deb http://security.ubuntu.com/ubuntu breezy-security universe
# deb-src http://security.ubuntu.com/ubuntu breezy-security universe
- millenniumdark
- 论坛版主
- 帖子: 4159
- 注册时间: 2005-07-02 14:41
- 系统: Ubuntu 14.04 (Kylin)
- 联系: