CentOS7 安装SVN

1.安装subversion
[root@localhost ~]# yum install subversion
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
base                                                             | 3.6 kB  00:00:00     
epel                                                             | 4.3 kB  00:00:00     
extras                                                           | 3.4 kB  00:00:00     
mysql-connectors-community                                       | 2.5 kB  00:00:00     
mysql-tools-community                                            | 2.5 kB  00:00:00     
mysql56-community                                                | 2.5 kB  00:00:00     
updates                                                          | 3.4 kB  00:00:00     
(1/9): extras/7/x86_64/primary_db                                | 139 kB  00:00:00     
(2/9): base/7/x86_64/group_gz                                    | 155 kB  00:00:00     
(3/9): epel/x86_64/updateinfo                                    | 766 kB  00:00:00     
(4/9): epel/x86_64/primary_db                                    | 4.6 MB  00:00:00     
(5/9): base/7/x86_64/primary_db                                  | 5.6 MB  00:00:01     
(6/9): updates/7/x86_64/primary_db                               | 3.9 MB  00:00:00     
(7/9): mysql-connectors-community/x86_64/primary_db              |  13 kB  00:00:01     
(8/9): mysql-tools-community/x86_64/primary_db                   |  32 kB  00:00:01     
(9/9): mysql56-community/x86_64/primary_db                       | 159 kB  00:00:01     
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * epel: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Package subversion-1.7.14-10.el7.x86_64 already installed and latest version
Nothing to do


2.查看安装位置
[root@localhost ~]# rpm -ql subversion
/etc/subversion
/etc/sysconfig/svnserve
/run/svnserve
/usr/bin/svn
/usr/bin/svnadmin
/usr/bin/svndumpfilter
/usr/bin/svnlook
/usr/bin/svnrdump
/usr/bin/svnserve
/usr/bin/svnsync
/usr/bin/svnversion
/usr/lib/systemd/system/svnserve.service
/usr/lib/tmpfiles.d/svnserve.conf
/usr/share/bash-completion/completions/svn
/usr/share/bash-completion/completions/svnadmin
/usr/share/bash-completion/completions/svndumpfilter
/usr/share/bash-completion/completions/svnlook
/usr/share/bash-completion/completions/svnsync
/usr/share/bash-completion/completions/svnversion
/usr/share/doc/subversion-1.7.14
/usr/share/doc/subversion-1.7.14/BUGS
/usr/share/doc/subversion-1.7.14/CHANGES
/usr/share/doc/subversion-1.7.14/COMMITTERS
/usr/share/doc/subversion-1.7.14/INSTALL
/usr/share/doc/subversion-1.7.14/LICENSE
/usr/share/doc/subversion-1.7.14/NOTICE
/usr/share/doc/subversion-1.7.14/README
/usr/share/doc/subversion-1.7.14/backup
/usr/share/doc/subversion-1.7.14/backup/hot-backup.py
/usr/share/doc/subversion-1.7.14/bdb
/usr/share/doc/subversion-1.7.14/bdb/erase-all-text-data.py
/usr/share/doc/subversion-1.7.14/bdb/skel.py
/usr/share/doc/subversion-1.7.14/bdb/svn-bdb-view.py
/usr/share/doc/subversion-1.7.14/bdb/svnfs.py
/usr/share/doc/subversion-1.7.14/bdb/whatis-rep.py
/usr/share/doc/subversion-1.7.14/examples
/usr/share/doc/subversion-1.7.14/examples/SvnCLBrowse
/usr/share/doc/subversion-1.7.14/examples/blame.py
/usr/share/doc/subversion-1.7.14/examples/check-modified.py
/usr/share/doc/subversion-1.7.14/examples/dumpprops.py
/usr/share/doc/subversion-1.7.14/examples/get-location-segments.py
/usr/share/doc/subversion-1.7.14/examples/getfile.py
/usr/share/doc/subversion-1.7.14/examples/getlocks_test.c
/usr/share/doc/subversion-1.7.14/examples/geturl.py
/usr/share/doc/subversion-1.7.14/examples/headrev.c
/usr/share/doc/subversion-1.7.14/examples/info.rb
/usr/share/doc/subversion-1.7.14/examples/minimal_client.c
/usr/share/doc/subversion-1.7.14/examples/putfile.py
/usr/share/doc/subversion-1.7.14/examples/revplist.py
/usr/share/doc/subversion-1.7.14/examples/svnlog2html.rb
/usr/share/doc/subversion-1.7.14/examples/svnlook.py
/usr/share/doc/subversion-1.7.14/examples/svnlook.rb
/usr/share/doc/subversion-1.7.14/examples/svnput.c
/usr/share/doc/subversion-1.7.14/examples/svnserve-sgid.c
/usr/share/doc/subversion-1.7.14/examples/svnshell.py
/usr/share/doc/subversion-1.7.14/examples/svnshell.rb
/usr/share/doc/subversion-1.7.14/examples/testwrite.c
/usr/share/doc/subversion-1.7.14/hook-scripts
/usr/share/doc/subversion-1.7.14/hook-scripts/commit-access-control.cfg.example
/usr/share/doc/subversion-1.7.14/hook-scripts/commit-access-control.pl
/usr/share/doc/subversion-1.7.14/hook-scripts/commit-email.rb
/usr/share/doc/subversion-1.7.14/hook-scripts/log-police.py
/usr/share/doc/subversion-1.7.14/hook-scripts/mailer
/usr/share/doc/subversion-1.7.14/hook-scripts/mailer/mailer.conf.example
/usr/share/doc/subversion-1.7.14/hook-scripts/mailer/mailer.py
/usr/share/doc/subversion-1.7.14/hook-scripts/mailer/tests
/usr/share/doc/subversion-1.7.14/hook-scripts/mailer/tests/mailer-init.sh
/usr/share/doc/subversion-1.7.14/hook-scripts/mailer/tests/mailer-t1.output
/usr/share/doc/subversion-1.7.14/hook-scripts/mailer/tests/mailer-t1.sh
/usr/share/doc/subversion-1.7.14/hook-scripts/mailer/tests/mailer-tweak.py
/usr/share/doc/subversion-1.7.14/hook-scripts/mailer/tests/mailer.conf
/usr/share/doc/subversion-1.7.14/hook-scripts/svn2feed.py
/usr/share/doc/subversion-1.7.14/hook-scripts/svnperms.conf.example
/usr/share/doc/subversion-1.7.14/hook-scripts/svnperms.py
/usr/share/doc/subversion-1.7.14/hook-scripts/validate-extensions.py
/usr/share/doc/subversion-1.7.14/hook-scripts/verify-po.py
/usr/share/doc/subversion-1.7.14/mod_authz_svn-INSTALL
/usr/share/doc/subversion-1.7.14/xslt
/usr/share/doc/subversion-1.7.14/xslt/svnindex.css
/usr/share/doc/subversion-1.7.14/xslt/svnindex.xsl
/usr/share/emacs/site-lisp/psvn-init.el
/usr/share/emacs/site-lisp/psvn.el
/usr/share/locale/de/LC_MESSAGES/subversion.mo
/usr/share/locale/es/LC_MESSAGES/subversion.mo
/usr/share/locale/fr/LC_MESSAGES/subversion.mo
/usr/share/locale/it/LC_MESSAGES/subversion.mo
/usr/share/locale/ja/LC_MESSAGES/subversion.mo
/usr/share/locale/ko/LC_MESSAGES/subversion.mo
/usr/share/locale/nb/LC_MESSAGES/subversion.mo
/usr/share/locale/pl/LC_MESSAGES/subversion.mo
/usr/share/locale/pt_BR/LC_MESSAGES/subversion.mo
/usr/share/locale/sv/LC_MESSAGES/subversion.mo
/usr/share/locale/zh_CN/LC_MESSAGES/subversion.mo
/usr/share/locale/zh_TW/LC_MESSAGES/subversion.mo
/usr/share/man/man1/svn.1.gz
/usr/share/man/man1/svnadmin.1.gz
/usr/share/man/man1/svndumpfilter.1.gz
/usr/share/man/man1/svnlook.1.gz
/usr/share/man/man1/svnrdump.1.gz
/usr/share/man/man1/svnsync.1.gz
/usr/share/man/man1/svnversion.1.gz
/usr/share/man/man5/svnserve.conf.5.gz
/usr/share/man/man8/svnserve.8.gz
/usr/share/xemacs/site-packages/lisp/psvn.el


