`
gao_xianglong
  • 浏览: 462131 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

转载CentOS安装Subversion

阅读更多

《CentOS安装Subversion》

 

转载地址为:http://jingyan.baidu.com/article/d45ad148e9cfc069542b8046.html

 

#查看本机是否已安装SVN

[root@test2 etc]# rpm -qa subversion

[root@test2 etc]#

 

#卸载旧版

[root@test2 etc]# yum remove subversion

 

#安装SVN 为了便于以后操作同时安装其他服务  可以仅安装SVN

[root@test2 etc]# yum install httpd httpd-devel subversion mod_dav_svn mod_auth_mysql

 

确认已安装了svn模块

[root@test2 etc]#  cd /etc/httpd/modules

[root@test2 etc]# ls | grep svn

mod_authz_svn.so

mod_dav_svn.so

 

 

验证安装:

[root@test2 conf]# svnserve --version

 

 

创建代码库

[root@test2 etc]# mkdir -p /opt/svn/repositories

[root@test2 etc]# svnadmin create /opt/svn/repositories

 

 

执行上面的命令后,自动建立repositories库,查看/opt/svn/repositories 文件夹发现包含了conf, db,format,hooks, locks, README.txt等文件,说明一个SVN库已经建立。用户配置

[root@test2 conf]# cd /opt/svn/repositories/conf

[root@test2 conf]#vi passwd

[users]

# harry = harryssecret

# sally = sallyssecret

test=123456

 

[root@test2 conf]#vi authz

[/]

test=rw

[root@test2 conf]#vi svnserve.conf

[general]

#匿名访问的权限,可以是read,write,none,默认为read

anon-access=none

#使授权用户有写权限

auth-access=write

#密码数据库的路径

password-db=passwd

#访问控制文件

authz-db=authz

#认证命名空间,subversion会在认证提示里显示,并且作为凭证缓存的关键字

realm=/opt/svn/repositories

 

 

启动SVN

#启动SVN

[root@test2 conf]#svnserve -d -r /opt/svn/repositories

 

#查看SVN进程

[root@test2 conf]# ps -ef|grep svn|grep -v grep

root      2301     1  0 18:58 ?        00:00:00 svnserve -d -r /opt/svn/repositories

[root@test2 conf]#

 

#检测SVN端口

[root@test2 conf]# netstat -ln |grep 3690

tcp        0      0 0.0.0.0:3690                0.0.0.0:*                   LISTEN      

[root@test2 conf]# 

[root@test2 conf]# killall svnserve //停止

[root@test2 conf]#  svnserve -d -r /opt/svn/repositories // 启动

[root@test2 conf]#

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics