svn install svn安装配置

因为使用的是ubuntu, 安装相当简单,去软件管理器中输入svn就可以。或者使用

$ sudo apt-get install subversion

其实也没有怎么按照svn的安装流程走,那样的话需要添加新的用户,用户组。安全系数高一些。下面是自己的流程:

首先建一个svn目录,mkdir /home/cc/svn

在此目录下创建你自己的代码目录:

cd /home/cc/svn svnadmin create trunk //然后启动svn svnserve -d --root=/home/cc/svn

如果想在trunk之下创建其他目录,可以直接使用mkdir director的方法。之后去其他机器使用svnclient.也可以使用刚才的apt-get install subversion的方式。

svnserve.conf:12: Option expected,产生的原因是没有顶格写。例如在/home/cc/svn/trunk/conf/svnserve.conf中:

[general] anon-access = none ### 这里auth-access的写法是错误的。 auth-access = write ### 这样写才是正确的 auth-access = write

svn : No access allowed to this repository

首先要把 svnserve.conf中的password-db = passwd注释去掉。然后在passwd文件中添加:

[users] cc = 123

在authz中添加:

[groups] ### 这里是建立一个组 user = cc,aa,bb,dd ### 这里repository:后添加的是相对路径,例如我的路径/home/cc/svn/trunk在这里就是/trunk [repository:/trunk] ### 这里@user是某一个组的权限 @user = rw ### 这是所有用户的权限 * = r

以后使用svn需要输入--username=cc --password=123

Authorization failed

这里是因为在authz中的路径可能设置有问题(repository:之后的那个路径,那里面的路径全部都是相对路径),或者是命令没有顶格写。passwd, authz, svnserve.conf中的所有命令必须是顶格写的。

下面是远程机器使用svn导入项目:

svn import [本地目录] svn://[ip]/trunk -m "import project"即可.例如我的是 svn import ~/code/cnode svn://192.168.1.22/trunk -m "import" --username=cc --password=123

这里要注意的是svn会将本地目录之下的所有东西都按照相同的组织方式放入到trunk.所有最好导入工程根目录。

贴一下写好的配置文件,这里我的trunk是pddms: 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 = cc,aa,bb,dd # harry_sally_and_joe = harry,sally,&joe [/] cc = rw # &joe = r # * = [repository:/pddms] @harry_and_sally = rw * = r

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] cc = 123 aa = 123 # harry = harryssecret # sally = sallyssecret

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 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 = pddms_a [sasl] ### This option specifies whether you want to use the Cyrus SASL ### library for authentication. Default is false. ### This section will be ignored if svnserve is not built with Cyrus ### SASL support; to check, run 'svnserve --version' and look for a line ### reading 'Cyrus SASL authentication is available.' # use-sasl = true ### These options specify the desired strength of the security layer ### that you want SASL to provide. 0 means no encryption, 1 means ### integrity-checking only, values larger than 1 are correlated ### to the effective key length for encryption (e.g. 128 means 128-bit ### encryption). The values below are the defaults. # min-encryption = 0 # max-encryption = 256

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值