大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
这篇文章主要介绍“Ubuntu下如何安装SVN”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“Ubuntu下如何安装SVN”文章能帮助大家解决问题。
创新互联专业为企业提供阳城网站建设、阳城做网站、阳城网站设计、阳城网站制作等企业网站建设、网页设计与制作、阳城企业网站模板建站服务,10年阳城做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。
更新源
sudo apt-get update
安装svn
sudo apt-get install subversion
创建文件夹
sudo mkdir /home/svn sudo mkdir /home/svn/repository sudo chmod -r 777 /home/svn/repository sudo svnadmin create /home/svn/repository cd /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 密码文件为passwd authz-db = authz 权限文件为authz ### users have read and write access to the repository. 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 ### 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 = sallyssecret lidata = 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
关于“Ubuntu下如何安装SVN”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识,可以关注创新互联行业资讯频道,小编每天都会为大家更新不同的知识点。