<?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>Joe's Linux Blog &#187; Configuration</title>
	<atom:link href="http://joseph.freivald.com/linux/category/configuration/feed/" rel="self" type="application/rss+xml" />
	<link>http://joseph.freivald.com/linux</link>
	<description>Linux Admin tips and tricks</description>
	<lastBuildDate>Sat, 31 Dec 2011 07:36:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Updates?</title>
		<link>http://joseph.freivald.com/linux/2011/08/26/updates/</link>
		<comments>http://joseph.freivald.com/linux/2011/08/26/updates/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 02:54:52 +0000</pubDate>
		<dc:creator>jfreivald</dc:creator>
				<category><![CDATA[ALIX]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Publishing]]></category>

		<guid isPermaLink="false">http://joseph.freivald.com/linux/?p=159</guid>
		<description><![CDATA[Okay people, sorry for the long hiatus. Between work, having our youngest son finish high school and going through a divorce, you have all taken a back seat for quite a long time. A lot has been happening in the mean time! Centos 6 is here! Plus we&#8217;ve got an update to Centos 5, not [...]]]></description>
			<content:encoded><![CDATA[<p>Okay people, sorry for the long hiatus.  Between work, having our youngest son finish high school and going through a divorce, you have all taken a back seat for quite a long time.</p>
<p>A lot has been happening in the mean time!  Centos 6 is here!  Plus we&#8217;ve got an update to Centos 5, not to mention several iterations of Qt.  So I have my work cut out for me!</p>
<p>Here is what I plan to do.  First, the existing yum tree for software.freivald.com really kind of sucks.  I&#8217;m going to set up a new tree that compartmentalizes things better. Then I&#8217;ll push an update to the software.freivald.com-repo package that will point to the new repository.  That way, everyone should have a quick, easy migration to the new tree without having to do anything but your standard &#8216;yum update&#8217;.</p>
<p>The new tree will be renamed to el5 instead of centos because we have a lot of RHEL users as well, and I don&#8217;t want them to feel left out.  It will also support multiple versions of the OS, from the current supported releases all the way through 6, in one tree.  This should make it easy for users to find stuff, and minimize my work load to support all of the platforms in the long-term.</p>
<p>As for you loyal ALIX users, part of generating the new repository will involve setting up new virtual machines for each supported version.  During that process I plan to set up the new Alix images, both for Centos 5 and 6.  I&#8217;ll make improvements to the images based on the comments that I&#8217;ve received, and then push them to the web.  As you already know, image updates are a manual process.</p>
<p>Once that&#8217;s all done, I plan to find a better content management system and change from a wordpress blog into more of a kind of support-site type thingy so that Qt users don&#8217;t have to wade through ALIX stuff, so that I can add new items without causing the old ones to scroll of the screen, and so that I can maintain static link addresses for various types of stuff (i.e: joseph.freivald.com/qt would always go to the Qt page, etc.), which will help your favorite search engine find stuff easier.  I would appreciate suggestions here, as I find web-based stuff tedious and annoying.  In fact, if someone wanted to give back some time to me and help me get a new site configured, I would be really, really appreciative.</p>
<p>Well that&#8217;s pretty much it.  If anyone is stopping by the Offutt Airforce Base Air-Show on Saturday, stop by the US Coast Guard Academy booth and see me!</p>
<p>Cheers.</p>
<p>&#8211;JATF</p>
]]></content:encoded>
			<wfw:commentRss>http://joseph.freivald.com/linux/2011/08/26/updates/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Qt 4.7.1, alix and Qt for el6 and other housekeeping</title>
		<link>http://joseph.freivald.com/linux/2010/11/17/qt-4-7-1-delay-and-el6/</link>
		<comments>http://joseph.freivald.com/linux/2010/11/17/qt-4-7-1-delay-and-el6/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 04:59:05 +0000</pubDate>
		<dc:creator>jfreivald</dc:creator>
				<category><![CDATA[ALIX]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Publishing]]></category>

		<guid isPermaLink="false">http://joseph.freivald.com/linux/?p=145</guid>
		<description><![CDATA[Sorry for the delay in getting 4.7.1 out. I&#8217;m jammed up at work. I hope to get it out in the next week or so. When Centos 6 is released I&#8217;ll be building Qt packages and ALIX images for it but I will not be abandoning el5 until it is EOL. Lord thank you for [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry for the delay in getting 4.7.1 out.  I&#8217;m jammed up at work.  I hope to get it out in the next week or so.</p>
<p>When Centos 6 is released I&#8217;ll be building Qt packages and ALIX images for it but I will not be abandoning el5 until it is EOL. Lord thank you for Virtual Machines!</p>
<p>I will also be re-configuring the repositories to make them  non-centos specific.  I&#8217;ll be using &#8216;qt-el&#8217; instead of &#8216;centos&#8217; to eliminate  confusion for RHEL users who have never heard of Centos. The update will involve moving the RPM packages to a new directory structure and updating the repository package.  The old /centos directories will have only the updated repository package in it, so when a &#8216;yum upgrade&#8217; is performed on an existing machine the new package will redirect the machine to the new directory structure.  A second  &#8216;yum update&#8217; will then upgrade the packages normally.</p>
<p>With any luck it will be entirely seamless to the community.</p>
<p>On a side note, we&#8217;re over 200 registered users, over 700,000 non-bot hits per month (over 670k from Yum and wget alone!), and easily keeping over 50GB of transfer per month, with a peak in October of over 110GB.  We&#8217;re #1 on Google&#8217;s search with &#8220;Qt Centos&#8221; and &#8220;ALIX Centos&#8221; and several others.  We have users in Russia, Germany, Italy, France, India, South Africa, the U.S., and dozens more, with hits coming from .com, .edu, .org and several other top-level domains.</p>
<p>Thank you to everyone for making this project worthwhile.</p>
<p>&#8211;JATF</p>
]]></content:encoded>
			<wfw:commentRss>http://joseph.freivald.com/linux/2010/11/17/qt-4-7-1-delay-and-el6/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Qt 4.6.3 and qt-creator 1.3.1-1 updates for Centos 5.5</title>
		<link>http://joseph.freivald.com/linux/2010/06/09/qt-4-6-3-and-qt-creator-1-3-1-1-updates-for-centos-5-5/</link>
		<comments>http://joseph.freivald.com/linux/2010/06/09/qt-4-6-3-and-qt-creator-1-3-1-1-updates-for-centos-5-5/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 16:49:16 +0000</pubDate>
		<dc:creator>jfreivald</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Centos Qt QtSDK]]></category>
		<category><![CDATA[Qt Updates]]></category>
		<category><![CDATA[QtSDK]]></category>

		<guid isPermaLink="false">http://joseph.freivald.com/linux/?p=113</guid>
		<description><![CDATA[I&#8217;ve built the Qt 4.6.3 packages for Centos 5.5. To install, as root, type: rpm -ivh http://software.freivald.com/centos/software.freivald.com-1.0.0-1.noarch.rpm yum update fontconfig fontconfig-devel qt4 qt4-devel qt4-doc qt4-postgresql qt4-odbc qt4-sqlite qt-creator Also, I&#8217;ve updated the qt-creator package to 1.3.1-1.  The issue with the package was that on the 64-bit environment, qt-creator continues to look into /usr/lib/qtcreator for it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve built the Qt 4.6.3 packages for Centos 5.5.</p>
<p>To install, as root, type:</p>
<pre>rpm -ivh http://software.freivald.com/centos/software.freivald.com-1.0.0-1.noarch.rpm
yum update fontconfig fontconfig-devel qt4 qt4-devel qt4-doc qt4-postgresql qt4-odbc qt4-sqlite qt-creator</pre>
<p>Also, I&#8217;ve updated the qt-creator package to 1.3.1-1.  The issue with the package was that on the 64-bit environment, qt-creator continues to look into /usr/lib/qtcreator for it&#8217;s plugins instead of /usr/lib64/qtcreator.  I added a link from /usr/lib/qtcreator to /usr/lib64/qtcreator in the x86_64 arch build.  This means that you should not install the 32-bit version and the 64 bit version on the same machine &#8211; but I&#8217;m not sure that was ever a good idea in the first place. <img src='http://joseph.freivald.com/linux/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Please post here if you have any issues with the Qt 4.6.3 build or the qtcreator 1.3.1-1.</p>
<p>I&#8217;ve also posted the public key that I use to sign the packages <a title="here" href="http://software.freivald.com/centos/RPM-GPG-KEY-software.freivald.com" target="_blank">here</a>.  To use it, as root, type:</p>
<pre>rpm --import http://software.freivald.com/centos/RPM-GPG-KEY-software.freivald.com</pre>
<p>NOTE: If you use yum-priorities you will need to set this repository  to the same level as &#8216;core&#8217; for these to install properly.  You&#8217;ll know  if you have a priorities issue because &#8216;yum install qt-creator&#8217; will  scream at you that you are missing libaries.  These libraries come in  the version that I compile but not in the Centos core distribution and  if the priorities are wrong it will pull those packages from core.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://joseph.freivald.com/linux/2010/06/09/qt-4-6-3-and-qt-creator-1-3-1-1-updates-for-centos-5-5/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Apache HTTP to HTTPS redirection with mod_rewrite</title>
		<link>http://joseph.freivald.com/linux/2010/05/18/apache-http-to-https-redirection-with-mod_rewrite/</link>
		<comments>http://joseph.freivald.com/linux/2010/05/18/apache-http-to-https-redirection-with-mod_rewrite/#comments</comments>
		<pubDate>Wed, 19 May 2010 00:00:07 +0000</pubDate>
		<dc:creator>jfreivald</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Web Publishing]]></category>

		<guid isPermaLink="false">http://joseph.freivald.com/linux/?p=109</guid>
		<description><![CDATA[I was trying to enforce ssl for my mail server, which runs on a Hostmonster shared host. I already had SSL configured and the https:// version of the mail server worked perfectly if I typed in the correct https:// url. Trying to find a mod_rewrite configuration that would work redirect http:// connections properly and not [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to enforce ssl for my mail server, which runs on a Hostmonster shared host.  I already had SSL configured and the https:// version of the mail server worked perfectly if I typed in the correct https:// url.  Trying to find a mod_rewrite configuration that would work redirect http:// connections properly and not give Server Error 500 was not so easy.</p>
<p>There are thousands of pages with &#8216;how to&#8217; get this to work &#8211; but most of them don&#8217;t.  It&#8217;s probably a problem with Apache versions or the setup that Hostmonster has, but I was finally able to devise a solution that works.  Place these lines in the .htaccess file of any directory you want to rewrite:</p>
<p>#Hostmonster doesn&#8217;t allow +FollowSymLinks, so we use +SymLinksIfOwnerMatch instead.<br />
Options +SymLinksIfOwnerMatch<br />
RewriteEngine On<br />
RewriteCond %{HTTPS} off<br />
RewriteRule   ^(.*)$ https://new.location.com/$1 [R=301,L]</p>
<p>This will check to see if SSL is being used.  If it isn&#8217;t, then it will redirect it to the new location and provide the client with the &#8220;permanently redirected&#8221; code (301).  This will help other scripts, bookmarks, etc., update themselves auto-magically so they don&#8217;t make the same mistake twice.</p>
<p>Cheers.</p>
<p>&#8211;JATF</p>
]]></content:encoded>
			<wfw:commentRss>http://joseph.freivald.com/linux/2010/05/18/apache-http-to-https-redirection-with-mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Qt 4.6.2 packages for Centos 5.4</title>
		<link>http://joseph.freivald.com/linux/2010/02/25/qt-4-6-2-packages-for-centos-5-4/</link>
		<comments>http://joseph.freivald.com/linux/2010/02/25/qt-4-6-2-packages-for-centos-5-4/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 21:25:13 +0000</pubDate>
		<dc:creator>jfreivald</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://joseph.freivald.com/linux/?p=83</guid>
		<description><![CDATA[UPDATE: New post for the new packages: http://joseph.freivald.com/linux/2010/06/09/qt-4-6-3-and-qt-creator-1-3-1-1-updates-for-centos-5-5/ The Qt4 packages for Centos are updated to 4.6.2 and Qt Creator is updated to 1.3.1. To install: rpm -ivh http://software.freivald.com/el/5/i386/os/software.freivald.com-2.0.0-0.el.noarch.rpm yum update fontconfig fontconfig-devel qt4 qt4-devel qt4-doc qt4-postgresql qt4-odbc qt4-sqlite qt-creator Verify that the versions are coming from software.freivald.com and enjoy.]]></description>
			<content:encoded><![CDATA[<p>UPDATE: New post for the new packages: <a title="http://joseph.freivald.com/linux/2010/06/09/qt-4-6-3-and-qt-creator-1-3-1-1-updates-for-centos-5-5/" href="http://joseph.freivald.com/linux/2010/06/09/qt-4-6-3-and-qt-creator-1-3-1-1-updates-for-centos-5-5/" target="_self">http://joseph.freivald.com/linux/2010/06/09/qt-4-6-3-and-qt-creator-1-3-1-1-updates-for-centos-5-5/</a></p>
<p>The Qt4 packages for Centos are updated to 4.6.2 and Qt Creator is updated to 1.3.1.</p>
<p>To install:</p>
<pre>rpm -ivh http://software.freivald.com/el/5/i386/os/software.freivald.com-2.0.0-0.el.noarch.rpm</pre>
<pre>yum update fontconfig fontconfig-devel qt4 qt4-devel qt4-doc qt4-postgresql qt4-odbc qt4-sqlite qt-creator</pre>
<p>Verify that the versions are coming from software.freivald.com and enjoy. <img src='http://joseph.freivald.com/linux/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://joseph.freivald.com/linux/2010/02/25/qt-4-6-2-packages-for-centos-5-4/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using rsync to update a website on hostmonster.com</title>
		<link>http://joseph.freivald.com/linux/2009/06/05/using-rsync-to-update-a-website-on-hostmonstercom/</link>
		<comments>http://joseph.freivald.com/linux/2009/06/05/using-rsync-to-update-a-website-on-hostmonstercom/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 03:32:10 +0000</pubDate>
		<dc:creator>jfreivald</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Web Publishing]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://joseph.freivald.com/linux/?p=29</guid>
		<description><![CDATA[I was working on a website with a software repository that had hard links in it. Linking reduces disk space on the server, and when mirroring with rsync, reduces the time needed to sync the entire mirror.  If you are using scp or ftp to push to the server it causes problems because those programs [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a website with a software repository that had hard links in it.  Linking reduces disk space on the server, and when mirroring with rsync, reduces the time needed to sync the entire mirror.  If you are using scp or ftp to push to the server it causes problems because those programs copy each link as a new file, meaning more bandwidth consumed, more time in transfer, and more disk space used on the server side.  Just what we wanted to avoid by using rsync in the first place.</p>
<p>So how do we use rsync to push our web site to the server when we don&#8217;t have access to any of the rsyncd configuration files and can&#8217;t work with anything higher in the file tree than our home directory?  Sure we could pay more for a dedicated server, but why?  Lets use the tools we have as a simple user to accomplish what we need cheaply and easily.</p>
<p>First, get ssh access for your host server.  Hostmonster requires a faxed copy of a picture ID and some other confirmation.  Whatever your host requires, follow their procedures.</p>
<p>Test your ssh connection by opening a terminal and typing:</p>
<pre>ssh <em>username</em>@<em>hostname</em></pre>
<p>It will ask you if you want to remember the host key and you should respond with a yes.</p>
<p>If you are able to enter your password and log in, you should be at your home directory on the host server. You should be able to see the files for your website with</p>
<pre>ls ~/public_html</pre>
<p>Type the following commands:</p>
<pre>mkdir ~/.ssh
chmod 700 ~/.ssh</pre>
<p>Log out and return to your local computer&#8217;s prompt and enter the following commands:</p>
<pre>ssh-keygen -t dsa -C <em>youremailaddress</em></pre>
<p>ssh-keygen will ask you some questions.  Using the default file name (/home/<em>username</em>/.ssh/id_dsa) is fine.  It will also prompt you for a password.  This will guard your ssh key, and you only have to type it once per session, so make it a good one.</p>
<p>Once complete, you should have two new files in ~/.ssh: id_dsa and id_dsa.pub.    Create a configuration shortcut:</p>
<pre>echo -e "host <em>shortname</em>\n\tHostName <em>hostname</em>\n\tUser <em>username</em>" &gt;&gt; ~/.ssh/config</pre>
<p>Where <em>shortname</em> is any name that you want to use to represent your website, <em>hostname</em> is the host that you are uploading to, and <em>username</em> is your login name on that server.</p>
<p>Now, send the public key to the server with:</p>
<pre>scp ~/.ssh/id_dsa.pub <em>username</em>@<em>hostname</em>:~/.ssh/authorized_keys2</pre>
<p>Now, to prevent yourself from having to type your password every time you want to copy files or log in, type:</p>
<pre>ssh-add</pre>
<p>and type your password.  This will put your ssh key into an &#8216;agent&#8217;, which will authorize you without a password for the rest of the time you are logged in.  After you log out you&#8217;ll have to do ssh-add again, but as long as you stay logged in you should be able to log into the hosting server with a simple:</p>
<pre>ssh <em>shortname</em></pre>
<p>No password, no nothing, and all encrypted, too.  Log out of the server and get back to a local prompt.</p>
<p>Change to your directory that has the local copy of your web site, such as:</p>
<pre>cd ~/public_html</pre>
<p>To push the update your web site, type the command is:</p>
<pre>rsync -e ssh -vramlHP --exclude '*.log' --numeric-ids --delete --delete-excluded --delete-after --delay-updates . <em>shortname</em>:~/public_html/</pre>
<p>To pull the webserver down to your local directory, the command is:</p>
<pre>rsync -e ssh -vralmHP --exclude '*.log' --numeric-ids --delete --delete-excluded --delete-after --delay-updates <em>shortname</em>:~/public_html/ .</pre>
<p>It will transmit only the changed data, saving you time, and will properly handle hard and soft links, which will save you space on the server.</p>
<p>Just to finish the job I put them into shell scripts by:</p>
<pre>mkdir ~/bin
echo -e '#!/bin/bash\n\nrsync -e ssh -vralHP --numeric-ids --delete --delete-excluded --delete-after --delay-updates <em>localdirectory</em> <em>shortname</em>:~/public_html/\n' &gt;&gt; ~/bin/pushsite
echo -e '#!/bin/bash\n\nrsync -e ssh -vralHP --numeric-ids --delete --delete-excluded --delete-after --delay-updates <em>shortname</em>:~/public_html/ <em>localdirectory</em>\n' &gt;&gt; ~/bin/pullsite
chmod +x ~/bin/pushsite ~/bin/pullsite</pre>
<p>Where <em>localdirectory</em> is where you want the site stored locally.</p>
<p>Now typing &#8216;pushsite&#8217; at a terminal prompt will push the update, and &#8216;pullsite&#8217; will pull it down from the server (assuming your local bin dir is in your path, which it is on most systems).  Assuming you have previously done an &#8216;ssh-add&#8217;, you won&#8217;t even need to use a password.</p>
<p>Of course, this doesn&#8217;t backup databases, just static files.  But if you are dealing with static files, rsync can&#8217;t be beat.  It will push and pull only the changes, and will properly handle hard and soft links without duplicating the files.</p>
<p>Happy publishing.</p>
]]></content:encoded>
			<wfw:commentRss>http://joseph.freivald.com/linux/2009/06/05/using-rsync-to-update-a-website-on-hostmonstercom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion, SSL and Apache for Secure, Passwordless, User-based repository access controls</title>
		<link>http://joseph.freivald.com/linux/2009/05/14/subversion-ssl-and-apache-for-secure-passwordless-user-based-repository-access-controls/</link>
		<comments>http://joseph.freivald.com/linux/2009/05/14/subversion-ssl-and-apache-for-secure-passwordless-user-based-repository-access-controls/#comments</comments>
		<pubDate>Thu, 14 May 2009 16:54:57 +0000</pubDate>
		<dc:creator>jfreivald</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://joseph.freivald.com/linux/?p=3</guid>
		<description><![CDATA[I get tired of passwords.  Password here, password there, everywhere a password. I am a systems designer who does a lot of admin out of necessity.  When I get tired enough of a task, I eliminate it. I use subversion on several projects to track documentation, source, configurations and more.  All of my servers are [...]]]></description>
			<content:encoded><![CDATA[<p>I get tired of passwords.  Password here, password there, everywhere a password.</p>
<p>I am a systems designer who does a lot of admin out of necessity.  When I get tired enough of a task, I eliminate it.</p>
<p>I use subversion on several projects to track documentation, source, configurations and more.  All of my servers are SSL only, and use user certificates for identity verification.  Here&#8217;s what I did to make passwordless, user-based restrictions on Subversion:</p>
<p>First, make sure that SSL is working on your apache server (if you get a server error when you do an https request, but http://yourserver.com:443 works then SSL is not set up right).</p>
<p>Put the following in /etc/httpd/conf.d/subversion.conf:</p>
<pre>&lt;Location /<em>yourSubversionWebLocation</em>&gt;
   DAV svn
   SVNParentPath <em>pathToYourSubversionFolder</em>

   AuthzSVNAccessFile /etc/httpd/<em>yourSubversionAccessFile</em>

   SSLRequireSSL
   SSLVerifyClient require
   SSLUserName SSL_CLIENT_S_DN_Email
   SetOutputFilter DEFLATE
&lt;/Location&gt;</pre>
<p>Some people might want to use SSL_CLIENT_S_DN_CN as the user name instead of the email, but in my case I use the CN to put the person&#8217;s real full name in the certificate, so the email worked out better.  Also, this way I can have jsmith@company1.com and jsmith@company2.com without a collision.  Use whichever works for your situation.</p>
<p>Put your repository access information into your SVN access file like this:</p>
<pre>[shared:/]
user1@yourplace.com = rw
user2@yourplace.com = rw
user3@yourplace.com = rw
readonlyuser@yourplace.com = r

[user1:/]
user1@yourplace.com = rw

[user2:/]
user2@yourplace.com = rw

[user3:/]
user3@yourplace.com = rw</pre>
<p>Generate your User SSL keys.  I do it with a script (lots of stuff on the web on how to set up your own CA, so I&#8217;m not re-hashing it here):</p>
<pre>#!/bin/bash

[ "$1" == "" ] &amp;&amp; exit -1;

openssl req -config openssl.myconf.cnf -new -sha1 -newkey rsa:1024 -nodes -keyout private/$1.key -out csr/$1.pem
openssl ca -config openssl.myconf.cnf -policy policy_anything -extensions usr_cert -out certs/$1.pem -infiles csr/$1.pem
openssl pkcs12 -export -clcerts -in certs/$1.pem -inkey private/$1.key -out userp12/$1.p12</pre>
<p>Be sure to use the same email addresses that you use in the SVN authorization file.</p>
<p>To access subversion from the command line, put the following into your .subverions/servers file.  Be certain that the file has strict permissions (chmod -R 0600 ~user1/.subversion; chmod -R 0600 ~user1/certs):</p>
<pre>[groups]
myrepositories = &lt;your server address&gt;</pre>
<pre>[myrepositories]</pre>
<pre>ssl-authority-files = /home/user1/certs/&lt;your CA file&gt;.crt</pre>
<pre>ssl-client-cert-file = /home/user1/certs/user1.p12</pre>
<pre>ssl-client-cert-password = &lt;user's certificate password&gt;</pre>
<p>To access it with a browser, import the CA and user certificates into the browser of your choice.  Users should then be able to select your web page and auto-magically get the right repositories with the right permissions.  No passwords needed.</p>
<p>If you want a pretty web interface for your repository, try out websvn.  Use the same SSL configuration information for your websvn.conf as you did for your subversion.conf, follow the install information for websvn, put your repositories into your config.php and you&#8217;re done.</p>
]]></content:encoded>
			<wfw:commentRss>http://joseph.freivald.com/linux/2009/05/14/subversion-ssl-and-apache-for-secure-passwordless-user-based-repository-access-controls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

