sudo apt install subversion apache2 libapache2-svn 安裝好后,執行以下命令
enable dav_svn module for apache: a2enmod dav_svnenable authz_svn module for apache: a2enmod authz_svn svnadmin create /home/test/svn/repo/test export APACHE_RUN_USER=www-dataexport APACHE_RUN_GROUP=www-data 確定svnadmin create /home/test/svn/repo/test所在目錄的所有子目錄和各層集父目錄的群組都包括了www-data用戶(hù)。
設置test目錄下的owe和群組都為www-data
chown -R www-data:www-data /home/test/svn/repo/test 這樣保證apach2在訪(fǎng)問(wèn)svn目錄是不會(huì )出現訪(fǎng)問(wèn)權限不夠問(wèn)題。
vi /etc/apache2/sites-available/000-default.conf <Location /svn> DAV svn SVNParentPath /home/test/svn/repo AuthType Basic AuthName "subversion repository" AuthUserFile /etc/subversion/passwd AuthzSVNAccessFile /home/test/svn/repo/test/conf/authz Require valid-user</Location> sudo htpasswd -c /etc/subversion/passwd user_name /etc/init.d/apache2 restart 參考文獻:
https://help.ubuntu.com/lts/serverguide/subversion.html
聯(lián)系客服