1 Start command
svnserve -d -r /opt/svn
-d daemon -r background
2 stop
direct ps -ef | grep svnserve
then kill
3 Create a new warehouse
svnadmin create test
Change the owner at this time
chown -R apache test
4 Delete a repository
Direct rm -rf xxx
5 Backup a repository
svnadmin hotcopy xxx /opt/xxx_20161226
Then unzip the warehouse directly to the folder under svn and it's ok
6 Install apache+svn, you can refer to http://blog.csdn.net/apache0554/article/details/46906973
yum install httpd
#Install svn service and httpd module
yum install subversion mod_dav_svn
then configure
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule dontdothat_module modules/mod_dontdothat.so
<Location /repos>
DAV svn
SVNParentPath /opt/svn
# SSLRequireSSL
AuthType Basic
AuthName "Subversion"
AuthUserFile /opt/svn/.htpasswd
require valid-user
AuthzSVNAccessFile /opt/svn/authz
# # Limit write permission to list of valid users.
# <LimitExcept GET PROPFIND OPTIONS REPORT>
# # Require SSL connection for password protection.
# # SSLRequireSSL
#
# AuthType Basic
# AuthName "Authorization Realm"
# AuthUserFile /path/to/passwdfile
# Require valid-user
# </LimitExcept>
</Location>
7 扩展svn的分区
因为svn用的分区容量太小,就重新加了个分区
mount也没什么问题
查看/var/log/httpd/error_log,一直提示权限问题,设定777或者改owner都不行
[Tue Dec 27 22:09:12.487699 2016] [authn_file:error] [pid 10527] (13)Permission denied: [client 10.149.243.123:58908] AH01620: Could not open password file: /opt/svn/.htpasswd
我就奇怪了。。结果查了下之后是selinux。。
查看getenforce
关闭setenforce 0
8 加用户
htpasswd /opt/svn/.htpasswd xxxx