Subversion (also known as SVN) is a free and open-source version control system used for managing and tracking changes to projects or files. In this tutorial, we will guide you on how to install Subversion on a Fedora server latest.
Before you proceed with the installation of Subversion, you must have the following:
The first step is to update the Fedora server packages to the latest version available. Open the terminal and type the following command to update the server packages:
sudo dnf update
Enter the sudo password and wait until the update process completes.
Once the server updates successfully, install the Subversion package using the following command:
sudo dnf install subversion
This command will install Subversion and all its required dependencies.
To verify that Subversion is installed successfully, run the following command:
svn --version
This command will display the installed Subversion version and other details.
To create a new Subversion repository, follow these steps:
sudo mkdir /opt/svn/repo
svnadmin
command to create a new repository:sudo svnadmin create /opt/svn/repo
/opt/svn/repo
directory to the Apache user:sudo chown -R apache:apache /opt/svn/repo
sudo semanage fcontext -a -t httpd_sys_content_t "/opt/svn/repo(/.*)?"
sudo restorecon -Rv /opt/svn/repo
To restrict access to the Subversion repository, create a basic authentication file and configure the Apache server to use it.
sudo htpasswd -c /etc/svn-users myuser
Enter the password for the new user when prompted.
Edit the Subversion configuration file /etc/httpd/conf.d/subversion.conf
using your preferred text editor.
sudo vi /etc/httpd/conf.d/subversion.conf
<REPO_NAME>
with the name of your repository:<Location /svn/<REPO_NAME>>
DAV svn
SVNParentPath /opt/svn
AuthType Basic
AuthName "Subversion Repositories"
AuthUserFile /etc/svn-users
Require valid-user
</Location>
Save and close the configuration file.
Restart the Apache server to apply the changes:
sudo systemctl restart httpd
To access the Subversion repository from a client machine, you need to use an SVN client program. Run the following command on the client machine:
svn co http://<SERVER_IP>/svn/<REPO_NAME>
Replace <SERVER_IP>
with the IP address or hostname of the Fedora server and <REPO_NAME>
with the name of the repository.
Enter the SVN user credentials when prompted, and the client machine will download a local copy of the repository.
Congratulations! You have successfully installed Subversion and created a new repository on your Fedora server.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!