ubuntu下安装svn提供HTTP版本管理服务
2009-07-05 00:38
656 查看
一、安装和配置
To install subversion, open a terminal and run the following command:
sudo apt-get install subversion libapache2-svn
We’re going to create the subversion repository in /svn, although you should choose a location that has a good amount of space.
sudo svnadmin create /svn
Next we’ll need to edit the configuration file for the subversion webdav module. You can use a different editor if you’d like.
sudo gedit /etc/apache2/mods-enabled/dav_svn.conf
The Location element in the configuration file dictates the root directory where subversion will be acessible from, for instance: http://www.server.com/svn
<Location /svn>
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
提到/etc/apache2/mods-enabled/dav_svn.conf的配置,要注意的是<Location /svn> 是一个根配置元素,在dav_svn.conf文件的末尾还有个</Location>元素,不过也被注释了,要记得把它uncomment 掉。
To create a user on the repository use, the following command:
sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd <username>
Note that you should only use the -c option the FIRST time that you create a user. After that you will only want to use the -m option, which specifies MD5 encryption of the password, but doesn’t recreate the file.
Example:
sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd geek
New password:
Re-type new password:
Adding password for user geek
Restart apache by running the following command:
sudo /etc/init.d/apache2 restart
Now if you go in your browser to http://www.server.com/svn, you should see that the repository is enabled for anonymous read access, but commit access will require a username.
If you want to force all users to authenticate even for read access, add the following line right below the AuthUserFile line from above. Restart apache after changing this line.
Require valid-user
Now if you refresh your browser, you’ll be prompted for your credentials:
You now have a working subversion server!
二、svn的一些基本操作
http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.tour.importing
三、
安装Apache2
#sudo apt-get install apache2
安装SVN
#sudo apt-get install subversion libapache2-svn
配置Apache2的配置文件 /etc/apache2/mods-available/dav_svn.conf
<Location /svn>
DAV svn
SVNParentPath /opt/svn/repos/
AutoType Basic
AutoName "My Respository"
AutoUserFile /opt/svn/password
Require valid-user
</Location>
创建项目目录
#sudo svnadmin create /opt/svn/repos/myproject
创建用户名和密码
#sudo htpasswd -c /opt/svn/passwd robinhuang (第二次创建可取消-c)
使Apache的某些模块有效
#sudo a2enmod dav dav_fs dav_svn
最后重载Apache
#sudo /etc/init.d/apache2 force-reload
注意:当创建一个项目之后,需要运行以下命令:
#sudo chown -R www-data: /opt/svn/repos
使得该项目的文件能够正常访问。
Install Subversion with Web Access on Ubuntu
This article covers installing subversion with the apache module so that it can be easily accessed from other systems on a public network. If you want a more secure svn server, you could use svnserve+ssh, which isn’t covered in this article.To install subversion, open a terminal and run the following command:
sudo apt-get install subversion libapache2-svn
We’re going to create the subversion repository in /svn, although you should choose a location that has a good amount of space.
sudo svnadmin create /svn
Next we’ll need to edit the configuration file for the subversion webdav module. You can use a different editor if you’d like.
sudo gedit /etc/apache2/mods-enabled/dav_svn.conf
The Location element in the configuration file dictates the root directory where subversion will be acessible from, for instance: http://www.server.com/svn
<Location /svn>
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
提到/etc/apache2/mods-enabled/dav_svn.conf的配置,要注意的是<Location /svn> 是一个根配置元素,在dav_svn.conf文件的末尾还有个</Location>元素,不过也被注释了,要记得把它uncomment 掉。
To create a user on the repository use, the following command:
sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd <username>
Note that you should only use the -c option the FIRST time that you create a user. After that you will only want to use the -m option, which specifies MD5 encryption of the password, but doesn’t recreate the file.
Example:
sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd geek
New password:
Re-type new password:
Adding password for user geek
Restart apache by running the following command:
sudo /etc/init.d/apache2 restart
Now if you go in your browser to http://www.server.com/svn, you should see that the repository is enabled for anonymous read access, but commit access will require a username.
If you want to force all users to authenticate even for read access, add the following line right below the AuthUserFile line from above. Restart apache after changing this line.
Require valid-user
Now if you refresh your browser, you’ll be prompted for your credentials:
You now have a working subversion server!
二、svn的一些基本操作
http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.tour.importing
三、
安装Apache2
#sudo apt-get install apache2
安装SVN
#sudo apt-get install subversion libapache2-svn
配置Apache2的配置文件 /etc/apache2/mods-available/dav_svn.conf
<Location /svn>
DAV svn
SVNParentPath /opt/svn/repos/
AutoType Basic
AutoName "My Respository"
AutoUserFile /opt/svn/password
Require valid-user
</Location>
创建项目目录
#sudo svnadmin create /opt/svn/repos/myproject
创建用户名和密码
#sudo htpasswd -c /opt/svn/passwd robinhuang (第二次创建可取消-c)
使Apache的某些模块有效
#sudo a2enmod dav dav_fs dav_svn
最后重载Apache
#sudo /etc/init.d/apache2 force-reload
注意:当创建一个项目之后,需要运行以下命令:
#sudo chown -R www-data: /opt/svn/repos
使得该项目的文件能够正常访问。
相关文章推荐
- ubuntu14.04下svn版本管理系统的安装及常用命令的使用整理
- ubuntu14.04下svn版本管理系统的安装及常用命令的使用整理
- ubuntu安装 SSH(Secure Shell) 服务以提供远程管理服务
- SVN之版本管理系统安装及svnadmin编码问题-yellowcong
- 用SVN进行版本控制和项目管理的安装配置和使用方法
- ubuntu-11.10-server-i386学习笔记-SVN版本服务器安装
- Ubuntu SVN服务安装笔记
- ubuntu 下图形化版本管理软件RabbitVCS 安装步骤
- Ubuntu 安装多版本JDK --使用update-alternatives 管理多个版本
- (yum方式)CentOS 6.4安装SVN版本管理系统
- Ubuntu 14.04 安装 chkconfig 服务管理程序
- ubuntu 安装svn 版本12.04
- ubuntu上安装并使用nvm管理node版本
- Ubuntu下svn 版本管理客户端工具及常用方法
- windows server 2008R2上安装IIS7(web)服务器,提供网站web服务及管理,架设论坛网站
- ubuntu安装dubbo服务提供
- ubuntu安装opencv及多版本管理
- CentOS安装svn(subversion)版本管理
- 在ubuntu中安装及使用rvm管理ruby版本
- ubuntu 安装SVN版本控制器使用