banner



How To Set Up An Svn Server

The Apache server is widely used for running servers and sites over the internet. If you own a distributed server where many administrators work together on the aforementioned project, you probably face issues keeping a record of who fabricated the server changes. Here comes the Apache SVN server that y'all tin install on your Linux car to continue the log of your server's activity and changes. It tin can maintain the login data, documentation data, source code, and other revisions.

The Apache subversion system allows users and contributors to make changes, add features, revise and modify the repository with keeping the modify records. You lot can also backup, revert, override, update your repository and delete revisions through the Apache SVN tool.

Apache SVN Server On Linux


As Linux powers, most of the globe'south servers, using the Apache Subversion (SVN) on Linux might aid you lot continue a record of your software development, metadata revisions, and revises. The Apache SVN is free and open up source under the Apache license. Using an SVN organization, you tin can actually get your own repository to store, monitor, and make changes on your server system. The Apache SVN is compatible with both Linux and Windows. Even it allows y'all to command your ain or your client's server remotely. Here, nosotros'll come across how to install and get started with the Apache SVN on a Linux organisation.

1. Install Apache SVN Server On Debian/Ubuntu Linux


Installing Apache SVN on a Debian/Ubuntu Linux requires root privilege and basic knowledge of Linux last commands. The Apache subversion is bachelor on the official Linux repository. This method volition guide you on how you lot can install and configure the Apache subversion on a Debian system.

Step 1: Install Apache on Ubuntu/Debian


Equally we're going to install the Apache SVN nether the Apache server, brand certain that you take the Apache server installed on your organization. If you lot don't accept it, you tin run the post-obit commands on your terminal beat out to install the Apache PHP server. In the start, you might demand to update your Linux repository.

sudo apt-get update sudo apt-get install apache2

install apache2 on ubuntu

Pace 2: Install SVN Server on Ubuntu/Debian


When the PHP server is ready, you can now run the post-obit aptitude command on your last trounce to install the Apache subversion and a few library functions on your system. I must note that the post-obit command will update your existing PHP server modules, MySQL, XML, and other LAMP services. If y'all take Postfix installed on your system, it might update the Postfix every bit well.

sudo apt-get install subversion libapache2-modernistic-svn libapache2-svn libsvn-dev

install Apache SVN

While the installation of the Apache SVN finishes, run the following commands on your final shell to enable and restart the subversion on your Linux organization.

sudo a2enmod dav dav_svn sudo service apache2 restart

Stride three: Create A SVN Repository on Linux


Afterwards installing the Apache SVN and enabling information technology on your arrangement, you may now create a new directory to shop your subversion log files and login files. Run the following mkdir command and svnadmin commands on your terminal shell to create a new repository directory.

sudo mkdir -p /var/lib/svn/ sudo svnadmin create /var/lib/svn/myrepo

At present, to avoid permission errors, run the following chown commands on your Linux crush.

sudo chown -R www-data:world wide web-data /var/lib/svn sudo chmod -R 775 /var/lib/svn

repo 2 admin account chown

Step 4:  Create Users for Subversion


Every bit the Apache SVN records the log files and classified documents, you need to create an admin business relationship to login into your Apache SVN arrangement. Get-go, run the post-obit affect command on your terminal shell to create a password log file. Then run the htpasswd control to store user and password credentials.

sudo touch /etc/apache2/dav_svn.passwd sudo htpasswd -m /etc/apache2/dav_svn.passwd ubuntupit

Hither, I've used 'ubuntupit' every bit my admin username, you may replace it with your own username. Later creating the main admin account, you tin can also add other users for your Apache subversion arrangement.

sudo htpasswd -m /etc/apache2/dav_svn.passwd user1 sudo htpasswd -k /etc/apache2/dav_svn.passwd user2

Pace 5: Configure Apache/HTTPD with Subversion


After creating the repository and adding an admin user, yous may now configure the Apache SVN settings on your Linux organisation. You can run the following command on your final vanquish to edit the dav_svn.conf file.

sudo nano /etc/apache2/mods-enabled/dav_svn.conf

Subsequently opening the file, make sure that your configuration script contains the following lines equally it's shown below. The beneath script contains the SVN path, repository location, and user credentials.

Alias /svn /var/lib/svn <Location /svn>  DAV svn SVNParentPath /var/lib/svn  AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user  </Location>

nano svn config on Linux

After editing the SVN configuration script, relieve and exit the file. And then restart the Apache services on your Linux machine.

sudo service apache2 restart

