SVN - alex-aleyan/linux_wiki GitHub Wiki

SVN Server:

source1
source2
source3 fixing Tortoise SVN on Windows to show the dir status icons

SVN Install & Configuration:

yum update && yum install mod_dav_svn subversion httpd -y

Modify: /etc/httpd/conf.modules.d/10-subversion.conf

<Location /svn>
    DAV svn
    SVNParentPath /websrv/svn
    AuthType Basic
    AuthName "Welcome to SVN"
    AuthUserFile /etc/httpd/subversion-auth
    Require valid-user
</Location>

Create svn parent directory (SVNParentPath directive indicates the directory where our repositories will be later created):

mkdir -p /websrv/svn

Allowed accounts and bcrypt-encrypted passwords (-B) will be stored in /etc/httpd/subversion-auth in key-value pairs:

htpasswd -cB /etc/httpd/subversion-auth tecmint

Set the right ownership and permissions to the authentication file

chgrp apache /etc/httpd/subversion-auth
chmod 660 /etc/httpd/subversion-auth

Add Security and Create SVN Repository:

firewall-cmd --add-service=http --permanent
firewall-cmd --add-service=https --permanent
firewall-cmd --reload 

Restart Apache:

systemctl enable httpd
systemctl restart httpd

Creating SVN Repo:

Create an initial SVN repository called tecmint:

svnadmin create /websrv/svn/tecmint

Change the owner and group owner to apache recursively:

chown -R apache:apache /websrv/svn/tecmint

change the security context of /websrv/svn/tecmint (Note: The last two commands may not apply if you’re installing SVN on a VPS with SELinux disabled):

chcon -R -t httpd_sys_content_t /websrv/svn/tecmint/
chcon -R -t httpd_sys_rw_content_t /websrv/svn/tecmint/

Launch your web browser and verify that the dir exists (see link to enable https):

http://<YOU IP ADDRESS HERE>/svn/tecmint

⚠️ **GitHub.com Fallback** ⚠️