千家信息网

Ubuntu16.04.5LTS怎么安装SVN

发表于:2024-11-14 作者:千家信息网编辑
千家信息网最后更新 2024年11月14日,这篇文章将为大家详细讲解有关Ubuntu16.04.5LTS怎么安装SVN,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。更新源sudo apt-get update
千家信息网最后更新 2024年11月14日Ubuntu16.04.5LTS怎么安装SVN

这篇文章将为大家详细讲解有关Ubuntu16.04.5LTS怎么安装SVN,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

更新源

sudo apt-get update

安装SVN

sudo apt-get install subversion

创建文件夹

sudo mkdir /home/svnsudo mkdir /home/svn/repositorysudo chmod -R 777 /home/svn/repositorysudo svnadmin create /home/svn/repositorycd /home/svn/repository/sudo chmod -R 777 db

修改svnserve.conf

cd /home/svn/repository/conf/sudo vi svnserve.conf

修改这四行如下所示

anon-access = none 匿名用户不可读auth-access = write 权限用户可写password-db = passwd 密码文件为passwdauthz-db = authz 权限文件为authz### users have read and write access to the repository.anon-access = noneauth-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### directory containing this file. The specified path may be a### repository relative URL (^/) or an absolute file:// URL to a text### file in a Subversion repository. 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### The groups-db option controls the location of the groups file.

修改password文件,添加访问用户

sudo vi passwd[users]# harry = harryssecret# sally = sallyssecretlidata = lidata429

给用户增加目录权限

sudo vi authz[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[/]lidata=rw

启动服务,并且监听81端口

sudo svnserve -d -r /home/svn --listen-port 81

查看svn是否启动

ps -ef | grep svnserve

停止服务

kill all svnserve

关于"Ubuntu16.04.5LTS怎么安装SVN"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

0