2. Install Apache SVN on Red Chapeau/Fedora Linux


If you accept a Fedora workstation, you can install the Apache SVN on your organisation to monitor and revise your server repository. It's non much different than installing the SVN on a Debian system. Here I'll guide you on how you can install and configure the Apache Subversion on your Fedora or other Red Chapeau-based Linux system.

Stride 1: SVN Installation on Fedora Workstation


In the beginning, you demand to update your Linux organisation to avoid repository bug. And then run a quick check to know if your system has the httpd (HTTP daemon) installed and responding.

sudo yum update sudo chkconfig httpd on

chkconfig httpd on

Now, if your organization has the Security-Enhanced Linux installed, you might demand to disable information technology for installing the SVN service. You tin can run the following command on your last shell to open up the SELINUX script.

sudo nano /etc/selinux/config

When the script opens, notice the following SELINUX syntax and make the value disabled. Then save and leave the file.

SELINUX=disabled

After updating and editing the SELINUX script, you may now run the post-obit YUM command on your final beat out to install the Apache SVN server on your Fedora Linux.

sudo yum install subversion mod_dav_svn

yum install subversion

Step 2: Create And Configure A SVN Repository


After installing the SVN server, you may now need to create a repository for the subversion service. You can run the following commands accordingly on your final shell to create an SVN directory, create a repository on your filesystem.

# mkdir /var/www/svn # svnadmin create /var/www/svn/repos

After creating the SVN repository, run the chown command given below to give information technology root permission.

# chown -R apache.apache /var/world wide web/svn/repos/

Step 3: Creating an Admin for the SVN Server


To create an administrative user account for the SVN server, you tin can run the post-obit command on your concluding shell with root privilege. The command will ask you to requite a new password for the account. You lot tin notation downward the username and the password for future employ.

# htpasswd -cm /etc/svn-auth-conf ubuntupit New countersign: Re-type new password: Adding countersign for user ubuntupit

create id and pass for SVN on Fedora

Pace iv: Configure The Subversion Server on Fedora


Later on installing the SVN server and calculation an Admin user, y'all may now run the post-obit command to edit the SVN configuration file on Fedora/Red Hat Linux.

sudo nano subversion.conf

Now, make sure that your configuration script contains scripts as it's shown below. If yous accept issues with the script, you can experience gratuitous to re-create and paste the following script given below.

# Make sure you lot uncomment the following if they are commented out LoadModule dav_svn_module modules/mod_dav_svn.and then LoadModule authz_svn_module modules/mod_authz_svn.so  # Add together the following to allow a bones authentication and point Apache to where the actual # repository resides. <Location /repos> DAV svn SVNPath /var/www/svn/repos AuthType Basic AuthName "Subversion repos" AuthUserFile /etc/svn-auth-conf Require valid-user </Location>

configure Apache SVN Server On Linux

When the SVN script's configuration finishes, don't forget to restart your httpd services on your system. You can run whatsoever of the post-obit commands to restart the Apache server on your Fedora Linux.

service httpd restart /etc/init.d/httpd restart

Get Started with Apache SVN Server


Till now, we've seen the procedure of installing and configuring the Apache SVN on the Debian and Fedora Linux systems. It'southward fourth dimension to test the Subversion organisation on our system. To load the 'Subversion Repository'. To load the SVN on your browser, write your server's IP address and add /svn/repo2/ then hit the Enter button.

Here, I've loaded the Apache server on the localhost address, and my repository name is 'repo2'; don't forget to supervene upon those with your repository proper name and server'due south IP address.

127.0.0.1/svn/repo2/

svn repo2 login

When the Subversion Repository loads, it will inquire for your User Name and the password. Input your username and password that we've created earlier to log in to your SVN server. Subsequently a successful login, you will run into the SVN server on your web browser.

Apache SVN Server On Linux

Final Words


Initially, the Apache SVN was designed for software developers, only y'all tin use information technology for your personal usages. In the entire post, I've described the methods of installing, configuring, and getting started the Apache SVN server on a Linux system. If you're thinking well-nigh using the subversion with an Nginx server, in that case, I must say that y'all still might non find any means to use SVN with Nginx without having the Apache installed on the same organization.

Please share this post with your friends and the Linux community if yous observe it helpful and handy. You can also write downwards your opinions regarding this postal service in the comment department.

Source: https://www.ubuntupit.com/how-to-install-and-configure-apache-svn-server-on-linux-desktop/

0 Response to "How To Set Up An Svn Server"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel