Linux版本:RHEL7.0
SVN下载地址http://subversion.apache.org/
RHEL7 DVD里面自带
由于需要相应的关联包,使用yum源安装软件
[root@dns Packages]# yum -y install subversion
Failed to set locale, defaulting to C
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Repository 'y' is missing name in configuration, using id
y | 4.1 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package subversion.x86_64 0:1.7.14-6.el7 will be installed
--> Processing Dependency: subversion-libs(x86-64) = 1.7.14-6.el7 for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_client-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_delta-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_diff-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_fs-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_fs_base-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_fs_fs-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_fs_util-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_ra-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_ra_local-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_ra_neon-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_ra_svn-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_repos-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_subr-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Processing Dependency: libsvn_wc-1.so.0()(64bit) for package: subversion-1.7.14-6.el7.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-3.el7 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package subversion-libs.x86_64 0:1.7.14-6.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
Package Arch Version Repository Size
Installing:
subversion x86_64 1.7.14-6.el7 y 1.0 M
Installing for dependencies:
apr x86_64 1.4.8-3.el7 y 103 k
apr-util x86_64 1.5.2-6.el7 y 92 k
subversion-libs x86_64 1.7.14-6.el7 y 921 k
Transaction Summary
Install 1 Package (+3 Dependent packages)
Total download size: 2.1 M
Installed size: 7.5 M
Downloading packages:
Total 14 MB/s | 2.1 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : apr-1.4.8-3.el7.x86_64 1/4
Installing : apr-util-1.5.2-6.el7.x86_64 2/4
Installing : subversion-libs-1.7.14-6.el7.x86_64 3/4
Installing : subversion-1.7.14-6.el7.x86_64 4/4
Verifying : subversion-1.7.14-6.el7.x86_64 1/4
Verifying : subversion-libs-1.7.14-6.el7.x86_64 2/4
Verifying : apr-util-1.5.2-6.el7.x86_64 3/4
Verifying : apr-1.4.8-3.el7.x86_64 4/4
Installed:
subversion.x86_64 0:1.7.14-6.el7
Dependency Installed:
apr.x86_64 0:1.4.8-3.el7 apr-util.x86_64 0:1.5.2-6.el7 subversion-libs.x86_64 0:1.7.14-6.el7
Complete!
[root@dns Packages]#
查看配置文件
创建默认目录
创建一个新项目
查看目录下面内容
[root@dns Packages]# ls -R /var/svn/project_lz
/var/svn/project_lz:
README.txt conf db format hooks locks
/var/svn/project_lz/conf:
authz passwd svnserve.conf
/var/svn/project_lz/db:
current fs-type min-unpacked-rev revs txn-current txn-protorevs write-lock
format fsfs.conf revprops transactions txn-current-lock uuid
/var/svn/project_lz/db/revprops:
0
/var/svn/project_lz/db/revprops/0:
0
/var/svn/project_lz/db/revs:
0
/var/svn/project_lz/db/revs/0:
0
/var/svn/project_lz/db/transactions:
/var/svn/project_lz/db/txn-protorevs:
/var/svn/project_lz/hooks:
post-commit.tmpl post-revprop-change.tmpl pre-commit.tmpl pre-revprop-change.tmpl start-commit.tmpl
post-lock.tmpl post-unlock.tmpl pre-lock.tmpl pre-unlock.tmpl
/var/svn/project_lz/locks:
db-logs.lock db.lock
修改配置文件/var/svn/project_lz/conf/svnserve.conf
修改前
修改后
修改passwd文件新建用户
设置权限,修改文件/var/svn/project_lz/conf/authz
增加以下表示,用户对其有读写权限。
重启svn服务
设置开机自启动svn服务
配置防火墙,查看端口
防火墙添加端口
重启防火墙
如果selinux开启了的话 设置selinux
在Windows上面安装客户端测试,一直下一步即可
在资源管理器里面右键,点击check out
填写以下内容
成功
提交测试
配置完成。
前面报了个错,处理方法如下
Error /svnserve.conf:19 Option expected
原因是配置文件里面行前面有空格
注:以上图片上传到红联Linux系统教程频道中。
去掉前面的空格该错误消失