<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vinsol - Leading Ruby on Rails Development and Consulting Firm in India &#187; linux</title>
	<atom:link href="http://vinsol.com/blog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://vinsol.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 11 Jan 2012 06:07:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to make arrow keys working in irb in Linux/Ubuntu</title>
		<link>http://vinsol.com/blog/2007/07/11/how-to-make-arrow-keys-working-in-irb-in-linuxubuntu/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-make-arrow-keys-working-in-irb-in-linuxubuntu</link>
		<comments>http://vinsol.com/blog/2007/07/11/how-to-make-arrow-keys-working-in-irb-in-linuxubuntu/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 11:02:32 +0000</pubDate>
		<dc:creator>SUR</dc:creator>
				<category><![CDATA[feisty fawn]]></category>
		<category><![CDATA[irb]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://expressica.com/2007/07/11/how-to-make-arrow-keys-working-in-irb-in-linuxubuntu/</guid>
		<description><![CDATA[It was ruining all my mood and concentration when i was trying some sample ruby code in irb and again and again i had to retype the things because the arrow keys were not working there. I searched the problem on net and found that i need to have readline library on my linux and [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>It was ruining all my mood and concentration when i was trying some sample ruby code in irb and again and again i had to retype the things because the arrow keys were not working there. I searched the problem on net and found that i need to have <b>readline</b> library on my linux and in ruby as well. Now the point is readline should be available on the linux before you compile ruby so as you can give the readline option while compiling ruby. BUT we have ruby already installed !! Now What ?</p>
<p>Now, first you will need to install system based readline libraries as</p>
<textarea name="code" class="ruby:nocontrols:nogutter" cols="60" rows="10">
  sudo apt-get install libreadline5 libreadline5-dev
</textarea>
<p>If you are not able to install linux based readline with the above method the <a href="http://greenprogrammer.blogspot.com/2006/05/ruby-wreadline-on-ubuntu.html">refer this</a> for more details.</p>
<p>Now you will need to compile the ruby based <b>readline</b> interface to let you readline library available in <b>irb</b>.<br />
Do it by this&#8230;</p>
<textarea name="code" class="ruby:nocontrols:nogutter" cols="60" rows="10">
  cd /usr/local/src/ruby-1.8.6/ext/readline
  sudo ruby extconf.rb
  sudo make
  sudo make install
</textarea>
<p>thats it, all done!!<br />
Try your tips on arrow keys in irb, it should work now.<br />
enjoy!!</p>
]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2007/07/11/how-to-make-arrow-keys-working-in-irb-in-linuxubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install RMagick Gem on Linux/Ubuntu</title>
		<link>http://vinsol.com/blog/2007/07/04/how-to-install-rmagick-gem-on-linuxubuntu/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-install-rmagick-gem-on-linuxubuntu</link>
		<comments>http://vinsol.com/blog/2007/07/04/how-to-install-rmagick-gem-on-linuxubuntu/#comments</comments>
		<pubDate>Wed, 04 Jul 2007 12:08:55 +0000</pubDate>
		<dc:creator>SUR</dc:creator>
				<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[feisty fawn]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://expressica.com/2007/07/04/how-to-install-rmagick-gem-on-linuxubuntu/</guid>
		<description><![CDATA[While installing RMagick on Linux, if you are getting errors like this
&#8220;GraphicsMagick-config&#8230; no configure: error: Can&#8217;t install RMagick. Can&#8217;t find Magick-config or GraphicsMagick-config program. &#8230;&#8221;,
below is the solution for this error.
RMagick requires ImageMagick and which further requires loads of dependencies already available to get installed and work properly. I was figuring out of those all, [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>While installing RMagick on Linux, if you are getting errors like this<br />
&#8220;GraphicsMagick-config&#8230; no configure: error: Can&#8217;t install RMagick. Can&#8217;t find Magick-config or GraphicsMagick-config program. &#8230;&#8221;,<br />
below is the solution for this error.</p>
<p>RMagick requires ImageMagick and which further requires loads of dependencies already available to get installed and work properly. I was figuring out of those all, and thank god got a quite simple and elegant way to do all that in just three commands.<br />
First you will have to install imagemagick then libmagick9-dev and then finally you can install rmagick. </p>
<p>Here are the commands&#8230;</p>
<textarea name="code" class="ruby:nocontrols:nogutter" cols="60" rows="10">
  sudo apt-get install imagemagick
  sudo apt-get install libmagick9-dev
  sudo gem install rmagick
</textarea>
]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2007/07/04/how-to-install-rmagick-gem-on-linuxubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby script for creating new rails project and initial SVN import (with ignoring/removing log/other files)</title>
		<link>http://vinsol.com/blog/2007/02/08/ruby-script-for-creating-new-rails-project-and-initial-svn-import-with-ignoringremoving-logother-files/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ruby-script-for-creating-new-rails-project-and-initial-svn-import-with-ignoringremoving-logother-files</link>
		<comments>http://vinsol.com/blog/2007/02/08/ruby-script-for-creating-new-rails-project-and-initial-svn-import-with-ignoringremoving-logother-files/#comments</comments>
		<pubDate>Thu, 08 Feb 2007 13:38:17 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://webonrails.com/2007/02/08/ruby-script-for-creating-new-rails-project-and-initial-svn-import-with-ignoringremoving-logother-files/</guid>
		<description><![CDATA[Some days go I wrote a bash script for creating new rails project and initial SVN import (with ignoring/removing log/other files). And I received many comments if I could write a ruby script for this stuff. Hence here is the ruby script for creating new rails project and initial SVN import (with ignoring/removing log/other files) [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Some days go I wrote a <a  title="bash script for creating new rails project and initial SVN import (with ignoring/removing log/other files)" href="http://webonrails.com/2007/01/10/bash-script-for-creating-new-rails-project-and-initial-svn-import-with-ignoringremoving-logother-files/">bash script for creating new rails project and initial SVN import (with ignoring/removing log/other files)</a>. And I received many comments if I could write a ruby script for this stuff. Hence here is the <a href="http://webonrails.com/wp-content/plugins/wp-downloadMonitor/download.php?id=1" title="Version 1.0 downloaded 4 times" >ruby script for creating new rails project and initial SVN import (with ignoring/removing log/other files) (4)</a>. Copy this script to any of your directory as &#8220;create_rails_with_subversion.rb&#8221; and execute by issuing &#8220;ruby create_rails_with_subversion.rb &#8221;<br />
You may need command line <a title="subversion"  href="http://subversion.tigris.org/">subversion</a> for windows.</p>
<p>I have tested it at my windows and linux machine, if it not work for you please let me know.</p>
<p>Also I love to have your comments&#8230;. :)
</p>
]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2007/02/08/ruby-script-for-creating-new-rails-project-and-initial-svn-import-with-ignoringremoving-logother-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache proxy balancer + mongrel clusters and deploying application with capistrano</title>
		<link>http://vinsol.com/blog/2007/02/04/apache-proxy-balancer-mongrel-clusters-and-deploying-application-with-capistrano/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=apache-proxy-balancer-mongrel-clusters-and-deploying-application-with-capistrano</link>
		<comments>http://vinsol.com/blog/2007/02/04/apache-proxy-balancer-mongrel-clusters-and-deploying-application-with-capistrano/#comments</comments>
		<pubDate>Sun, 04 Feb 2007 14:20:25 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://webonrails.com/2007/02/04/apache-proxy-balancer-mongrel-clusters-and-deploying-application-with-capistrano/</guid>
		<description><![CDATA[So you want to setup production server with mongrel clusters and apache proxy balancer, also wants to use capistrano for deployment, huh. Take it easy, its very simple.
You need Apache 2.2 or later on your production server, and the following ruby gems on your both machine(server and local):

capistrano
mongrel
mongrel_cluster

I haven&#8217;t mentioned rails and rake gem as [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>So you want to setup production server with mongrel clusters and apache proxy balancer, also wants to use capistrano for deployment, huh. Take it easy, its very simple.</p>
<p>You need Apache 2.2 or later on your production server, and the following ruby gems on your both machine(server and local):</p>
<ul>
<li>capistrano</li>
<li>mongrel</li>
<li>mongrel_cluster</li>
</ul>
<p>I haven&#8217;t mentioned rails and rake gem as we are deploying a rails application so these gems are obvious.</p>
<p>Lets install above gems (if not installed)  by issuing:</p>
<textarea name="code" class="ruby" cols="50" rows="10">

gem install --include-dependencies capistrano
gem install --include-dependencies mongrel
gem install --include-dependencies mongrel_cluster

</textarea>
<p>Now make sure that the following modules are enabled (they are disabled by default) :</p>
<ul>
<li>mod-rewrite</li>
<li>mod-proxy</li>
<li>mod-proxy-http</li>
<li>mod-proxy-balancer</li>
</ul>
<p>to check if they are enabled issue &#8221; <strong>/etc/init.d/apachectl -M</strong> &#8221; on server, it will list all the enabled modules. For Debian systems all enabled modules are in /etc/apache2/mods-enabled directory and all available modules are in  /etc/apache2/mods-available directory, to enable them issue &#8221; <strong>a2enmod MOD_NAME</strong> &#8220;.</p>
<p>Now create the production database(on server) and update database.yml for production database settings.</p>
<p>After this configure mongrel by issuing &#8221; <strong>mongrel_rails cluster::configure -e production -p 8000 -a 127.0.0.1 -N 2 -c ./</strong> &#8221; inside the rails application root directory(on client machine). This will create mongrel_cluster.yml in config directory. You can change parameters in this command, as -p 8000 specifies that mongrel instances  will start  up on port  number starting 8000, -a 127.0.0.1 specifies that mongrel instances will listen to the localhost, -N specifies the number of mongrel instances and -c specifies the rails root directory.</p>
<p>Now its time to capistranize rails application, issue &#8221; <strong>cap &#8211;apply-to ./ APP_NAME</strong> &#8221; inside rails application root directory(on client machine), this will add two files(config/deploy.rb and lib/tasks/capistrano.rake) to the rails application. Edit deploy.rb according to your requirements. Also add the following code to deploy.rb :</p>
<textarea name="code" class="ruby" cols="50" rows="10">
task :restart, :roles => :app do
# stop mongrel clusters for previous release and start for current
run "cd #{previous_release} &#038;& mongrel_rails cluster::stop"
run "sleep 5"
run "cd #{current_release} &#038;& mongrel_rails cluster::start"
end
</textarea>
<p>Now on your local machine issue these two commands in only once &#8221; <strong>rake remote:setup</strong> &#8221; and &#8221; <strong>rake remote:cold_deploy</strong> &#8220;, when you issue &#8221; <strong>rake remote:setup</strong> &#8221; it will prompt for the server password and create necessary directories on the server and &#8221; <strong>rake remote:cold_deploy</strong> &#8221; will deploy your code to the server. Next time whenever you want to deploy to the server you just need to issue &#8221; <strong>rake remote:deploy</strong> &#8221; not &#8221; <strong>rake remote:cold_deploy</strong> &#8220;.</p>
<p>Now we are just one step back, we need to configure apache proxy balancer for mongrel instances. Add the following code to the httpd.conf file:</p>
<textarea name="code" class="c++" cols="50" rows="10">

<Proxy balancer://mongrel_cluster>
BalancerMember http://127.0.0.1:8000
BalancerMember http://127.0.0.1:8001
</Proxy>

<VirtualHost *:80>
ServerName myapp.com
DocumentRoot /rails_apps/app/public

<Directory "/rails_apps/app/public">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

RewriteEngine On


RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]


RewriteRule ^/$ /index.html [QSA]
# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]


RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
</virtualHost>
</textarea>
<p>you need to change the above code according to you requirement. Also you need to restart apache server by issuing &#8221; <strong>/etc/init.d/apachectl restart</strong> &#8220;. Now you are done.</p>
<p>But we also need to add a script to start mongrel instances when the server restarts, otherwise whenever the server restart there will no mongrel instance running.</p>
<p>Just create a file named mongrel_clusters (you can choose any name) in /etc/init.d directory with the following code:</p>
<textarea name="code" class="c++" cols="50" rows="10">

#!/bin/bash
#
# chkconfig: 345 94 16
# description: Startup script for mongrel
BASEDIR=/var/www/your_app
export HZ=100
export TERM=linux
export SHELL=/bin/bash
export HUSHLOGIN=FALSE
export USER=root
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
export MAIL=/var/mail/root
export _=/usr/bin/env
export PWD=/etc/init.d
export HOME=/root
export SHLVL=2
export LOGNAME=root

cd $BASEDIR
case "$1" in
start)
echo "starting up mongrel in $BASEDIR"
mongrel_rails cluster::start
;;
stop)
echo "stopping mongrel"
mongrel_rails cluster::stop
;;
restart)
mongrel_rails cluser::stop
sleep 3
mongrel_rails cluster::start
;;
esac
</textarea>
<p>You need to change the BASEDIR in the above code. Make this file executable by &#8221; <strong>chmod +x /etc/init.d/mongrel_clusters</strong> &#8221;<br />
Issue these commands to add this script at system startup:</p>
<p><strong>Debian:</strong><strong> /usr/sbin/update-rc.d /etc/init.d/mongrel_clusters defaults</strong><br />
<strong>RedHat:</strong>  <strong>/usr/sbin/chkconfig &#8211;add /etc/init.d/mongrel_clusters</strong> and <strong>/usr/sbin/chkconfig &#8211;level 2 /etc/init.d/mongrel_clusters on</strong></p>
<p>Note: Use above instructions at your own risk, if your computer explodes its not my fault :-)
</p>
]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2007/02/04/apache-proxy-balancer-mongrel-clusters-and-deploying-application-with-capistrano/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash script for creating new rails project and initial SVN import (with ignoring/removing log/other files)</title>
		<link>http://vinsol.com/blog/2007/01/10/bash-script-for-creating-new-rails-project-and-initial-svn-import-with-ignoringremoving-logother-files/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=bash-script-for-creating-new-rails-project-and-initial-svn-import-with-ignoringremoving-logother-files</link>
		<comments>http://vinsol.com/blog/2007/01/10/bash-script-for-creating-new-rails-project-and-initial-svn-import-with-ignoringremoving-logother-files/#comments</comments>
		<pubDate>Wed, 10 Jan 2007 13:43:48 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://webonrails.com/2007/01/10/bash-script-for-creating-new-rails-project-and-initial-svn-import-with-ignoringremoving-logother-files/</guid>
		<description><![CDATA[Many times we need to create a new rails project and import it to SVN repository. Each time we have to repeat same commands for creating new rails project, Initial import to SVN, Ignoring *.log files, move database.yml to database.example, ignoring tmp/sessions etc.. etc..
So I have written a bash script that do all this stuff, [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Many times we need to create a new rails project and import it to SVN repository. Each time we have to repeat same commands for creating new rails project, Initial import to SVN, Ignoring *.log files, move database.yml to database.example, ignoring tmp/sessions etc.. etc..</p>
<p>So I have written a bash script that do all this stuff, all you need to do is copy <a  href="http://webonrails.com/wp-content/uploads/create_rails_with_subversion">this</a> file to any of your directory and execute this script by issuing ./create_rails_with_subversion &#038; follow screen instructions.</p>
<p>This will:</p>
<ul>
<li>create a new rails project</li>
<li>initial import to SVN</li>
<li>remove and ignore all log files from svn</li>
<li>remove and ignore sessions, cache sockets files from tmp dir</li>
<li>move database.yml to database.example</li>
<li>ignore database.yml</li>
</ul>
<p>Download script from <a  title="create rails with svn (bash script)" href="http://webonrails.com/wp-content/uploads/create_rails_with_subversion">here</a>.</p>
<p>I also love to have your feedbacks&#8230;
</p>
]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2007/01/10/bash-script-for-creating-new-rails-project-and-initial-svn-import-with-ignoringremoving-logother-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing subversion from pre-compiled packages or source code</title>
		<link>http://vinsol.com/blog/2006/11/07/installing-subversion-from-pre-compiled-packages-or-source-code/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=installing-subversion-from-pre-compiled-packages-or-source-code</link>
		<comments>http://vinsol.com/blog/2006/11/07/installing-subversion-from-pre-compiled-packages-or-source-code/#comments</comments>
		<pubDate>Tue, 07 Nov 2006 21:11:49 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://webonrails.com/2006/11/07/installing-subversion-from-pre-compiled-packages-or-source-code/</guid>
		<description><![CDATA[What is subversion(svn):
Subversion is an open source version control system used for keep track of change to source code. Subversion manages files and directories over time an increments revision made to the file system.  A tree of file is placed into a central repository. The repository is much like an ordinary file server, except [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><strong>What is subversion(svn):</strong></p>
<p>Subversion is an open source version control system used for keep track of change to source code. Subversion manages files and directories over time an increments revision made to the file system.  A tree of file is placed into a central repository. The repository is much like an ordinary file server, except that it remembers every change ever made to your files and directories. This allows you to recover older version of your date or examine the history of how your data changed.</p>
<p>Subversion can access its repository across networks, which allows it to be used by people on different computers. At some level, the ability for various people to modify and manage the same set of data from their respective locations fosters collaboration.</p>
<p><strong>Installation:</strong></p>
<p>There are two types of installation:</p>
<ol>
<li>Installation from pre-compiled packages</li>
<li>Installation from source code</li>
</ol>
<p><strong>Installation from packages:</strong></p>
<p>For RedHat Linux(or other Linux distributions which supports RPM) download subversion RPM package and install. See  manual of rpm utility for installation.</p>
<p>For Debian Linux issue <code> apt-get install subversion</code> and by confirming the installation you are done. I also recommend to install subversion-tools by issuing <code> apt-get install subversion-tools</code>.</p>
<p><strong>Installation from source:<br />
</strong></p>
<p>Installation from source code is slightly tricky. First of all download latest version of subversion code from <a href="http://subversion.tigris.org">http://subversion.tigris.org</a>.</p>
<p>Now extract source to your preferred directory (lets assume /home/testuser/svncode/),  and  issue the following command in sequence after switching to svncode directory:</p>
<pre><code>
./configure
make
make install
</code></pre>
<p>&#8216;./configure&#8217; will create Makefile<br />
&#8216;make&#8217; makes Subversion form the just-created Makefile<br />
&#8216;make install&#8217; install Subversion if make was succeed  And you are done&#8230;.</p>
<p>Issue <code>svnadmin create /home/testuser/repository</code> to create a new repository, this should create a directory structure like:</p>
<pre><code>drwxrwxrwx   7 root root 4096 2006-11-07 17:18 .
drwxrwxrwx  14 root root 4096 2006-11-07 17:18 ..
drwxrwxrwx   2 root root 4096 2006-11-07 17:18 con
drwxrwxrwx   2 root root 4096 2006-11-07 17:18 dav
drwxrwxrwx   2 root root 4096 2006-11-07 17:18 db
-rwxrwxrwx   1 root root    2 2006-11-07 17:18 format
drwxrwxrwx   2 root root 4096 2006-11-07 17:18 hooks
drwxrwxrwx   2 root root 4096 2006-11-07 17:18 locks
-rwxrwxrwx   1 root root  379 2006-11-07 17:18 README.txt</code></pre>
<p>Now we need to allow remote access to it so that users can import their files. By editing <code>conf/svnserve.conf</code> we can set user accounts, permissions.</p>
<p>Initially svnserve.conf looks like:</p>
<pre><code>### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository.  (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit <a title="http://subversion.tigris.org/" rel="nofollow" href="http://subversion.tigris.org/">http://subversion.tigris.org/</a> for more information.
### [general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are &#8220;write&#8221;, &#8220;read&#8221;,
### and &#8220;none&#8221;.  The sample settings below are the defaults.
### anon-access = write
### auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file&#8217;s location is relative to the conf directory.
### The format of the password database is similar to this file.
### It contains one section labelled [users]. The name and
### password for each user follow, one account per line. The
### format is
### USERNAME = PASSWORD
### Please note that both the user name and password are case
### sensitive. There is no default for the password file.
### password-db = passwd
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa.  The default realm
### is repository&#8217;s uuid.
### realm = My First Repository</code></pre>
<p>Uncomment line containing &#8216;[general]&#8216;, &#8216;anon-access&#8217;, &#8216;auth-access&#8217; and &#8216;password-db&#8217; with suitable permissions. Also add file named passwd parallel to svnserve.conf containing</p>
<pre><code>[users]SVNUSERNAME = SVNUSERPASSOWRD</code></pre>
<p>You can add as many users you want. Now you are done with user accounts and permissions.</p>
<p>Next you have to start the svnserver by issuing <code>svnserve -d -r /home/testuser/repository</code>.</p>
<p>Now you are ready with your subversion server, you can access your repository from <code>svn://yourdomain.com/repository/</code></p>
<p>On some systems (like Debian GNU/Linux) this requires to write an init script so that the server starts up every time the system is rebooted. This could be done by creating a file called <code>svnserve</code> in the <code>/etc/init.d</code> directory, and then editing it to look like the following example file:</p>
<pre><code>
#! /bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/svnserve NAME=svnserve DESC="SVN Repository Server Daemon"
test -x $DAEMON || exit 0
OPTIONS="-d -r /cvs/src"
# Get lsb functions
#. /lib/lsb/init-functions
. /etc/default/rcS start() {        echo "Starting $DESC... "
#       echo "Starting $DESC: "
if ! start-stop-daemon --start --quiet --oknodo --exec $DAEMON -- $OPTIONS
&gt;/dev/null 2&gt;&#038;1; then
status=$?
echo $status
return $status
fi        log_end_msg 0
return 0
}
case "$1" in
start)
start
;;
stop)
echo "Stopping $DESC: "
start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
echo $?
;;
restart|force-reload)
$0 stop
sleep 1
start
#echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" &gt;&#038;2
exit 1
;;
esac exit 0</code></pre>
<p>This script also allows to manually start and stop the svnserver service whenever needed. Note: be sure and change the <code>OPTIONS</code> line to reflect the location of your repository; in our previous example this location was <code>/home/testuser/repository</code>. Once this file is created and edited to look like the previous example, you need to <code>chmod</code> the script to be executable by issuing <code>chmod +x /etc/init.d/svnserve</code> and also set it to startup at boot time by issuing <code>update-rc.d svnserve defaults<br />
</code></p>
<p>Now simply start/stop the service by issuing:</p>
<p><code>/etc/init.d/svnserve start/stop</code></p>
<p>Please refer <a href="http://svnbook.red-bean.com/">Subversion book</a> for more help and usage.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2006/11/07/installing-subversion-from-pre-compiled-packages-or-source-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

