![]() |
||
The Crucial Blog - Archive September 2, 2008
Using Subversion/SVN on cPanel ServersSubversion is a free/open-source version control system. This article will explain you about how to use subversion in linux servers mainly cpanel servers. Subversion uses copy-modify-merge model for its working. Access Methods : Subversion repositories can be accessed using different methods. Syntax Access Method 1. If you are accesssing the subversion repository from the local machine, use the following syntax to access the file. $ svn list file:///path/to/repos. For eg: If you have ssh access to the server, login to the shell and repository contents can be listed as, $svn list file:///home/testuser/testrepo The command ‘list’ will display the repository contents. 2. We can use http URLs to access svn repository. $svn list http://domainname/path/to/repository If you have any space in the URLs used, give the URLs in quotes, $svn list “http://domainname/path with space /to/repository” This will take the URL as a single argument to svn program. Note : As we are not using a Subversion-aware Apache server, it is not possible to access repository from our server directly using http(or https). 3. You can access the svn repository from our server using svn+ssh method, like $svn list svn+ssh://username@domainname/home/username/public_html/testrepo/ Creating a new subverion repository in your home directory on our server: $svnadmin create /path/to/repository You can have your own working copy of a project. Your working copy is your own private work area. Subversion will never add other people’s changes, nor make your own changes available to others, until you explicitly do so. After making changes to the working copy, you can publish the changes to the repository. You can also merge the changes made by other people to your working directory. You can create a private copy of an existing project using ‘checkout’ command. $svn checkout /path/to/project Usually we start working on a project by using a working copy. To publish changes, use the ‘commit’ command. $svn commit <modified file name> -m “changes made in file” After -m, we are mentioning a note of the changes made to the file. If you want to update others changes to your working copy, use the ‘update’ command. $svn update You can add new files to the subversion repository using the import command. $svn import <file/directory> file:///path/to/repos -m “Initial import” For eg, to import files in your local machine to a repository created by you on our server, $svn import -m ‘Initial Import’ <path to file/directory to be copied from local machine> svn+ssh://username@domainname/home/username/testrepo You will get error “svn: ‘.’ is not a working copy” if the path mentioned for the repository is not correct. Recommended repository layout : Subversion’s flexibility allows you to create your repository in any way, but the recommended way is to create a trunk directory to hold the “main line” of development, a branches directory to contain branch copies, and a tags directory to contain tag copies, like $svn list file:///path/to/repos A small description of svn commands : * Update your working copy * Make changes Add file, directory, or symbolic link to the existing repository. $svn delete <filename> Delete file, directory, or symbolic link from the repository. Create a new file file2 as a duplicate of file1 and automatically schedule file2 for addition. $svn move This command is exactly the same as running svn copy file1 file2; svn delete file1. * Examine your changes * Possibly undo some changes * Resolve Conflicts (Merge Others’ Changes) * Commit your changes Creating users to access the subversion repository using authentication(Using Access Method 4): We can give access to some authenticated users to the repository using the ====================== By this anonymous users will have read access and only authenticated users will have write access to the repository. The realm is a name that you define. The authenticated user’s details are mentioned in the file ‘passwd’ in the same directory as that of the configuration file(/home/username/testrepo/conf/passwd). passwd file : Now users can use these login details to write to the repository from shell. For this, svnserve daemon should be running on the server. If it is not running serverwide, you can start svnserve daemon as follows. #svnserve -d -r /home/username/testrepo/ Using the -r option effectively modifies the location that the program treats as the root of the file system space it can access. Now you can access the repository as follows. Committed revision 1. At first when it prompt for root password, just enter without giving anything. Then you can give username and password. Svn will cache the login from a particular IP and will not prompt for password every time that user access the repository. The passwords are cached in the directory /home/username/.subversion/auth. It is not insecure as the ‘auth/’ caching area is permission-protected so that only the user(owner) can read data from it, not the world at large. If that’s still not safe for you, you can disable credential caching by uncommenting the line ‘store-auth-creds = no’ in the file /home/username/.subversion/config. Note : To ensure that the svnserve gets started whenever the server is booted, we must add a @reboot line to the root crontab as follows. ——————————— Now any user’s repository under /home can be accessed using svnserve daemon by authentication. Reference : http://svnbook.red-bean.com/en/1.4/svn.intro.whatis.html Tags: linux, server-administration, subversionNo Comments Filed under: Uncategorized by — aaron @ 5:26 pm February 13, 2008
Installing Subversion Using yum on CentOS 5 (Error: Missing Dependency: perl(URI) >= 1.17 is needed by package subversion)While attempting to install Subversion via yum today, I received the following error: [root@sXXX ~]# yum install subversion Steps to resolve this: 1. Download the perl(URI) with version greater than 1.17 using the following command. wget http://fr.rpmfind.net/linux/fedora/core/3/x86_64/os/Fedora/RPMS/perl-URI-1.30-4.noarch.rpm 2. Install the specified package using the follwing command. rpm -i perl-URI-1.30-4.noarch.rpm 3. Install subversion using “yum”. yum install subversion [root@sXXX ~]# svn help Most subcommands take file and/or directory arguments, recursing Available subcommands: Subversion is a tool for version control. No Comments Filed under: Uncategorized by — aaron @ 7:17 pm |
Tag Cloud
windows
centos5
apache
ruby-on-rails
php
esxi
webmin
ubuntu
hypervm
cpanel
lxadmin
lxlabs
virtual dedicated servers
server-administration
virtualization
mail
exchange
microsoft
linux
raid
storage
fedora
XenServer
vds
windows server
debian
system administration
gentoo
yum
subversion
vmware
xen
centos
firewall
joomla
fantastico
cisco
wordpress
servers
windows 2008 server
security
ssh
networking
control panels
vps
|
|
Quick Links: Debian Dedicated Servers, Direct Deposit Hosting, Unmetered Dedicated Servers, Virtual Dedicated Servers, Windows Server Management, High Traffic Web Hosting - Load Balanced Clusters, Windows 2008 Server Virtual Dedicated Servers
© Copyright 2003-2008
Crucial Paradigm
ABN 97 125 618 662