Janna Theme License is not validated, go to the theme options page to validate the license, you need a single license for each domain name.

How to Set Up Subversion Control in Ubuntu

When developing a project, you may want to use version control so that you can easily revert a file to a previous revision to fix errors or recover previously deleted files. Ubuntu An easy way to control version control is to set up a Subversion server in Ubuntu (SVN).

Ubuntu-Set-Up-Subversion-Featured-Terminal-800x400.jpg How to Set Up Subversion Control in Ubuntu
Looking for a more popular version control? Check out Beginner's Guide to Git.

What is Subversion?

Subversion is an open source version control software. It allows you to create versions of your code or projects for easy future reference.

Subversion is similar to Git, another version control software, although their inner workings are different from each other.

Subversion is easier to learn, with fewer commands. You always work with a central Subversion repository when committing changes, eliminating confusion between local and remote repositories. However, if you don't have access to this central repository (if you don't have an internet connection), you can't commit commits. Subversion also lacks some of the quality-of-life features that Git has. Also, don't forget that Git is becoming more popular now due to the emergence of GitHub and GitLab, so you'll get more value from learning Git instead.

Also read:  Sorry Linux, HDMI 2.1 cannot have open source drivers.

Subversion Residence

The first thing to do is install Subversion.

  1. Open Terminal app Using the default keyboard shortcut Ctrl+Alt+T.
  2. Qom By updating the system:
    sudo apt update

    Ubuntu-Set-Up-Subversion-sudo-apt-get-update.png How to Set Up Subversion Control in Ubuntu

  3. install Apache server:
sudo apt install apache2

Ubuntu-Set-Up-Subversion-sudo-apt-install-apache2-e1676423043917.png How to Set Up Subversion Control in Ubuntu

4. Enter the command to install Subversion:

sudo apt install subversion libapache2-mod-svn

Enter Y When asked Follow the installation.

Ubuntu-Set-Up-Subversion-install-libapache2-mod-svn-e1676423136365.png How to Set Up Subversion Control in Ubuntu

5. Create a directory to hold the server repository:

sudo svnadmin create /var/lib/svn

Ubuntu-Set-Up-Subversion-create-var-lib-svn.png How to Set Up Subversion Control in Ubuntu

6. Update Access Permissions To the warehouse:

sudo chown -R www-data:www-data /var/lib/svn sudo chmod 770 -R /var/lib/svn

Ubuntu-Set-Up-Subversion-make-files-e1676423724920.png How to Set Up Subversion Control in Ubuntu

Good to know: Discover all the differences between Apache and Nginx.

Configuring Apache for SVN Access

Next, set up an Apache server using SVN.

  1. Open Apache SVN configuration file:
    sudo nano /etc/apache2/mods-available/dav_svn.conf

    Ubuntu-Set-Up-Subversion-sudo-gedit-etc-apache2-mods-available-dav-svn.png How to Set Up Subversion Control in Ubuntu

2. Find the lines below and remove: "#" In front of her to cancel the comment:

... DAV svn SVNPath /var/lib/svn ... AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn.passwd ... Require valid user ...

3. Install Tools For Apache:

sudo apt install apache2-utils

Ubuntu-Set-Up-Subversion-apache2-utils-installation-complete-e1676423467171.png How to Set Up Subversion Control in Ubuntu

4. Create password For your username:

sudo htpasswd -cm /etc/apache2/dav_svn.passwd yourusername

Remember the password; you will need it to run SVN commands later.

Ubuntu-Set-Up-Subversion-sudo-htpasswd-e1676423523316.png How to Set Up Subversion Control in Ubuntu

5. Restart Apache Using:

sudo /etc/init.d/apache2 restart

Open your browser and navigate to http://localhost /svn. If you see the following, the installation was successful!

Ubuntu-Set-Up-Subversion-localhost-svn-revision-0-e1676423607123.png How to Set Up Subversion Control in Ubuntu

Good to know: Apache also lets you host a website on your own computer. Learn how to prepare Apache for high traffic to your website.

Add project files to SVN

Now that you have an empty SVN repository, follow these steps to work with it.

  1. Download a working copy of the empty repository with:
    svn checkout http://localhost/svn

    Ubuntu-Set-Up-Subversion-svn-checkout-localhost-e1676423680348.png How to Set Up Subversion Control in Ubuntu

  2. Go to folder “svn” The newly created one and create or copy project files to it.
    Ubuntu-Set-Up-Subversion-make-files-e1676423724920.png How to Set Up Subversion Control in Ubuntu
  3. use svn add * To select all changed files in your working copy to be committed.
    Ubuntu-Set-Up-Subversion-svn-add-asterisk-1-e1676423774909.png How to Set Up Subversion Control in Ubuntu
  4. Enter svn commit -m "your commit message" to commit and upload the files added in the previous step to the SVN repository. You will need to enter the password you created earlier for this command.
    Ubuntu-Set-Up-Subversion-svn-commit-e1676423809673.png How to Set Up Subversion Control in Ubuntu
  5. Update http://localhost/svnIf you see your new files and an increasing number of “reviews,” you’ve succeeded!
    Ubuntu-Set-Up-Subversion-Localhost-Revision-1-Success-e1676423882790.png How to Set Up Subversion Control in Ubuntu

Also read:  Steps to update Arch Linux easily
Go to top button