svn源码控制环境搭建

1.svn的安装配置:

  svn下载软件: http://subversion.tigris.org
1.2.安装时没有采用apache于svn的整合,因此还需要用到apache的两个插件:
  apr、apr-util插件下载地址: http://apr.apache.org/download.cgi
1.3.先安装apr、apr-util插件,再安装svn源码报。
 apr安装(解压等操作略,进入到解压后的目录):
#./configure --prefix=/usr/local/svnversion/apr
#make
#make install
apr-util安装(解压等操作略,进入到解压后的目录):
#./configure --prefix=/usr/local/svnversion/apr-util --with-apr=/usr/local/svnversion/apr
#make
#make install
svnversion安装(解压等操作略,进入到解压后的目录):
#./configure --prefix=/usr/local/svnversion/svn --with-apr=/usr/local/svnversion/apr --with-apr-util=/usr/local/svnversion/apr-util
#make
#make install
到此完成了所有软件的安装。
1.4 svn配置:
进入svn安装目录(/usr/local/svnversion):
首先创建一个工程的版本库:
#cd /usr/local/svnversion
#mkdir projects
#/usr/local/svnversion/svn/bin/svnadmin create projects/test_project
执行以上命令后,在projects目录下会生成一个test_project目录,并且这个目录会有一些svn自动生成的文件或文件夹。
#cd projects/test_project/conf
编辑svnserve.conf文件,找到如下内容:

[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 = read
#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 directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### 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 the
### directory containing this file.  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
修改为:

[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 directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### 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 the
### directory containing this file.  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
将svnserve.conf保存推出。
再修改该目录下的passwd文件,在该文件的最后追加一条记录,并保存退出:
[users]
# harry = harryssecret
# sally = sallyssecret
linux6 = 111111
之后修改该目录中的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,
###  - a group of users defined in a special [groups] section,
###  - an alias defined in a special [aliases] section,
###  - all authenticated users, using the '$authenticated' token,
###  - only anonymous users, using the '$anonymous' token,
###  - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
# [/foo/bar]
# harry = rw
# &joe = r
# * =
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
修改为:### 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,
###  - a group of users defined in a special [groups] section,
###  - an alias defined in a special [aliases] section,
###  - all authenticated users, using the '$authenticated' token,
###  - only anonymous users, using the '$anonymous' token,
###  - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
g_svnadmin = linux6
# [/foo/bar]
# harry = rw
# &joe = r
# * =
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[/]
@g_svnadmin = rw
linux6= rw
到此配置文件修改已完成。
下面启动svn服务:
#/usr/local/subversion/svn/bin/svnserve -d -r /usr/local/subversion/projects/test_project
接下来,只要往svn服务器中导入项目工程就可以使用了,这里我的工程放在/opt/web_project目录下,那么导入命令为:
#/usr/local/subversion/svn/bin/svn import /opt/web_project/ file:///usr/local/subversion/projects/test_project/ -m "Initial import"
其中,-m是添加注释。到此svn客户端就可以访问svn服务器了开始工作了。
java项目一般采用myeclipse进行开发,那么如何在其上集成svn呢,见下:
 
在线安装svn插件
打开myeslipse的菜单栏 Help-- Find and Install-- 按new Remote Site,
Name填 svn , URL填 http://subclipse.tigris.org/update ,一直next到finished为止
菜单栏 Window-- Show View-- other-- 选择打开SVN目录下的SVN资源库
新建-- 资源库位置, URL填 http://svn.javascud.org/svn/springside/trunk
网速快的话,一会功夫svn就安装完成了。
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值