SVN安裝部署在前幾篇博客中有 apache
1.安裝軟件 svn
# yum install httpd 測試
# yum install mod_dav_svn ui
# yum install subversion spa
2.測試是否成功 rest
# httpd -version 資源
# svnserve --version 部署
3.配置 博客
修改全部者 it
# chown -R apache:apache svnrepos (此處svnrepos爲svn資源庫位置 若全路徑則爲/var/svn/svnrepos)
copy /var/svn/svnrepos/conf 下的 authz到 /var/svn下,並建立passwd文件
# cp /var/svn/svnrepos/conf/authz /var/www/svn/authz
# cd /var/svn
# vi passwd
:wq保存退出
生成帳號:
# htpasswd /var/svn/passwd user1
輸入密碼,生成user1帳號
權限管理設置:
# vi /var/svn/authz
在[groups]下添加組,
[/] 至關於/var/svn這個目錄,賦予權限給用戶組
[svnrepos:/] 是指svnrepos庫
[svnrepos:/tag]是svnrepos下的tag目錄
[groups]將svn關聯到apache上:
# vi /etc/httpd/conf.d/subversion.conf
在底部加上:
<Location /svn>
DAV svn
SVNParentPath /var/svn
# # Limit write permission to list of valid users.
# <LimitExcept GET PROPFIND OPTIONS REPORT>
# # Require SSL connection for password protection.
# # SSLRequireSSL
AuthType Basic
AuthName "Authorization SVN"
AuthzSVNAccessFile /var/svn/authz
AuthUserFile /var/svn/passwd
Require valid-user
# </LimitExcept>
</Location>
重啓httpd:
# service httpd restart
4.測試
http://IP地址:8088/svn/svnrepos/
apache端口默認80,若改端口則編輯/etc/httpd/conf/httpd.conf中的Listen 80