3.创建svn目录
[root@localhost ~]# mkdir -p /mnt/svn/svnrepos

[root@localhost ~]# svnadmin create /mnt/svn/svnrepos
[root@localhost ~]# cd /mnt/svn/svnrepos/conf
[root@localhost conf]# ll
total 12
-rw-r--r-- 1 root root 1080 Apr  6 19:16 authz
-rw-r--r-- 1 root root  309 Apr  6 19:16 passwd
-rw-r--r-- 1 root root 3090 Apr  6 19:16 svnserve.conf
4. 设置用户密码
[root@localhost conf]# vi passwd
5. 设置权限
[root@localhost conf]# vi authz
[root@localhost conf]# vi passwd
[root@localhost conf]# vi authz
6. 设置svn配置
[root@localhost conf]# vi svnserve.conf
7. 查看版本
[root@localhost conf]# svnserve --version
svnserve, version 1.7.14 (r1542130)
   compiled Nov 20 2015, 19:25:09

Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository back-end (FS) modules are available:

* fs_base : Module for working with a Berkeley DB repository.
* fs_fs : Module for working with a plain file (FSFS) repository.

Cyrus SASL authentication is available.


[root@localhost conf]# cd ~
8.查看端口
[root@localhost ~]# ps aux|grep svnserve
root      6738  0.0  0.0 112648   972 pts/0    S+   19:39   0:00 grep --color=auto svnserve


9. 开启svn服务
[root@localhost ~]# svnserve -d -r /mnt/svn/svnrepos     


9.1 .问题:
[root@localhost ~]# svnserve -d -r /mnt/svn/svnrepos
svnserve: E000098: Can't bind server socket: Address already in use
9.2 查看端口:
[root@localhost ~]# ps aux | grep svn
root      7541  0.0  0.0 162184   896 ?        Ss   19:56   0:00 svnserve -d -r /mnt/sv
root      7817  0.0  0.0 112648   972 pts/0    S+   20:02   0:00 grep --color=auto svn
9.3 杀掉服务
[root@localhost ~]# killall svnserve
[root@localhost ~]# ps aux | grep svn
root      7867  0.0  0.0 112648   976 pts/0    S+   20:03   0:00 grep --color=auto svn
9.4 重启服务
[root@localhost ~]# svnserve -d -r /mnt/svn/svnrepos
[root@localhost ~]# ps aux | grep svnserve
root      7893  0.0  0.0 162184   928 ?        Ss   20:04   0:00 svnserve -d -r /mnt/svn/svnrepos
root      8317  0.0  0.0 112652   976 pts/0    S+   20:12   0:00 grep --color=auto svnserve
[root@localhost ~]# 


svn访问地址:SVN://ip


参考文章:
http://www.centoscn.com/CentosServer/ftp/2015/0622/5708.html
http://www.cnblogs.com/fuyuanming/p/6123395.html
http://blog.csdn.net/qq_30259339/article/details/50850951
https://my.oschina.net/fhd/blog/383280

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值