SVN安装手记-转载
2008-08-29 09:44
288 查看
Subversion适合于规模一般(几十开发人员)的项目代码的版本管理工作。使用体验较VSS、CVS等好,推荐在选择版本管理工具时可以试用一下。
安装Subversion
1 安装svn-1.4.0-setup。
2 将SVN配置成服务。一般情况下,我们将SVN服务安装成可以以windows系统服务的形式在开机时自动运行。但Subversion安装程序还不能把自己安装成windows服务,需要我们自己进行手动安装,方法如下:打开一个DOS命令窗口,执行如下命令:
sc create svnserve binPath= "\"C:\Program Files\Subversion\bin\svnserve.exe\" --service --root d:\svn" DisplayName= "Subversion" depend= Tcpip start= auto
注意在binPath 、 DisplayName、depend、start后的=号要紧跟其后。
其中,sc是windows自带的服务配置程序,参数binPath表示svnserve可执行文件的安装路径,由于路径中的"Program Files"带有空格,因此整个路径需要用双引号引起来。而双引号本身是个特殊字符,需要进行转移,因此在路径前后的两个双引号都需要写成\"
--service参数表示以windows服务的形式运行,--root指明svn repository的位置,service参数与root参数都作为binPath的一部分,因此与svnserve.exe的路径一起被包含在一对双引号当中,而这对双引号不需要进行转义。
displayname表示在windows服务列表中显示的名字, depend= Tcpip 表示svnserve服务的运行需要tcpip服务,start= auto表示开机后自动运行。
安装服务后,svnserve要等下次开机时才会自动运行。若要马上运行服务,则执行net start Subversion即可。
若要卸载svn服务,则执行 sc delete svnserve 即可。
3 安装客户端TortoiseSVN-1.4.0.7501-win32-svn-1.4.0。在SVN服务器上也安装客户端,便于在服务器上对SVN进行配置。
4 安装简体中文语言包LanguagePack-1.4.0.7501-win32-zh_CN。安装完毕后,单击右键,选择Settings...。
Language选择简体中文。
5 在服务器上创建数据仓库。我们在启动服务器时指定了数据仓库的位置: d:\svn。因此,我们在该目录下单击右键,选择TortoiseSVN->在此创建版本库..., 选择本地文件系统。
6 配置用户权限。
使匿名用户无访问权限。只允许认证用户访问。
打开d:\svn\conf\svnserve.conf。修改如下:
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository. (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit http://subversion.tigris.org/ for more information.
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access = none
# auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the conf directory.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file's location is relative to the conf
### directory. If you don't specify an authz-db, no path-based access
### control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository's uuid.
# realm = My First Repository
添加用户robindy,就是我,^_^。密码:520
打开D:\svn\conf\passwd,修改如下:
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
[users]
robindy = 520
建立一个用户组admin,并把我自己加入这个组,赋予这个组中成员读写的权利。^_^,只有我能这个SVN版本库进行操作喽。
打开D:\svn\conf\authz,修改如下:
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to a
### single user, to a group of users defined in a special [groups]
### section, or to anyone using the '*' wildcard. Each definition can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[groups]
admin = robindy
[/]
* = r
@admin = rw
重启Subversion服务后生效。
此外, 经常有朋友问到Subversion是否可以对中文目录进行权限控制,如果可以,该如何配置。
经过测试,发现subversion是可以很好地控制中文目录的权限的。
方法很简单,就是将你的权限控制文件的格式转换为UTF-8格式,
将权限文件改成UTF-8格式我使用的是UltraEdit的菜单"ASCII to UTF-8 (Unicode Editing)"。
7 接下来就可以使用集成于右键菜单的SVN客户端工具对SVN版本库进行操作喽。这些就留给你自己摸索一下吧,很简单的。
祝使用愉快。
安装Subversion
1 安装svn-1.4.0-setup。
2 将SVN配置成服务。一般情况下,我们将SVN服务安装成可以以windows系统服务的形式在开机时自动运行。但Subversion安装程序还不能把自己安装成windows服务,需要我们自己进行手动安装,方法如下:打开一个DOS命令窗口,执行如下命令:
sc create svnserve binPath= "\"C:\Program Files\Subversion\bin\svnserve.exe\" --service --root d:\svn" DisplayName= "Subversion" depend= Tcpip start= auto
注意在binPath 、 DisplayName、depend、start后的=号要紧跟其后。
其中,sc是windows自带的服务配置程序,参数binPath表示svnserve可执行文件的安装路径,由于路径中的"Program Files"带有空格,因此整个路径需要用双引号引起来。而双引号本身是个特殊字符,需要进行转移,因此在路径前后的两个双引号都需要写成\"
--service参数表示以windows服务的形式运行,--root指明svn repository的位置,service参数与root参数都作为binPath的一部分,因此与svnserve.exe的路径一起被包含在一对双引号当中,而这对双引号不需要进行转义。
displayname表示在windows服务列表中显示的名字, depend= Tcpip 表示svnserve服务的运行需要tcpip服务,start= auto表示开机后自动运行。
安装服务后,svnserve要等下次开机时才会自动运行。若要马上运行服务,则执行net start Subversion即可。
若要卸载svn服务,则执行 sc delete svnserve 即可。
3 安装客户端TortoiseSVN-1.4.0.7501-win32-svn-1.4.0。在SVN服务器上也安装客户端,便于在服务器上对SVN进行配置。
4 安装简体中文语言包LanguagePack-1.4.0.7501-win32-zh_CN。安装完毕后,单击右键,选择Settings...。
Language选择简体中文。
5 在服务器上创建数据仓库。我们在启动服务器时指定了数据仓库的位置: d:\svn。因此,我们在该目录下单击右键,选择TortoiseSVN->在此创建版本库..., 选择本地文件系统。
6 配置用户权限。
使匿名用户无访问权限。只允许认证用户访问。
打开d:\svn\conf\svnserve.conf。修改如下:
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository. (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit http://subversion.tigris.org/ for more information.
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access = none
# auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the conf directory.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file's location is relative to the conf
### directory. If you don't specify an authz-db, no path-based access
### control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository's uuid.
# realm = My First Repository
添加用户robindy,就是我,^_^。密码:520
打开D:\svn\conf\passwd,修改如下:
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
[users]
robindy = 520
建立一个用户组admin,并把我自己加入这个组,赋予这个组中成员读写的权利。^_^,只有我能这个SVN版本库进行操作喽。
打开D:\svn\conf\authz,修改如下:
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to a
### single user, to a group of users defined in a special [groups]
### section, or to anyone using the '*' wildcard. Each definition can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[groups]
admin = robindy
[/]
* = r
@admin = rw
重启Subversion服务后生效。
此外, 经常有朋友问到Subversion是否可以对中文目录进行权限控制,如果可以,该如何配置。
经过测试,发现subversion是可以很好地控制中文目录的权限的。
方法很简单,就是将你的权限控制文件的格式转换为UTF-8格式,
将权限文件改成UTF-8格式我使用的是UltraEdit的菜单"ASCII to UTF-8 (Unicode Editing)"。
7 接下来就可以使用集成于右键菜单的SVN客户端工具对SVN版本库进行操作喽。这些就留给你自己摸索一下吧,很简单的。
祝使用愉快。
相关文章推荐
- Centos6.3安装配置svn(转载自博客园)
- MyEclipse安装SVN插件以及Myeclipse9.0(转载http://hi.baidu.com/zzcc_8/blog/item/5d6dd1f3be34e459342acc4f.html)
- CentOS5.6下安装、配置SVN详解--转载加原创
- Eclipse for c++ 安装SVN插件(转载)
- centos安装svn<转载非原创>
- Linux(CentOS7) SVN安装配置手记
- SVN服务器端-------SVN版本控制器的安装和配置(转载)
- (转载)myeclipse安装svn插件的多种方式
- Eclipse中SVN的安装步骤(两种)和使用方法[转载]
- Ubuntu 12.04 eclipse 安装 svn插件(转载)
- 【转载】Myeclipse 8.6 SVN插件的安装和使用上篇
- MyEclipse 8.5 开发环境配置,汉化,Aptana2.0插件,SVN 插件,Flex Builder 3/4 插件安装(转载)
- 【转载】Maven安装配置+ GIt&SVN + Jenkins详细配置 软件项目管理 持续集成实验
- linux下安装手记(jdk,subversion,ant,svnant)
- Eclipse中SVN版本控制插件的安装和使用(转载)
- [转载] wxWidgets-2.6.2 + Microsoft Visual C++ 2005 Express + Platform SDK 安装使用手记
- 转载:myeclipse安装svn方法汇总
- svn的安装与配置(转载)
- 转载:SVN插件的手动安装
- ubuntu12.04安装svn 1.7(转载)