<?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>Ruby, Rails, OSX and Linux fun</title>
	<atom:link href="http://www.frederico-araujo.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.frederico-araujo.com</link>
	<description>Howto&#039;s, Tutorials and personal experience</description>
	<lastBuildDate>Wed, 14 Mar 2012 06:18:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Pem SSL cert for ejabberd from Comodo/PositiveSSL</title>
		<link>http://www.frederico-araujo.com/2012/03/04/pem-ssl-cert-for-ejabberd-from-comodopositivessl/</link>
		<comments>http://www.frederico-araujo.com/2012/03/04/pem-ssl-cert-for-ejabberd-from-comodopositivessl/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 11:32:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=302</guid>
		<description><![CDATA[cat server.csr server.key mydomain_com.crt PositiveSSLCA2.crt > ejabberd.pem]]></description>
			<content:encoded><![CDATA[<p><code>cat server.csr server.key mydomain_com.crt PositiveSSLCA2.crt > ejabberd.pem</code></p>
 <p><a href="http://www.frederico-araujo.com/?flattrss_redirect&amp;id=302&amp;md5=8fd7b4ecf38308ae0da13e57741977ca" title="Flattr" target="_blank"><img src="http://www.frederico-araujo.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2012/03/04/pem-ssl-cert-for-ejabberd-from-comodopositivessl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=frederico&amp;url=http%3A%2F%2Fwww.frederico-araujo.com%2F2012%2F03%2F04%2Fpem-ssl-cert-for-ejabberd-from-comodopositivessl%2F&amp;language=en_GB&amp;category=text&amp;title=Pem+SSL+cert+for+ejabberd+from+Comodo%2FPositiveSSL&amp;description=cat+server.csr+server.key+mydomain_com.crt+PositiveSSLCA2.crt+%3E+ejabberd.pem&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>smaller postgresql archive backups</title>
		<link>http://www.frederico-araujo.com/2012/03/04/smaller-postgresql-archive-backups/</link>
		<comments>http://www.frederico-araujo.com/2012/03/04/smaller-postgresql-archive-backups/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 11:29:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=299</guid>
		<description><![CDATA[# file: postgresql.conf archive_mode = on archive_command = &#8216;pg_compresslog %p &#8211; &#124; lzma > /mnt/backup/postgresql/wal/%f&#8217; # file: recovery.conf restore_command = &#8216;lzma -d -c /mnt/backup/postgresql/wal/%f &#124; pg_decompresslog &#8211; %p&#8217;]]></description>
			<content:encoded><![CDATA[<p># file: postgresql.conf<br />
archive_mode    = on<br />
archive_command = &#8216;pg_compresslog %p &#8211; | lzma > /mnt/backup/postgresql/wal/%f&#8217;</p>
<p># file: recovery.conf<br />
restore_command = &#8216;lzma -d -c /mnt/backup/postgresql/wal/%f | pg_decompresslog &#8211; %p&#8217;</p>
 <p><a href="http://www.frederico-araujo.com/?flattrss_redirect&amp;id=299&amp;md5=97f8bb4121c4ce708cd158087eebf5bc" title="Flattr" target="_blank"><img src="http://www.frederico-araujo.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2012/03/04/smaller-postgresql-archive-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=frederico&amp;url=http%3A%2F%2Fwww.frederico-araujo.com%2F2012%2F03%2F04%2Fsmaller-postgresql-archive-backups%2F&amp;language=en_GB&amp;category=text&amp;title=smaller+postgresql+archive+backups&amp;description=%23+file%3A+postgresql.conf%0D%0Aarchive_mode++++%3D+on%0D%0Aarchive_command+%3D+%27pg_compresslog+%25p+-+%7C+lzma+%3E+%2Fmnt%2Fbackup%2Fpostgresql%2Fwal%2F%25f%27%0D%0A%0D%0A%23+file%3A+recovery.conf%0D%0Arestore_command+%3D+%27lzma+-d+-c+%2Fmnt%2Fbackup%2Fpostgresql%2Fwal%2F%25f+%7C+pg_decompresslog+-+%25p%27%0D%0A%0D%0A&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Why EC2 still sux on disk IO</title>
		<link>http://www.frederico-araujo.com/2011/12/27/why-ec2-still-sux-on-disk-io/</link>
		<comments>http://www.frederico-araujo.com/2011/12/27/why-ec2-still-sux-on-disk-io/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 10:46:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=283</guid>
		<description><![CDATA[I won&#8217;t say anything, just see the numbers: all tests run 3-4 times: Small EC2 EBS added 16GB volume $50-80/month # dd bs=1M count=256 if=/dev/zero of=test oflag=dsync 256+0 records in 256+0 records out 268435456 bytes (268 MB) copied, 11.5874 s, 23.2 MB/s Small EC2 Root FS EBS # dd bs=1M count=256 if=/dev/zero of=test oflag=dsync 256+0 <a href='http://www.frederico-araujo.com/2011/12/27/why-ec2-still-sux-on-disk-io/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I won&#8217;t say anything, just see the numbers:</p>
<p>all tests run 3-4 times:</p>
<p>Small EC2 EBS added 16GB volume $50-80/month<br />
# dd bs=1M count=256 if=/dev/zero of=test oflag=dsync<br />
256+0 records in<br />
256+0 records out<br />
268435456 bytes (268 MB) copied, 11.5874 s, 23.2 MB/s</p>
<p>Small EC2 Root FS EBS<br />
# dd bs=1M count=256 if=/dev/zero of=test oflag=dsync<br />
256+0 records in<br />
256+0 records out<br />
268435456 bytes (268 MB) copied, 32.8698 s, 8.2 MB/s</p>
<p>Linode 1.5GB $54-60/month<br />
# dd bs=1M count=256 if=/dev/zero of=test oflag=dsync<br />
256+0 records in<br />
256+0 records out<br />
268435456 bytes (268 MB) copied, 2.25564 s, 119 MB/s</p>
<p>Tilaa.nl 1GB $30/month<br />
# dd bs=1M count=256 if=/dev/zero of=swapfile oflag=dsync<br />
256+0 records in<br />
256+0 records out<br />
268435456 bytes (268 MB) copied, 4.66885 s, 57.5 MB/s</p>
<p><a href="http://romanrm.ru/en/dd-benchmark" title="dd benchmark information" target="_blank">see dd benchmark information</a><br />
<div id="attachment_286" class="wp-caption alignleft" style="width: 810px"><a href="http://www.frederico-araujo.com/wp-content/uploads/2011/12/chartgo-1.png"><img src="http://www.frederico-araujo.com/wp-content/uploads/2011/12/chartgo-1.png" alt="Ec2 vs Linode vs Tilaa" title="Ec2 vs Linode vs Tilaa" width="800" height="400" class="size-full wp-image-286" /></a><p class="wp-caption-text">Ec2 vs Linode vs Tilaa</p></div></p>
 <p><a href="http://www.frederico-araujo.com/?flattrss_redirect&amp;id=283&amp;md5=fd84b882ae6d23dcbe3097a90488d407" title="Flattr" target="_blank"><img src="http://www.frederico-araujo.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2011/12/27/why-ec2-still-sux-on-disk-io/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=frederico&amp;url=http%3A%2F%2Fwww.frederico-araujo.com%2F2011%2F12%2F27%2Fwhy-ec2-still-sux-on-disk-io%2F&amp;language=en_GB&amp;category=text&amp;title=Why+EC2+still+sux+on+disk+IO&amp;description=I+won%27t+say+anything%2C+just+see+the+numbers%3A%0D%0A%0D%0Aall+tests+run+3-4+times%3A%0D%0A%0D%0ASmall+EC2+EBS+added+16GB+volume+%2450-80%2Fmonth%0D%0A%23+dd+bs%3D1M+count%3D256+if%3D%2Fdev%2Fzero+of%3Dtest+oflag%3Ddsync%0D%0A256%2B0+records+in%0D%0A256%2B0+records+out%0D%0A268435456+bytes+%28268+MB%29+copied%2C+11.5874+s%2C+23.2+MB%2Fs%0D%0A%0D%0ASmall+EC2+Root+FS+EBS+%0D%0A%23+dd+bs%3D1M+count%3D256+if%3D%2Fdev%2Fzero+of%3Dtest+oflag%3Ddsync%0D%0A256%2B0+records+in%0D%0A256%2B0+records+out%0D%0A268435456+bytes+%28268+MB%29+copied%2C+32.8698+s%2C+8.2+MB%2Fs%0D%0A%0D%0ALinode+1.5GB+%2454-60%2Fmonth%0D%0A%23+dd+bs%3D1M+count%3D256+if%3D%2Fdev%2Fzero+of%3Dtest+oflag%3Ddsync%0D%0A256%2B0+records+in%0D%0A256%2B0+records+out%0D%0A268435456+bytes+%28268+MB%29+copied%2C+2.25564+s%2C+119+MB%2Fs%0D%0A%0D%0ATilaa.nl+1GB+%2430%2Fmonth%0D%0A%23+dd+bs%3D1M+count%3D256+if%3D%2Fdev%2Fzero+of%3Dswapfile+oflag%3Ddsync%0D%0A256%2B0+records+in%0D%0A256%2B0+records+out%0D%0A268435456+bytes+%28268+MB%29+copied%2C+4.66885+s%2C+57.5+MB%2Fs%0D%0A%0D%0Asee+dd+benchmark+information%0D%0A%5Bcaption+id%3D%22attachment_286%22+align%3D%22alignleft%22+width%3D%22800%22+caption%3D%22Ec2+vs+Linode+vs+Tilaa%22%5D%5B%2Fcaption%5D&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>download rails 3.1.1 rdoc api</title>
		<link>http://www.frederico-araujo.com/2011/11/15/download-rails-3-1-1-rdoc-api/</link>
		<comments>http://www.frederico-araujo.com/2011/11/15/download-rails-3-1-1-rdoc-api/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 08:11:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=276</guid>
		<description><![CDATA[If you need to use the Rails API offline, you can download it here: rails311.tar.bz2 1.4M Nov 15 08:04 The package contants multiple gems rdoc: railties-3.1.1 rails-3.1.1 actionmailer-3.1.1 activemodel-3.1.1 activeresource-3.1.1 actionpack-3.1.1 activerecord-3.1.1 activesupport-3.1.1 sass-3.1.10 coffee-rails-3.1.1 coffee-script-2.2.0 You can browse online if you wish so : /rails311/index.html Generated by sdoc]]></description>
			<content:encoded><![CDATA[<p>If you need to use the Rails API offline, you can download it here: </p>
<p><strong><a href="http://www.frederico-araujo.com/wp-content/rails311.tar.bz2" title="rails api rdoc">rails311.tar.bz2</a> 1.4M Nov 15 08:04</strong></p>
<p>The package contants multiple gems rdoc: railties-3.1.1 rails-3.1.1 actionmailer-3.1.1  activemodel-3.1.1  activeresource-3.1.1 actionpack-3.1.1  activerecord-3.1.1 activesupport-3.1.1 sass-3.1.10 coffee-rails-3.1.1 coffee-script-2.2.0</p>
<p>You can browse online if you wish so : <a href="http://www.frederico-araujo.com/wp-content/rails311/index.html" title="rails 3.1.1 rdoc api" target="_blank">/rails311/index.html</a></p>
<p><em>Generated by <a href="https://github.com/voloko/sdoc" target="_blank">sdoc</a> </em></p>
 <p><a href="http://www.frederico-araujo.com/?flattrss_redirect&amp;id=276&amp;md5=fc9c17381ed52affed47409d6dad76e9" title="Flattr" target="_blank"><img src="http://www.frederico-araujo.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2011/11/15/download-rails-3-1-1-rdoc-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=frederico&amp;url=http%3A%2F%2Fwww.frederico-araujo.com%2F2011%2F11%2F15%2Fdownload-rails-3-1-1-rdoc-api%2F&amp;language=en_GB&amp;category=text&amp;title=download+rails+3.1.1+rdoc+api&amp;description=If+you+need+to+use+the+Rails+API+offline%2C+you+can+download+it+here%3A+%0D%0A%0D%0Arails311.tar.bz2+1.4M+Nov+15+08%3A04%0D%0A%0D%0AThe+package+contants+multiple+gems+rdoc%3A+railties-3.1.1+rails-3.1.1+actionmailer-3.1.1++activemodel-3.1.1++activeresource-3.1.1+actionpack-3.1.1++activerecord-3.1.1+activesupport-3.1.1+sass-3.1.10+coffee-rails-3.1.1+coffee-script-2.2.0%0D%0A%0D%0AYou+can+browse+online+if+you+wish+so+%3A+%2Frails311%2Findex.html%0D%0A%0D%0A%0D%0AGenerated+by+sdoc+%0D%0A&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>google places and address autocomplete demo</title>
		<link>http://www.frederico-araujo.com/2011/10/12/google-places-and-address-autocomplete-demo/</link>
		<comments>http://www.frederico-araujo.com/2011/10/12/google-places-and-address-autocomplete-demo/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 19:32:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[maps]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=268</guid>
		<description><![CDATA[This is a ruby on Rails demo app using Address autocomplete with google places API. I was experimenting with google places and I found it to be quite awesome. In this app you can search for a geocode address or establishments, move the marker and get the the GPS coordinates, and also get the gps <a href='http://www.frederico-araujo.com/2011/10/12/google-places-and-address-autocomplete-demo/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>This is a ruby on Rails demo app using Address autocomplete with google places API. </p>
<p>I was experimenting with google places and I found it to be quite awesome. </p>
<p>In this app you can search for a geocode address or establishments, move the marker and get the the GPS coordinates, and also get the gps coordinates out the search results. </p>
<p>it&#8217;s also possible to restrain the autocomplete results by limiting it to bounds: </p>
<p>  autocomplete.setBounds(defaultBounds);</p>
<p>here is the demo app: <a href="http://electric-sunrise-8410.heroku.com/" title="demo app" target="_blank">http://electric-sunrise-8410.heroku.com/</a><br />
source: <a href="https://github.com/fred/google_places_autocomplete" title="github source" target="_blank">https://github.com/fred/google_places_autocomplete</a></p>
 <p><a href="http://www.frederico-araujo.com/?flattrss_redirect&amp;id=268&amp;md5=4881ef839611943f4316eeb5fca094bf" title="Flattr" target="_blank"><img src="http://www.frederico-araujo.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2011/10/12/google-places-and-address-autocomplete-demo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=frederico&amp;url=http%3A%2F%2Fwww.frederico-araujo.com%2F2011%2F10%2F12%2Fgoogle-places-and-address-autocomplete-demo%2F&amp;language=en_GB&amp;category=text&amp;title=google+places+and+address+autocomplete+demo&amp;description=This+is+a+ruby+on+Rails+demo+app+using+Address+autocomplete+with+google+places+API.+%0D%0A%0D%0AI+was+experimenting+with+google+places+and+I+found+it+to+be+quite+awesome.+%0D%0A%0D%0AIn+this+app+you+can+search+for+a+geocode+address+or+establishments%2C+move+the+marker+and+get+the+the+GPS+coordinates%2C+and+also+get+the+gps+coordinates+out+the+search+results.+%0D%0A%0D%0Ait%27s+also+possible+to+restrain+the+autocomplete+results+by+limiting+it+to+bounds%3A+%0D%0A%0D%0A++autocomplete.setBounds%28defaultBounds%29%3B%0D%0A%0D%0Ahere+is+the+demo+app%3A+http%3A%2F%2Felectric-sunrise-8410.heroku.com%2F%0D%0Asource%3A+https%3A%2F%2Fgithub.com%2Ffred%2Fgoogle_places_autocomplete&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Installing MWForum on debian lenny and squeeze</title>
		<link>http://www.frederico-araujo.com/2011/08/23/installing-mwforum-on-debian-lenny-and-squeeze/</link>
		<comments>http://www.frederico-araujo.com/2011/08/23/installing-mwforum-on-debian-lenny-and-squeeze/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 04:25:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=240</guid>
		<description><![CDATA[Installing mwforum on Debian Lenny 5.0 and 6.0 There are many perl packages required by MWForum, Im not totally sure if all of them are required, but here is the list of packages that will get MWForum fully working with Image Uploading, Image resizing, attaching image, Avatar, text quote and email support. Install required debian <a href='http://www.frederico-araujo.com/2011/08/23/installing-mwforum-on-debian-lenny-and-squeeze/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Installing mwforum on Debian Lenny 5.0 and 6.0 </p>
<p>There are many perl packages required by MWForum, Im not totally sure if all of them are required, but here is the list of packages that will get MWForum fully working with Image Uploading, Image resizing, attaching image, Avatar, text quote and email support. </p>
<p><strong>Install required debian packages with aptitude:</strong></p>
<pre>
# aptitude install libgd-gd2-perl libgd2-xpm imagemagick libimage-base-bundle-perl libimage-magick-perl libimage-info-perl libimage-exif-perl libimage-base-perl libimage-imlib2-perl libimage-size-perl libgeo-ip-perl libgeo-ipfree-perl libemail-mime-perl libmail-sendmail-perl libmail-rfc822-address-perl libmail-sender-perl libmail-perl libnet-cidr-lite-perl libtext-reform-perl libtext-quoted-perl mysql-server libdbd-mysql-perl libdbi-perl libcompress-zlib-perl libwww-perl liburi-perl libxml-perl libxml-regexp-perl libxml-sax-expat-perl libxml-sax-perl libxml-xslt-perl perl-modules perlmagick libtext-iconv-perl libsocket6-perl  libtimedate-perl libnet-daemon-perl libmailtools-perl libhtml-clean-perl libhtml-format-perl libhtml-parser-perl libhtml-tree-perl libcflow-perl libdata-flow-perl apache2-mpm-prefork libapache2-mod-perl2 libapache2-mod-apreq2 libapreq2 libapache2-request-perl -V
</pre>
<p>Now check latest version for download from http://www.mwforum.org/forum/topic_show.pl?tid=4222<br />
In this setup I will put mwforum in /var/www/mwforum/htdocs/ (gentoo style folder) </p>
<p><strong>Download MWforum and extract</strong></p>
<pre>
# mkdir -p /var/www/mwforum/
# cd /var/www/mwforum/
# wget http://www.mwforum.org/dl/stable/mwforum-2.24.1.tar.gz
# tar xpf mwforum-2.24.1.tar.gz
# mkdir htdocs
# cp -a mwforum-2.24.1/script/* htdocs/
# cp -a mwforum-2.24.1/data/* htdocs/
</pre>
<p><strong> Setup Configuration files</strong></p>
<pre>
# cd ./htdocs
# mv MwfConfigGlobalDefault.pm MwfConfigGlobal.pm
# mv MwfConfigDefault.pm MwfConfig.pm
</pre>
<p>Edit config file with your mysql username/password, site name and url.</p>
<pre>
# vi MwfConfig.pm
</pre>
<p><strong>Inside Mysql shell create database and username/password for mwforum:</strong></p>
<pre>
mysql> CREATE DATABASE mwforum CHARSET=utf8;
Query OK, 1 row affected (0.30 sec)

mysql> GRANT ALL ON mwforum.* TO mwforum@localhost IDENTIFIED BY 'sk8hg4I2mxW';
Query OK, 0 rows affected (0.60 sec)

mysql> flush privileges;
</pre>
<p><strong>Install MWForum database:</strong></p>
<pre>
# perl install.pl
</pre>
<p><strong>Activate Apache modules: </strong></p>
<pre>
# a2enmod perl
# a2enmod apreq
# a2enmod headers
</pre>
<p><strong>Add the apache Virtualhost config file:</strong></p>
<pre>
# vi /etc/apache2/sites-availables/mwforum
</pre>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;
    <span style="color: #00007f;">ServerName</span> myforum.com
    <span style="color: #00007f;">ServerAlias</span> www.myforum.com
    <span style="color: #00007f;">ServerAdmin</span> webmaster@myforum.com
    <span style="color: #00007f;">DocumentRoot</span> /var/www/mwforum/htdocs
    <span style="color: #00007f;">DirectoryIndex</span> forum_show.pl
    <span style="color: #adadad; font-style: italic;">#XSendFile on</span>
    <span style="color: #adadad; font-style: italic;">#XSendFileAllowAbove on</span>
    <span style="color: #00007f;">ScriptAlias</span> /cgi-bin/ <span style="color: #7f007f;">&quot;/var/www/mwforum/htdocs/&quot;</span>
    &lt;<span style="color: #000000; font-weight:bold;">Directory</span> <span style="color: #7f007f;">&quot;/var/www/mwforum/htdocs&quot;</span>&gt;
        <span style="color: #00007f;">Options</span> +ExecCGI <span style="color: #0000ff;">FollowSymLinks</span> -<span style="color: #0000ff;">Indexes</span>
        <span style="color: #00007f;">AllowOverride</span> <span style="color: #0000ff;">All</span>
        <span style="color: #00007f;">Order</span> <span style="color: #00007f;">allow</span>,<span style="color: #00007f;">deny</span>
        <span style="color: #00007f;">Allow</span> from <span style="color: #0000ff;">all</span>
    &lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;
    <span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">On</span>
    <span style="color: #adadad; font-style: italic;"># Uncomment to force redirect to https, but you need to create https vhost</span>
    <span style="color: #adadad; font-style: italic;"># RewriteCond %{HTTPS} off</span>
    <span style="color: #adadad; font-style: italic;"># RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}</span>
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</pre></td></tr></table></div>

<p><strong>Add PerlSwitches:</strong></p>
<pre>
# vi /etc/apache2/conf.d/mwforum
</pre>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="apache" style="font-family:monospace;">PerlSwitches -I/var/www/mwforum/htdocs
&lt;<span style="color: #000000; font-weight:bold;">Directory</span> /var/www/mwforum/htdocs/&gt;
    <span style="color: #00007f;">DirectoryIndex</span> forum.pl
    <span style="color: #00007f;">Options</span> -<span style="color: #0000ff;">Indexes</span>
    &lt;<span style="color: #000000; font-weight:bold;">Files</span> <span style="color: #7f007f;">&quot;*.pl&quot;</span>&gt;
        <span style="color: #00007f;">Options</span> +ExecCGI
        <span style="color: #00007f;">SetHandler</span> perl-<span style="color: #00007f;">script</span>
        PerlResponseHandler ModPerl::Registry
        PerlOptions -SetupEnv -ParseHeaders
    &lt;/<span style="color: #000000; font-weight:bold;">Files</span>&gt;
    &lt;<span style="color: #000000; font-weight:bold;">Files</span> <span style="color: #7f007f;">&quot;*.pm&quot;</span>&gt;
        <span style="color: #00007f;">Deny</span> from <span style="color: #0000ff;">all</span>
    &lt;/<span style="color: #000000; font-weight:bold;">Files</span>&gt;
&lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;</pre></td></tr></table></div>

<p>Now activate mwforum and check for configurations</p>
<pre>
# a2ensite mwforum
# apache2ctl configtest
Syntax OK
</pre>
<p>If syntax OK, then restart</p>
<pre>
# /etc/init.d/apache2 restart
</pre>
<p><strong>Security and Cleanup:</strong></p>
<pre>
# rm install.pl upgrade.pl
# cat ./mwforum-2.24.1/example/script.htaccess >> htdocs/.htacess
# cat ./mwforum-2.24.1/example/attach.htaccess >> htdocs/.htacess
</pre>
 <p><a href="http://www.frederico-araujo.com/?flattrss_redirect&amp;id=240&amp;md5=229615f1a14529ac7189198bab3905f2" title="Flattr" target="_blank"><img src="http://www.frederico-araujo.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2011/08/23/installing-mwforum-on-debian-lenny-and-squeeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=frederico&amp;url=http%3A%2F%2Fwww.frederico-araujo.com%2F2011%2F08%2F23%2Finstalling-mwforum-on-debian-lenny-and-squeeze%2F&amp;language=en_GB&amp;category=text&amp;title=Installing+MWForum+on+debian+lenny+and+squeeze&amp;description=Installing+mwforum+on+Debian+Lenny+5.0+and+6.0+%0D%0A%0D%0AThere+are+many+perl+packages+required+by+MWForum%2C+Im+not+totally+sure+if+all+of+them+are+required%2C+but+here+is+the+list+of+packages+that+will+get+MWForum+fully+working+with+Image+Uploading%2C+Image+resizing%2C+attaching+image%2C+Avatar%2C+text+quote+and+email+support.+%0D%0A%0D%0AInstall+required+debian+packages+with+aptitude%3A%0D%0A%0D%0A%0D%0A%23+aptitude+install+libgd-gd2-perl+libgd2-xpm+imagemagick+libimage-base-bundle-perl+libimage-magick-perl+libimage-info-perl+libimage-exif-perl+libimage-base-perl+libimage-imlib2-perl+libimage-size-perl+libgeo-ip-perl+libgeo-ipfree-perl+libemail-mime-perl+libmail-sendmail-perl+libmail-rfc822-address-perl+libmail-sender-perl+libmail-perl+libnet-cidr-lite-perl+libtext-reform-perl+libtext-quoted-perl+mysql-server+libdbd-mysql-perl+libdbi-perl+libcompress-zlib-perl+libwww-perl+liburi-perl+libxml-perl+libxml-regexp-perl+libxml-sax-expat-perl+libxml-sax-perl+libxml-xslt-perl+perl-modules+perlmagick+libtext-iconv-perl+libsocket6-perl++libtimedate-perl+libnet-daemon-perl+libmailtools-perl+libhtml-clean-perl+libhtml-format-perl+libhtml-parser-perl+libhtml-tree-perl+libcflow-perl+libdata-flow-perl+apache2-mpm-prefork+libapache2-mod-perl2+libapache2-mod-apreq2+libapreq2+libapache2-request-perl+-V%0D%0A%0D%0A%0D%0ANow+check+latest+version+for+download+from+http%3A%2F%2Fwww.mwforum.org%2Fforum%2Ftopic_show.pl%3Ftid%3D4222+%0D%0AIn+this+setup+I+will+put+mwforum+in+%2Fvar%2Fwww%2Fmwforum%2Fhtdocs%2F+%28gentoo+style+folder%29+%0D%0A%0D%0ADownload+MWforum+and+extract%0D%0A%0D%0A%0D%0A%23+mkdir+-p+%2Fvar%2Fwww%2Fmwforum%2F%0D%0A%23+cd+%2Fvar%2Fwww%2Fmwforum%2F%0D%0A%23+wget+http%3A%2F%2Fwww.mwforum.org%2Fdl%2Fstable%2Fmwforum-2.24.1.tar.gz%0D%0A%23+tar+xpf+mwforum-2.24.1.tar.gz%0D%0A%23+mkdir+htdocs%0D%0A%23+cp+-a+mwforum-2.24.1%2Fscript%2F%2A+htdocs%2F%0D%0A%23+cp+-a+mwforum-2.24.1%2Fdata%2F%2A+htdocs%2F%0D%0A%0D%0A%0D%0A+Setup+Configuration+files%0D%0A%0D%0A%0D%0A%23+cd+.%2Fhtdocs%0D%0A%23+mv+MwfConfigGlobalDefault.pm+MwfConfigGlobal.pm%0D%0A%23+mv+MwfConfigDefault.pm+MwfConfig.pm%0D%0A%0D%0A%0D%0AEdit+config+file+with+your+mysql+username%2Fpassword%2C+site+name+and+url.%0D%0A%0D%0A%0D%0A%23+vi+MwfConfig.pm%0D%0A%0D%0A%0D%0AInside+Mysql+shell+create+database+and+username%2Fpassword+for+mwforum%3A%0D%0A%0D%0A%0D%0Amysql%3E+CREATE+DATABASE+mwforum+CHARSET%3Dutf8%3B%0D%0AQuery+OK%2C+1+row+affected+%280.30+sec%29%0D%0A%0D%0Amysql%3E+GRANT+ALL+ON+mwforum.%2A+TO+mwforum%40localhost+IDENTIFIED+BY+%27sk8hg4I2mxW%27%3B%0D%0AQuery+OK%2C+0+rows+affected+%280.60+sec%29%0D%0A%0D%0Amysql%3E+flush+privileges%3B%0D%0A%0D%0A%0D%0AInstall+MWForum+database%3A%0D%0A%0D%0A%0D%0A%23+perl+install.pl%0D%0A%0D%0A%0D%0AActivate+Apache+modules%3A+%0D%0A%0D%0A%0D%0A%23+a2enmod+perl%0D%0A%23+a2enmod+apreq+%0D%0A%23+a2enmod+headers%0D%0A%0D%0A%0D%0AAdd+the+apache+Virtualhost+config+file%3A%0D%0A%0D%0A%0D%0A%23+vi+%2Fetc%2Fapache2%2Fsites-availables%2Fmwforum%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A++++ServerName+myforum.com%0D%0A++++ServerAlias+www.myforum.com%0D%0A++++ServerAdmin+webmaster%40myforum.com%0D%0A++++DocumentRoot+%2Fvar%2Fwww%2Fmwforum%2Fhtdocs%0D%0A++++DirectoryIndex+forum_show.pl%0D%0A++++%23XSendFile+on%0D%0A++++%23XSendFileAllowAbove+on%0D%0A++++ScriptAlias+%2Fcgi-bin%2F+%22%2Fvar%2Fwww%2Fmwforum%2Fhtdocs%2F%22%0D%0A++++%0D%0A++++++++Options+%2BExecCGI+FollowSymLinks+-Indexes%0D%0A++++++++AllowOverride+All%0D%0A++++++++Order+allow%2Cdeny%0D%0A++++++++Allow+from+all%0D%0A++++%0D%0A++++RewriteEngine+On%0D%0A++++%23+Uncomment+to+force+redirect+to+https%2C+but+you+need+to+create+https+vhost%0D%0A++++%23+RewriteCond+%25%7BHTTPS%7D+off%0D%0A++++%23+RewriteRule+%28.%2A%29+https%3A%2F%2F%25%7BHTTP_HOST%7D%25%7BREQUEST_URI%7D%0D%0A%0D%0A%0D%0A%0D%0A%0D%0AAdd+PerlSwitches%3A%0D%0A%0D%0A%0D%0A%23+vi+%2Fetc%2Fapache2%2Fconf.d%2Fmwforum+%0D%0A%0D%0A%0D%0A%0D%0APerlSwitches+-I%2Fvar%2Fwww%2Fmwforum%2Fhtdocs%0D%0A%0D%0A++++DirectoryIndex+forum.pl%0D%0A++++Options+-Indexes%0D%0A++++%0D%0A++++++++Options+%2BExecCGI%0D%0A++++++++SetHandler+perl-script%0D%0A++++++++PerlResponseHandler+ModPerl%3A%3ARegistry%0D%0A++++++++PerlOptions+-SetupEnv+-ParseHeaders%0D%0A++++%0D%0A++++%0D%0A++++++++Deny+from+all%0D%0A++++%0D%0A%0D%0A%0D%0A%0D%0ANow+activate+mwforum+and+check+for+configurations%0D%0A%0D%0A%0D%0A%23+a2ensite+mwforum%0D%0A%23+apache2ctl+configtest%0D%0ASyntax+OK%0D%0A%0D%0A%0D%0AIf+syntax+OK%2C+then+restart%0D%0A%0D%0A%0D%0A%23+%2Fetc%2Finit.d%2Fapache2+restart%0D%0A%0D%0A%0D%0A%0D%0ASecurity+and+Cleanup%3A%0D%0A%0D%0A%0D%0A%23+rm+install.pl+upgrade.pl%0D%0A%23+cat+.%2Fmwforum-2.24.1%2Fexample%2Fscript.htaccess+%3E%3E+htdocs%2F.htacess%0D%0A%23+cat+.%2Fmwforum-2.24.1%2Fexample%2Fattach.htaccess+%3E%3E+htdocs%2F.htacess%0D%0A&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Installing Rails on OS X Lion with HomeBrew, RVM and Mysql</title>
		<link>http://www.frederico-araujo.com/2011/07/30/installing-rails-on-os-x-lion-with-homebrew-rvm-and-mysql/</link>
		<comments>http://www.frederico-araujo.com/2011/07/30/installing-rails-on-os-x-lion-with-homebrew-rvm-and-mysql/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 19:06:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=229</guid>
		<description><![CDATA[Bye Bye Macports, Welcome Homebrew Definition Homebrew: The missing package manager for OS X Why? well, the reality is, macports is not that good anymore. Once you have many packages installed and start updating, everything start to break apart, lot&#8217;s of failing packages. Homebrew is very easy to install, it&#8217;s fast and simple. That means <a href='http://www.frederico-araujo.com/2011/07/30/installing-rails-on-os-x-lion-with-homebrew-rvm-and-mysql/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h3>Bye Bye Macports, Welcome Homebrew</h3>
<p><strong>Definition</strong><br />
<em><strong>Homebrew: The missing package manager for OS X</strong></em></p>
<p>Why? well, the reality is, macports is not that good anymore.<br />
Once you have many packages installed and start updating, everything start to break apart, lot&#8217;s of failing packages.</p>
<p>Homebrew is very easy to install, it&#8217;s fast and simple. That means you can make your own homebrew formula for your package so easily. oh, and homebrew is in ruby! :)</p>
<p>Back to topic, this is you how you get rails with mysql up and running with homebrew and rvm.</p>
<p><strong>Clean up</strong></p>
<p>To make sure to have a clean install, I recommend removing any previous .rvm installation and previous Xcode.</p>
<pre>
$ rm -rf ~/.rvm/
$ sudo rm -rf /Developer
</pre>
<p><strong>1. Xcode</strong></p>
<p>Install Xcode from AppStore. it&#8217;s 1+ GB download so it may take a while.<br />
after it&#8217;s downloaded it will not install automatically, you need to open Applications and install again from there, the name will be &#8220;Install Xcode&#8221;.<br />
You also need to install Command Line Tools for Xcode.</p>
<p>Better way is to go to https://developer.apple.com/downloads/index.action and download from there, you will have to login with a free apple developer account.<br />
Download the 2 minimum require files</p>
<p>- Xcode 4.3.1 for Lion (1.85 GB)<br />
- Command Line Tools for Xcode (171.70 MB)</p>
<p><strong>Update:</strong> If you don&#8217;t want to download and install huge XCODE (3.0GB) :<br />
<a href="https://github.com/kennethreitz/osx-gcc-installer">https://github.com/kennethreitz/osx-gcc-installer</a><br />
It allows you to install the essential compilers, GCC, LLVM, etc.<br />
PS: I have not tested it<br />
Thanks <a href="http://vidarara.com/">JP</a> for the tip.</p>
<p><strong>2. Install HomeBrew</strong></p>
<p>UPDATE: in the comments some people recommended to do create the folder &#8220;/usr/local/Cellar&#8221; before hand, due to some bug on homebrew. </p>
<pre>
mkdir -p /usr/local/Cellar
</pre>
<pre>
$ /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
</pre>
<p>Installation instructions: <a href="https://github.com/mxcl/homebrew/wiki/installation" title="github.com/mxcl/homebrew/wiki/installation" target="_blank">https://github.com/mxcl/homebrew/wiki/installation</a></p>
<p><strong>3. install RVM</strong></p>
<pre>
$  bash -s master < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
</pre>
<p>Above im using the master branch, so that it works with xcode 4.3.1</p>
<p>Then after RVM is installed run these two 'one-line' commands, the second command will reload your bash with RVM. </p>
<pre>
$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] &#038;&#038; . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
$ source ~/.bash_profile
</pre>
<p>Details instructions: <a href="http://beginrescueend.com/rvm/install/" title="beginrescueend.com/rvm/install/" target="_blank">http://beginrescueend.com/rvm/install/</a></p>
<p>Note: you may have to add "--with-gcc=clang" to rvm for installing ruby 1.9.2 if you have Xcode 4.3+<br />
Read this: <a href="http://stackoverflow.com/a/9651747/1107516" title="Issue updating Ruby on Mac with Xcode 4.3.1" target="_blank">http://stackoverflow.com/a/9651747/1107516</a></p>
<p><strong>4. Install ruby 1.9.3-p125 </strong></p>
<p>OS X Lion comes with Ruby-1.8.7-p249, but we all want ruby 1.9.2/1.9.3 right?<br />
RVM head and Ruby 1.9.3-p125 supports XCODE 4.3.1 <a href="http://www.ruby-lang.org/en/news/2012/02/16/ruby-1-9-3-p125-is-released/" title="ruby-1-9-3-p125-is-released" target="_blank">http://www.ruby-lang.org/en/news/2012/02/16/ruby-1-9-3-p125-is-released/</a></p>
<pre>
$ rvm install 1.9.3-p125
$ rvm use ruby-1.9.3-p125
$ gem install rails bundler unicorn pg
... and so on ...
</pre>
<p>I tested both ruby-1.9.3-head and ruby-1.9.3-p0, and 1.9.3-p125, and it works well with all my apps. Ruby 1.9.3 is faster than 1.9.2 booting rails, and way way faster than 1.8.7. So let's use the lastest Stable Ruby (1.9.3-p0)</p>
<p>See: <a href="http://www.rubyinside.com/ruby-1-9-3-faster-loading-times-require-4927.html">Rails booting a lot faster</a>.</p>
<p><strong>NOTE: For Heroku I recommend you to use ruby-1.9.2-p290, if you use taps ("heroku db:pull/push")</strong></p>
<p><strong>Optionally</strong> you might want to install GIT, wget, <a href="http://betterthangrep.com/" title="akc">ack</a>, imagemagick and any other mighty software tools for daily use.</p>
<p>Example apps I'm usually required to install:</p>
<pre>
# brew install git ack wget curl redis memcached libmemcached colordiff imagemagick nginx sqlite libxml2 libxslt readline v8 rsync sphinx lzma geoip lzo
</pre>
<p></p>
<p><strong>5. Install Mysql </strong></p>
<pre>
$ brew install mysql
</pre>
<p>one-line command:</p>
<pre>
$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
</pre>
<p>Once mysql is installed you might want it to load automatically each time you start your mac.</p>
<pre>
$ mkdir -p ~/Library/LaunchAgents
$ cp /usr/local/Cellar/mysql/5.5.14/com.mysql.mysqld.plist ~/Library/LaunchAgents/
$ launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
</pre>
<p>*check that the version I use here is 5.5.14</p>
<p><strong>6. Troubleshooting:</strong></p>
<p>if you have problems with mysql "cannot connect to /tmp/mysql.sock"<br />
then create a file /usr/local/etc/my.cnf and add this:</p>
<pre>
[client]
port = 3306
socket = /tmp/mysql.sock
[mysqld]
bind-address = 127.0.0.1
port = 3306
socket = /tmp/mysql.sock
</pre>
<p>if encounter errors with homebrew run this command and follow recommendations:</p>
<pre>
$ brew doctor
</pre>
<p>update: If you end up with Segmentation fault or cannot install Ruby-1.8.7, you might want to try <a href="http://stackoverflow.com/questions/6170813/why-cant-i-install-rails-on-lion-using-rvm">this solution</a>:</p>
<pre>
$ export CC=/usr/bin/gcc-4.2
$ rvm install ruby-1.8.7
</pre>
<p>Important, also read this if you have Xcode 4.3.1+ </p>
<p>http://stackoverflow.com/questions/9651670/issue-updating-ruby-on-mac-with-xcode-4-3-1</p>
<p>by the way this is my /usr/local/etc/my.cnf optimized file, when using this file you may have to recreate your db </p>
<pre>
$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
</pre>
<pre>
[client]
port = 3306
socket = /tmp/mysql.sock 

[mysqld]
event_scheduler = ON
skip-character-set-client-handshake
collation_server = utf8_unicode_ci
character_set_server = utf8 

bind-address = 127.0.0.1
port = 3306
socket = /tmp/mysql.sock
max_connections = 20

table_open_cache = 256
max_allowed_packet = 32M
binlog_cache_size = 1M
max_heap_table_size = 64M 

read_buffer_size = 2M
read_rnd_buffer_size = 2M
sort_buffer_size = 4M
join_buffer_size = 512k

thread_cache_size = 2
thread_concurrency = 2
query_cache_size = 16M
query_cache_limit = 2M 

default-storage-engine = INNODB
thread_stack = 192K
transaction_isolation = REPEATABLE-READ
tmp_table_size = 64M 

# MyISAM Options 

key_buffer_size = 32M
bulk_insert_buffer_size = 32M
myisam_sort_buffer_size = 32M
myisam_max_sort_file_size = 256M
myisam_repair_threads = 1
myisam_recover 

# INNODB Options
innodb_additional_mem_pool_size = 8M
innodb_buffer_pool_size = 64M
innodb_thread_concurrency = 2
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 8M
innodb_log_file_size = 8M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_flush_method = O_DIRECT
innodb_lock_wait_timeout = 120
innodb_file_per_table

[mysqldump]
quick
max_allowed_packet = 16M 

[mysql]
no-auto-rehash 

[myisamchk]
key_buffer_size = 64M
sort_buffer_size = 64M
read_buffer = 16M
write_buffer = 16M

[mysqlhotcopy]
interactive-timeout 
</pre>
<p><strong>UPDATED (Mar 14, 2012):</strong><br />
* Fixed homebrew install URL<br />
* changed from "#" to "$" to avoid confusion of running commands as root</p>
<p><strong>EDITED (Feb 10, 2012):</strong><br />
* updated for new RVM<br />
* source .bash_profile after editing it.<br />
* decreased memory settings for mysql<br />
* using ruby-1.9.3-p0<br />
* fixed minor bugs</p>
 <p><a href="http://www.frederico-araujo.com/?flattrss_redirect&amp;id=229&amp;md5=af6bb486c689d840a4808dc02bd532c1" title="Flattr" target="_blank"><img src="http://www.frederico-araujo.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2011/07/30/installing-rails-on-os-x-lion-with-homebrew-rvm-and-mysql/feed/</wfw:commentRss>
		<slash:comments>71</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=frederico&amp;url=http%3A%2F%2Fwww.frederico-araujo.com%2F2011%2F07%2F30%2Finstalling-rails-on-os-x-lion-with-homebrew-rvm-and-mysql%2F&amp;language=en_GB&amp;category=text&amp;title=Installing+Rails+on+OS+X+Lion+with+HomeBrew%2C+RVM+and+Mysql&amp;description=Bye+Bye+Macports%2C+Welcome+Homebrew%0D%0A%0D%0ADefinition%0D%0AHomebrew%3A+The+missing+package+manager+for+OS+X%0D%0A%0D%0AWhy%3F+well%2C+the+reality+is%2C+macports+is+not+that+good+anymore.+%0D%0AOnce+you+have+many+packages+installed+and+start+updating%2C+everything+start+to+break+apart%2C+lot%27s+of+failing+packages.%0D%0A%0D%0AHomebrew+is+very+easy+to+install%2C+it%27s+fast+and+simple.+That+means+you+can+make+your+own+homebrew+formula+for+your+package+so+easily.+oh%2C+and+homebrew+is+in+ruby%21+%3A%29%0D%0A%0D%0A%0D%0ABack+to+topic%2C+this+is+you+how+you+get+rails+with+mysql+up+and+running+with+homebrew+and+rvm.%0D%0A%0D%0A%0D%0AClean+up%0D%0A%0D%0ATo+make+sure+to+have+a+clean+install%2C+I+recommend+removing+any+previous+.rvm+installation+and+previous+Xcode.%0D%0A%0D%0A%24+rm+-rf+%7E%2F.rvm%2F%0D%0A%24+sudo+rm+-rf+%2FDeveloper%0D%0A%0D%0A%0D%0A1.+Xcode%0D%0A%0D%0AInstall+Xcode+from+AppStore.+it%27s+1%2B+GB+download+so+it+may+take+a+while.+%0D%0Aafter+it%27s+downloaded+it+will+not+install+automatically%2C+you+need+to+open+Applications+and+install+again+from+there%2C+the+name+will+be+%22Install+Xcode%22.+%0D%0AYou+also+need+to+install+Command+Line+Tools+for+Xcode.%0D%0A%0D%0A%0D%0ABetter+way+is+to+go+to+https%3A%2F%2Fdeveloper.apple.com%2Fdownloads%2Findex.action+and+download+from+there%2C+you+will+have+to+login+with+a+free+apple+developer+account.%0D%0ADownload+the+2+minimum+require+files%0D%0A%0D%0A-+Xcode+4.3.1+for+Lion+%281.85+GB%29%0D%0A-+Command+Line+Tools+for+Xcode+%28171.70+MB%29%0D%0A%0D%0AUpdate%3A+If+you+don%27t+want+to+download+and+install+huge+XCODE+%283.0GB%29+%3A+%0D%0Ahttps%3A%2F%2Fgithub.com%2Fkennethreitz%2Fosx-gcc-installer+%0D%0AIt+allows+you+to+install+the+essential+compilers%2C+GCC%2C+LLVM%2C+etc.+%0D%0APS%3A+I+have+not+tested+it%0D%0AThanks+JP+for+the+tip.%0D%0A%0D%0A%0D%0A2.+Install+HomeBrew%0D%0A%0D%0AUPDATE%3A+in+the+comments+some+people+recommended+to+do+create+the+folder+%22%2Fusr%2Flocal%2FCellar%22+before+hand%2C+due+to+some+bug+on+homebrew.+%0D%0A%0D%0A%0D%0Amkdir+-p+%2Fusr%2Flocal%2FCellar%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%24+%2Fusr%2Fbin%2Fruby+-e+%22%24%28%2Fusr%2Fbin%2Fcurl+-fsSL+https%3A%2F%2Fraw.github.com%2Fmxcl%2Fhomebrew%2Fmaster%2FLibrary%2FContributions%2Finstall_homebrew.rb%29%22%0D%0A%0D%0A%0D%0AInstallation+instructions%3A+https%3A%2F%2Fgithub.com%2Fmxcl%2Fhomebrew%2Fwiki%2Finstallation%0D%0A%0D%0A3.+install+RVM%0D%0A%0D%0A%0D%0A%24++bash+-s+master+%3C+%3E+%7E%2F.bash_profile%0D%0A%24+source+%7E%2F.bash_profile%0D%0A%0D%0A%0D%0ADetails+instructions%3A+http%3A%2F%2Fbeginrescueend.com%2Frvm%2Finstall%2F%0D%0A%0D%0ANote%3A+you+may+have+to+add+%22--with-gcc%3Dclang%22+to+rvm+for+installing+ruby+1.9.2+if+you+have+Xcode+4.3%2B%0D%0ARead+this%3A+http%3A%2F%2Fstackoverflow.com%2Fa%2F9651747%2F1107516%0D%0A%0D%0A4.+Install+ruby+1.9.3-p125+%0D%0A%0D%0AOS+X+Lion+comes+with+Ruby-1.8.7-p249%2C+but+we+all+want+ruby+1.9.2%2F1.9.3+right%3F+%0D%0ARVM+head+and+Ruby+1.9.3-p125+supports+XCODE+4.3.1+http%3A%2F%2Fwww.ruby-lang.org%2Fen%2Fnews%2F2012%2F02%2F16%2Fruby-1-9-3-p125-is-released%2F%0D%0A%0D%0A%0D%0A%24+rvm+install+1.9.3-p125%0D%0A%24+rvm+use+ruby-1.9.3-p125%0D%0A%24+gem+install+rails+bundler+unicorn+pg+%0D%0A...+and+so+on+...%0D%0A%0D%0A%0D%0AI+tested+both+ruby-1.9.3-head+and+ruby-1.9.3-p0%2C+and+1.9.3-p125%2C+and+it+works+well+with+all+my+apps.+Ruby+1.9.3+is+faster+than+1.9.2+booting+rails%2C+and+way+way+faster+than+1.8.7.+So+let%27s+use+the+lastest+Stable+Ruby+%281.9.3-p0%29%0D%0A%0D%0ASee%3A+Rails+booting+a+lot+faster.%0D%0A%0D%0A%0D%0ANOTE%3A+For+Heroku+I+recommend+you+to+use+ruby-1.9.2-p290%2C+if+you+use+taps+%28%22heroku+db%3Apull%2Fpush%22%29%0D%0A%0D%0AOptionally+you+might+want+to+install+GIT%2C+wget%2C+ack%2C+imagemagick+and+any+other+mighty+software+tools+for+daily+use.%0D%0A%0D%0AExample+apps+I%27m+usually+required+to+install%3A%0D%0A%0D%0A%23+brew+install+git+ack+wget+curl+redis+memcached+libmemcached+colordiff+imagemagick+nginx+sqlite+libxml2+libxslt+readline+v8+rsync+sphinx+lzma+geoip+lzo+%0D%0A%0D%0A%0D%0A%0A%0D%0A%0D%0A5.+Install+Mysql+%0D%0A%0D%0A%0D%0A%24+brew+install+mysql%0D%0A%0D%0A%0D%0Aone-line+command%3A%0D%0A%0D%0A%24+mysql_install_db+--verbose+--user%3D%60whoami%60+--basedir%3D%22%24%28brew+--prefix+mysql%29%22+--datadir%3D%2Fusr%2Flocal%2Fvar%2Fmysql+--tmpdir%3D%2Ftmp%0D%0A%0D%0A%0D%0AOnce+mysql+is+installed+you+might+want+it+to+load+automatically+each+time+you+start+your+mac.%0D%0A%0D%0A%0D%0A%24+mkdir+-p+%7E%2FLibrary%2FLaunchAgents%0D%0A%24+cp+%2Fusr%2Flocal%2FCellar%2Fmysql%2F5.5.14%2Fcom.mysql.mysqld.plist+%7E%2FLibrary%2FLaunchAgents%2F%0D%0A%24+launchctl+load+-w+%7E%2FLibrary%2FLaunchAgents%2Fcom.mysql.mysqld.plist%0D%0A%0D%0A%0D%0A%2Acheck+that+the+version+I+use+here+is+5.5.14%0D%0A%0D%0A%0D%0A6.+Troubleshooting%3A%0D%0A%0D%0Aif+you+have+problems+with+mysql+%22cannot+connect+to+%2Ftmp%2Fmysql.sock%22%0D%0Athen+create+a+file+%2Fusr%2Flocal%2Fetc%2Fmy.cnf+and+add+this%3A%0D%0A%0D%0A%0D%0A%5Bclient%5D+%0D%0Aport+%3D+3306+%0D%0Asocket+%3D+%2Ftmp%2Fmysql.sock+%0D%0A%5Bmysqld%5D+%0D%0Abind-address+%3D+127.0.0.1%0D%0Aport+%3D+3306+%0D%0Asocket+%3D+%2Ftmp%2Fmysql.sock+%0D%0A%0D%0A%0D%0A%0D%0Aif+encounter+errors+with+homebrew+run+this+command+and+follow+recommendations%3A%0D%0A%0D%0A%0D%0A%24+brew+doctor%0D%0A%0D%0A%0D%0Aupdate%3A+If+you+end+up+with+Segmentation+fault+or+cannot+install+Ruby-1.8.7%2C+you+might+want+to+try+this+solution%3A%0D%0A%0D%0A%24+export+CC%3D%2Fusr%2Fbin%2Fgcc-4.2%0D%0A%24+rvm+install+ruby-1.8.7+%0D%0A%0D%0A%0D%0A%0D%0AImportant%2C+also+read+this+if+you+have+Xcode+4.3.1%2B+%0D%0Ahttp%3A%2F%2Fstackoverflow.com%2Fquestions%2F9651670%2Fissue-updating-ruby-on-mac-with-xcode-4-3-1%0D%0A%0D%0A%0D%0Aby+the+way+this+is+my+%2Fusr%2Flocal%2Fetc%2Fmy.cnf+optimized+file%2C+when+using+this+file+you+may+have+to+recreate+your+db+%0D%0A%0D%0A%24+mysql_install_db+--verbose+--user%3D%60whoami%60+--basedir%3D%22%24%28brew+--prefix+mysql%29%22+--datadir%3D%2Fusr%2Flocal%2Fvar%2Fmysql+--tmpdir%3D%2Ftmp%0D%0A%0D%0A%0D%0A%0D%0A%5Bclient%5D+%0D%0Aport+%3D+3306+%0D%0Asocket+%3D+%2Ftmp%2Fmysql.sock+%0D%0A%0D%0A%5Bmysqld%5D+%0D%0Aevent_scheduler+%3D+ON+%0D%0Askip-character-set-client-handshake+%0D%0Acollation_server+%3D+utf8_unicode_ci+%0D%0Acharacter_set_server+%3D+utf8+%0D%0A%0D%0Abind-address+%3D+127.0.0.1%0D%0Aport+%3D+3306+%0D%0Asocket+%3D+%2Ftmp%2Fmysql.sock+%0D%0Amax_connections+%3D+20%0D%0A%0D%0Atable_open_cache+%3D+256%0D%0Amax_allowed_packet+%3D+32M+%0D%0Abinlog_cache_size+%3D+1M+%0D%0Amax_heap_table_size+%3D+64M+%0D%0A%0D%0Aread_buffer_size+%3D+2M%0D%0Aread_rnd_buffer_size+%3D+2M%0D%0Asort_buffer_size+%3D+4M%0D%0Ajoin_buffer_size+%3D+512k%0D%0A+%0D%0Athread_cache_size+%3D+2+%0D%0Athread_concurrency+%3D+2%0D%0Aquery_cache_size+%3D+16M+%0D%0Aquery_cache_limit+%3D+2M+%0D%0A%0D%0Adefault-storage-engine+%3D+INNODB%0D%0Athread_stack+%3D+192K+%0D%0Atransaction_isolation+%3D+REPEATABLE-READ+%0D%0Atmp_table_size+%3D+64M+%0D%0A%0D%0A%0D%0A%23+MyISAM+Options+%0D%0A%0D%0Akey_buffer_size+%3D+32M%0D%0Abulk_insert_buffer_size+%3D+32M%0D%0Amyisam_sort_buffer_size+%3D+32M%0D%0Amyisam_max_sort_file_size+%3D+256M%0D%0Amyisam_repair_threads+%3D+1+%0D%0Amyisam_recover+%0D%0A%0D%0A%23+INNODB+Options%0D%0Ainnodb_additional_mem_pool_size+%3D+8M%0D%0Ainnodb_buffer_pool_size+%3D+64M%0D%0Ainnodb_thread_concurrency+%3D+2%0D%0Ainnodb_flush_log_at_trx_commit+%3D+2%0D%0Ainnodb_log_buffer_size+%3D+8M%0D%0Ainnodb_log_file_size+%3D+8M%0D%0Ainnodb_log_files_in_group+%3D+3%0D%0Ainnodb_max_dirty_pages_pct+%3D+90%0D%0Ainnodb_flush_method+%3D+O_DIRECT%0D%0Ainnodb_lock_wait_timeout+%3D+120%0D%0Ainnodb_file_per_table%0D%0A%0D%0A%5Bmysqldump%5D+%0D%0Aquick+%0D%0Amax_allowed_packet+%3D+16M+%0D%0A%0D%0A%5Bmysql%5D+%0D%0Ano-auto-rehash+%0D%0A%0D%0A%5Bmyisamchk%5D+%0D%0Akey_buffer_size+%3D+64M%0D%0Asort_buffer_size+%3D+64M%0D%0Aread_buffer+%3D+16M%0D%0Awrite_buffer+%3D+16M%0D%0A%0D%0A%5Bmysqlhotcopy%5D+%0D%0Ainteractive-timeout+%0D%0A%0D%0A%0D%0A%0D%0AUPDATED+%28Mar+14%2C+2012%29%3A%0D%0A%2A+Fixed+homebrew+install+URL%0D%0A%2A+changed+from+%22%23%22+to+%22%24%22+to+avoid+confusion+of+running+commands+as+root%0D%0A%0D%0AEDITED+%28Feb+10%2C+2012%29%3A%0D%0A%2A+updated+for+new+RVM%0D%0A%2A+source+.bash_profile+after+editing+it.%0D%0A%2A+decreased+memory+settings+for+mysql%0D%0A%2A+using+ruby-1.9.3-p0%0D%0A%2A+fixed+minor+bugs%0D%0A&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>OpenSSH Server Security tips</title>
		<link>http://www.frederico-araujo.com/2011/07/30/openssh-server-security-tips/</link>
		<comments>http://www.frederico-araujo.com/2011/07/30/openssh-server-security-tips/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 18:29:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=222</guid>
		<description><![CDATA[Small tips for securing a server with from SSH login 1. Disable Password Login edit /etc/ssh/sshd_config and set the following PasswordAuthentication no now you can only login via ssh keys. generate your local keys using ssh-keygen -t rsa then put your id_rsa.pub in the user account on the server i.e. /root/.ssh/authorized_keys 2. Random Passwords Set <a href='http://www.frederico-araujo.com/2011/07/30/openssh-server-security-tips/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Small tips for securing a server with from SSH login</p>
<p><strong>1. Disable Password Login</strong></p>
<p>edit /etc/ssh/sshd_config and set the following</p>
<p>PasswordAuthentication no</p>
<p>now you can only login via ssh keys.<br />
generate your local keys using ssh-keygen -t rsa<br />
then put your id_rsa.pub in the user account on the server<br />
i.e. /root/.ssh/authorized_keys</p>
<p><strong>2. Random Passwords</strong></p>
<p>Set all user passwords to large pseudo-random strings.<br />
i.e. I set all users on all servers with different passwords looking like this:<br />
Z4Q7H6pI53Xtsbgs8qKC<br />
20 random alpha-numeric characters (a-z, A-Z, 0-9)</p>
<p>see here for more passwords https://www.grc.com/passwords.htm<br />
you can test the password with the brute force search space calculator with https://www.grc.com/haystack.htm</p>
<p><strong>3. Login alerts by email</strong></p>
<p>Everytime a user has logged in the system, you should get an email alert.<br />
For that I do put login_alert.sh and appended it to the end of /etc/profile</p>
<p>At the end of the file /etc/profile add this line:</p>
<pre>
sh /etc/login_alert.sh
</pre>
<p>then create a file /etc/login_alert.sh</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="shell" style="font-family:monospace;">#!/bin/sh
SERVER_NAME=`hostname -f`
SEND_TO=&quot;myemail@gmail.com&quot;
LOGIN_WHO=`who -m | cut -d&quot;(&quot; -f2 | cut -d&quot;)&quot; -f1 | tr -d \r`
&nbsp;
echo &quot;
Shell Login Access to ${SERVER_NAME}
From: ${LOGIN_WHO}
Date: `date`
&nbsp;
Active Users:
 `who`
&nbsp;
Uptime: 
 `uptime`
&nbsp;
&quot; | mail -s &quot;Alert: SSH Login to ${SERVER_NAME} from ${LOGIN_WHO}&quot; $SEND_TO</pre></td></tr></table></div>

<p>so you will get an email like this every time someone login to the server.</p>
<pre>
Subject: Alert: Shell Login to 'hostname' from ppp-122-122-122-122.evip2.xxxxxx.xx.xx

Shell Login Access to mail9.hostname.net
From: ppp-122-122-122-122.evip2.xxxxxx.xx.xx
Date: Fri Jul 29 18:23:19 UTC 2011

Active Users:
 root     pts/0        2011-07-29 17:57 (ppp-122-122-122-122.evip2.xxxxxx.xx.xx)

Uptime:
  18:23:19 up 189 days,  2:38,  1 user,  load average: 0.05, 0.08, 0.07
</pre>
<p>4. System Updates</p>
<p>Always keep updated. I run &#8220;aptitude full-upgrade&#8221; everyday on all debian machines.<br />
also goes for Mac and Windows.</p>
 <p><a href="http://www.frederico-araujo.com/?flattrss_redirect&amp;id=222&amp;md5=08835073458e29f2ed83cb0a2852faf4" title="Flattr" target="_blank"><img src="http://www.frederico-araujo.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2011/07/30/openssh-server-security-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=frederico&amp;url=http%3A%2F%2Fwww.frederico-araujo.com%2F2011%2F07%2F30%2Fopenssh-server-security-tips%2F&amp;language=en_GB&amp;category=text&amp;title=OpenSSH+Server+Security+tips&amp;description=Small+tips+for+securing+a+server+with+from+SSH+login%0D%0A%0D%0A1.+Disable+Password+Login%0D%0A%0D%0Aedit+%2Fetc%2Fssh%2Fsshd_config+and+set+the+following%0D%0A%0D%0APasswordAuthentication+no%0D%0A%0D%0Anow+you+can+only+login+via+ssh+keys.+%0D%0Agenerate+your+local+keys+using+ssh-keygen+-t+rsa%0D%0Athen+put+your+id_rsa.pub+in+the+user+account+on+the+server+%0D%0Ai.e.+%2Froot%2F.ssh%2Fauthorized_keys%0D%0A%0D%0A%0D%0A2.+Random+Passwords%0D%0A%0D%0ASet+all+user+passwords+to+large+pseudo-random+strings.%0D%0Ai.e.+I+set+all+users+on+all+servers+with+different+passwords+looking+like+this%3A+%0D%0AZ4Q7H6pI53Xtsbgs8qKC%0D%0A20+random+alpha-numeric+characters+%28a-z%2C+A-Z%2C+0-9%29%0D%0A%0D%0Asee+here+for+more+passwords+https%3A%2F%2Fwww.grc.com%2Fpasswords.htm+%0D%0Ayou+can+test+the+password+with+the+brute+force+search+space+calculator+with+https%3A%2F%2Fwww.grc.com%2Fhaystack.htm%0D%0A%0D%0A%0D%0A3.+Login+alerts+by+email%0D%0A%0D%0AEverytime+a+user+has+logged+in+the+system%2C+you+should+get+an+email+alert.%0D%0AFor+that+I+do+put+login_alert.sh+and+appended+it+to+the+end+of+%2Fetc%2Fprofile%0D%0A%0D%0AAt+the+end+of+the+file+%2Fetc%2Fprofile+add+this+line%3A%0D%0A%0D%0A%0D%0Ash+%2Fetc%2Flogin_alert.sh%0D%0A%0D%0A%0D%0Athen+create+a+file+%2Fetc%2Flogin_alert.sh%0D%0A%0D%0A%0D%0A%23%21%2Fbin%2Fsh%0D%0ASERVER_NAME%3D%60hostname+-f%60%0D%0ASEND_TO%3D%22myemail%40gmail.com%22%0D%0ALOGIN_WHO%3D%60who+-m+%7C+cut+-d%22%28%22+-f2+%7C+cut+-d%22%29%22+-f1+%7C+tr+-d+%5Cr%60%0D%0A%0D%0Aecho+%22%0D%0AShell+Login+Access+to+%24%7BSERVER_NAME%7D%0D%0AFrom%3A+%24%7BLOGIN_WHO%7D%0D%0ADate%3A+%60date%60%0D%0A%0D%0AActive+Users%3A%0D%0A+%60who%60%0D%0A%0D%0AUptime%3A+%0D%0A+%60uptime%60%0D%0A%0D%0A%22+%7C+mail+-s+%22Alert%3A+SSH+Login+to+%24%7BSERVER_NAME%7D+from+%24%7BLOGIN_WHO%7D%22+%24SEND_TO%0D%0A%0D%0A%0D%0Aso+you+will+get+an+email+like+this+every+time+someone+login+to+the+server.%0D%0A%0D%0A%0D%0ASubject%3A+Alert%3A+Shell+Login+to+%27hostname%27+from+ppp-122-122-122-122.evip2.xxxxxx.xx.xx%0D%0A%0D%0AShell+Login+Access+to+mail9.hostname.net%0D%0AFrom%3A+ppp-122-122-122-122.evip2.xxxxxx.xx.xx%0D%0ADate%3A+Fri+Jul+29+18%3A23%3A19+UTC+2011%0D%0A%0D%0AActive+Users%3A%0D%0A+root+++++pts%2F0++++++++2011-07-29+17%3A57+%28ppp-122-122-122-122.evip2.xxxxxx.xx.xx%29%0D%0A%0D%0AUptime%3A+%0D%0A++18%3A23%3A19+up+189+days%2C++2%3A38%2C++1+user%2C++load+average%3A+0.05%2C+0.08%2C+0.07%0D%0A%0D%0A%0D%0A4.+System+Updates%0D%0A%0D%0AAlways+keep+updated.+I+run+%22aptitude+full-upgrade%22+everyday+on+all+debian+machines.%0D%0Aalso+goes+for+Mac+and+Windows.%0D%0A%0D%0A&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Strongly typed Languages and Security</title>
		<link>http://www.frederico-araujo.com/2011/01/25/strongly-typed-language-and-security/</link>
		<comments>http://www.frederico-araujo.com/2011/01/25/strongly-typed-language-and-security/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 15:02:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=215</guid>
		<description><![CDATA[Strongly typed Languages and Security. From Schneier on Security. A Great comment I believe it&#8217;s worth sharing. Source http://www.schneier.com/blog/archives/2010/10/firesheep.html#c478900 I can&#8217;t agree more that the average quality of programmers (and therefore reusable components) is miserable. Code reuse can be very messy and anyone serious about quality is forced to reinvent the wheel over and over. <a href='http://www.frederico-araujo.com/2011/01/25/strongly-typed-language-and-security/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Strongly typed Languages and Security. From Schneier on Security.<br />
A Great comment I believe it&#8217;s worth sharing. Source <a href="http://www.schneier.com/blog/archives/2010/10/firesheep.html#c478900">http://www.schneier.com/blog/archives/2010/10/firesheep.html#c478900</a></p>
<p><quote><br />
I can&#8217;t agree more that the average quality of programmers (and therefore reusable components) is miserable. Code reuse can be very messy and anyone serious about quality is forced to reinvent the wheel over and over.</p>
<p>Of course I also agree that not all standards are good, as I don&#8217;t consider the web&#8217;s standards good.</p>
<p>However, there are fake high level languages and real high level languages. You cannot really build a complex system in a low level language, and even if you did, it would be full of abstractions, effectively making it a high level language via design patterns.</p>
<p>Look at PHP, it&#8217;s a horrible mess, a big ball of crap thrown together to make a &#8220;framework&#8221; to &#8220;ease&#8221; web development. The developers don&#8217;t have a clue what they&#8217;re doing and there are lots of new vulns in it every month at both the high and low levels. The builtin functions are completely inconsistent, some things return magic values and some things raise exceptions. PHP just takes random features from other languages and piles them together in an incoherent way. PHP is weakly typed (which is _always_ useless and causes more bugs). PHP is configurable, different libraries depend on different configurations of it. PHP has a garbage optional security model thing called safe-mode, which doesn&#8217;t work as it&#8217;s just more crap incoherently thrown together.</p>
<p>Now look at a real high level language, like Haskell, everything is immutable, which immediately mitigates one of the big class of bugs. Lazy evaluation means everything is more efficient most of the time (most problems are best solved lazily), but can be turned off when needed. The type system tells you all the information you&#8217;d ever want to know about the architecture of a given program, as well as catches _lots_ of bugs up front. Functions can easily be reasoned about due to type safety and immutability. This is a language that was actually thought out, unlike PHP.</p>
<p>Also, there are capability-secure languages/OSs, such as E (language), where security is orthogonal and forces the principle of least authority upon the entire architecture from the ground up. They have already been proven easy to use (obviously, much easier to use than any *nix crap because they have strong typing and aren&#8217;t C) and exponentially more secure. E is basically reifies one of the things computing is meant to have but doesn&#8217;t currently: you can run any code without caring if it&#8217;s evil or crappy. Sort of like the web but not completely flawed/unusable/insecure. The capability model also stop programs from dumping random garbage all over your OS, which is what happens on *nix and Windows.</p>
<p>Did I mention POLA is important? Why one would ever want to run random code off the internet with full privileges is beyond me. Java has an actual _half_ decent security/object model BTW, but it was ruined by pragmatism, and now everyone just signs their applets and the users can&#8217;t run them unless they modify their JVM or allow the code to run with full privileges.</p>
<p>Heck, even QNX is vastly superior to *nix just because they took a few old academic ideas into practice.</p>
<p>But what I really want to get down to is that strong typing is mandatory. (Strong typing in the data sense as well as language).</p>
<p>What I mean by strong typing in the data level is that you don&#8217;t take a bunch of random text and try to interpret it. You don&#8217;t take a bunch of machine words off the stack/heap and try to interpret them. Data must be organized mechanically, never trust the human.</p>
<p>Stack smashing happens because of lack of strong typing; array&#8217;s don&#8217;t really exist, you just get pointers to memory and are free to do anything with them, integers don&#8217;t exist either, you just have machine words. Actually nothing exists because C is just one crappy abstraction with a ton of undefined behavior. Strongly typed arrays cannot be violated, nor can ints etc. C is another example of this nonsense re-usability notion, to make it &#8220;fast&#8221;, _as well_ as portable, it has to have tons of undefined behavior. A secure system would have a high level language and the underlying low level components would be written in a way specialized to that architecture, in which case you can get performance as well as **no** undefined behavior.</p>
<p>XSS is because of lack of strong typing, you are just taking a bunch of text and blindly treating it as code or crap to inject into some text that is meant to be code. This is about as unreliable as it gets. Strongly typed declarative data structures prevent this.</p>
<p>SQL Injection? Ditto. But has been solved by A) ORMs that aren&#8217;t vulnerable B) Object databases (which are on par and sometimes better than RDBMS with respect to performance, BTW) C) HaskellDB ;)</p>
<p>HTTP injection? Well this doesn&#8217;t happen as much because one typically uses a safe API to build the HTTP request as opposed to editing it and parameterizing it by hand. This is analogous to using a safe API to manipulate a binary data structure (that is strongly typed). Hey? Binary is compact and efficient, then why do we have text protocols and formats? Oh yeah, someone thought it would be a good idea to have plaintext stuff because maybe we would be able to edit it by hand or something. BS. Do they expect us to edit 20MB XML documents by hand? You should be using a graph editor that provides a set of idiomatic transforms and queries (does this exist for XML? it should.). The only time you can edit _any_ plaintext document by hand is when it&#8217;s tiny, except this still doesn&#8217;t work because you don&#8217;t know what character set encoding to use&#8230; XML sucks, it&#8217;s not a cyclic graph so you have to retype things instead of just putting a reference to them, or invent an ad-hoc way of doing this for your schema. This is clearly propagated by the &#8220;simple&#8221; design of plaintext XML, if it were binary, they probably would have just made a real cyclic graph. This stuff also reminds me of another major issue with *nix, everything is a file (which is nonsense, everything should be an object, or maybe there is something better? I dunno, but objects are already superior to files in every way. Want streams? read: lazy evaluation), which for some reason, means everything is text with an arbitrary grammar, so you have to write a ton of regular expressions to get anything done in *nix. Ooh and you have magic numbers as return values from programs. Except these both break all the time as new versions of the programs come out. And they are a bitch to fix because they aren&#8217;t objects; you have to rewrite the parsers (text) instead of using the new fields (objects). Even the input to any *nix program is braindead and violates strong typing principles so they can&#8217;t be used without causing new vulnerabilities. Even if you escape the input to make it safe for bash or whatever shell you are using, the data within that parameter might still need to be further escaped because it&#8217;s passed as an SQL string or some other weakly typed system. I don&#8217;t know why &#8220;command line&#8221; mantra even exists anymore (now that we don&#8217;t use ancient terminal things anymore, well some people do, but not me at least), every program that has an interactive bash shell thing is different and crappy and has no multiline input and a lot of them overwrite your input as you&#8217;re typing it with output. Command line apps shouldn&#8217;t exist, there should just be objects that you invoke methods on with a _real_ (bash isn&#8217;t a real language) statically strongly typed language and get back some other objects. Static typing allows *rich* auto-completion for free. The shell can infer the variables in the local namespace that match the input parameter you are on, and then suggest them all. And the shell should actually be a decent thing, not a stupid pair of I/O streams. *nix terminal things suck **hard**. If you copy and paste some text from a web page, it might contain malicious code followed by a newline (a page can make you copy something other than what is displayed and highlighted on it), and you get owned. Oooh, oooh, X11 is also broken, it doesn&#8217;t let non-you users display to a constricted area on it, so you have to run random crap programs off the internet as you, and they get to steal all your non-root stuff (the stuff that *actually* matters). But they get root by ptracing your bash shell and escalating to root the next time you sudo or su. The Qubes OS tries to fix some of this stuff, but fails miserably, because it&#8217;s not even as good as or better than the Object Capability Model, which was invented decades ago, but I guess this is because they want compatibility with current software, which means they have to diminish security. Maybe they would be better off joining Tunes.</p>
<p>Computing sucks hard for many other reasons, but I&#8217;m getting tired of writing for now and am hungry.</p>
<p>What does this all have to do with firesheep? Dunno, but it&#8217;s not surprising what firesheep can do, and it&#8217;s about time someone is stepping up and trying to expose more loudly one of the many critical flaws that have been being used for malicious purposes for the past decades. I predict the next movement is for someone to write a nice metamorphic virus and take over hundreds of millions of boxes on the internet and all those crappy embedded devices. (It&#8217;s not that hard to pull off.)</p>
<p>Anyone interested in creating a secure computing paradigm and ditch all this other nonsense? Call me.<br />
</quote></p>
 <p><a href="http://www.frederico-araujo.com/?flattrss_redirect&amp;id=215&amp;md5=7e17daf5d78b1ce9e21b82e9022b11cc" title="Flattr" target="_blank"><img src="http://www.frederico-araujo.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2011/01/25/strongly-typed-language-and-security/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=frederico&amp;url=http%3A%2F%2Fwww.frederico-araujo.com%2F2011%2F01%2F25%2Fstrongly-typed-language-and-security%2F&amp;language=en_GB&amp;category=text&amp;title=Strongly+typed+Languages+and+Security&amp;description=Strongly+typed+Languages+and+Security.+From+Schneier+on+Security.+%0D%0AA+Great+comment+I+believe+it%27s+worth+sharing.+Source+http%3A%2F%2Fwww.schneier.com%2Fblog%2Farchives%2F2010%2F10%2Ffiresheep.html%23c478900%0D%0A%0D%0A%0D%0AI+can%27t+agree+more+that+the+average+quality+of+programmers+%28and+therefore+reusable+components%29+is+miserable.+Code+reuse+can+be+very+messy+and+anyone+serious+about+quality+is+forced+to+reinvent+the+wheel+over+and+over.%0D%0A%0D%0AOf+course+I+also+agree+that+not+all+standards+are+good%2C+as+I+don%27t+consider+the+web%27s+standards+good.%0D%0A%0D%0AHowever%2C+there+are+fake+high+level+languages+and+real+high+level+languages.+You+cannot+really+build+a+complex+system+in+a+low+level+language%2C+and+even+if+you+did%2C+it+would+be+full+of+abstractions%2C+effectively+making+it+a+high+level+language+via+design+patterns.%0D%0A%0D%0ALook+at+PHP%2C+it%27s+a+horrible+mess%2C+a+big+ball+of+crap+thrown+together+to+make+a+%22framework%22+to+%22ease%22+web+development.+The+developers+don%27t+have+a+clue+what+they%27re+doing+and+there+are+lots+of+new+vulns+in+it+every+month+at+both+the+high+and+low+levels.+The+builtin+functions+are+completely+inconsistent%2C+some+things+return+magic+values+and+some+things+raise+exceptions.+PHP+just+takes+random+features+from+other+languages+and+piles+them+together+in+an+incoherent+way.+PHP+is+weakly+typed+%28which+is+_always_+useless+and+causes+more+bugs%29.+PHP+is+configurable%2C+different+libraries+depend+on+different+configurations+of+it.+PHP+has+a+garbage+optional+security+model+thing+called+safe-mode%2C+which+doesn%27t+work+as+it%27s+just+more+crap+incoherently+thrown+together.%0D%0A%0D%0ANow+look+at+a+real+high+level+language%2C+like+Haskell%2C+everything+is+immutable%2C+which+immediately+mitigates+one+of+the+big+class+of+bugs.+Lazy+evaluation+means+everything+is+more+efficient+most+of+the+time+%28most+problems+are+best+solved+lazily%29%2C+but+can+be+turned+off+when+needed.+The+type+system+tells+you+all+the+information+you%27d+ever+want+to+know+about+the+architecture+of+a+given+program%2C+as+well+as+catches+_lots_+of+bugs+up+front.+Functions+can+easily+be+reasoned+about+due+to+type+safety+and+immutability.+This+is+a+language+that+was+actually+thought+out%2C+unlike+PHP.%0D%0A%0D%0AAlso%2C+there+are+capability-secure+languages%2FOSs%2C+such+as+E+%28language%29%2C+where+security+is+orthogonal+and+forces+the+principle+of+least+authority+upon+the+entire+architecture+from+the+ground+up.+They+have+already+been+proven+easy+to+use+%28obviously%2C+much+easier+to+use+than+any+%2Anix+crap+because+they+have+strong+typing+and+aren%27t+C%29+and+exponentially+more+secure.+E+is+basically+reifies+one+of+the+things+computing+is+meant+to+have+but+doesn%27t+currently%3A+you+can+run+any+code+without+caring+if+it%27s+evil+or+crappy.+Sort+of+like+the+web+but+not+completely+flawed%2Funusable%2Finsecure.+The+capability+model+also+stop+programs+from+dumping+random+garbage+all+over+your+OS%2C+which+is+what+happens+on+%2Anix+and+Windows.%0D%0A%0D%0ADid+I+mention+POLA+is+important%3F+Why+one+would+ever+want+to+run+random+code+off+the+internet+with+full+privileges+is+beyond+me.+Java+has+an+actual+_half_+decent+security%2Fobject+model+BTW%2C+but+it+was+ruined+by+pragmatism%2C+and+now+everyone+just+signs+their+applets+and+the+users+can%27t+run+them+unless+they+modify+their+JVM+or+allow+the+code+to+run+with+full+privileges.%0D%0A%0D%0AHeck%2C+even+QNX+is+vastly+superior+to+%2Anix+just+because+they+took+a+few+old+academic+ideas+into+practice.%0D%0A%0D%0ABut+what+I+really+want+to+get+down+to+is+that+strong+typing+is+mandatory.+%28Strong+typing+in+the+data+sense+as+well+as+language%29.%0D%0A%0D%0AWhat+I+mean+by+strong+typing+in+the+data+level+is+that+you+don%27t+take+a+bunch+of+random+text+and+try+to+interpret+it.+You+don%27t+take+a+bunch+of+machine+words+off+the+stack%2Fheap+and+try+to+interpret+them.+Data+must+be+organized+mechanically%2C+never+trust+the+human.%0D%0A%0D%0AStack+smashing+happens+because+of+lack+of+strong+typing%3B+array%27s+don%27t+really+exist%2C+you+just+get+pointers+to+memory+and+are+free+to+do+anything+with+them%2C+integers+don%27t+exist+either%2C+you+just+have+machine+words.+Actually+nothing+exists+because+C+is+just+one+crappy+abstraction+with+a+ton+of+undefined+behavior.+Strongly+typed+arrays+cannot+be+violated%2C+nor+can+ints+etc.+C+is+another+example+of+this+nonsense+re-usability+notion%2C+to+make+it+%22fast%22%2C+_as+well_+as+portable%2C+it+has+to+have+tons+of+undefined+behavior.+A+secure+system+would+have+a+high+level+language+and+the+underlying+low+level+components+would+be+written+in+a+way+specialized+to+that+architecture%2C+in+which+case+you+can+get+performance+as+well+as+%2A%2Ano%2A%2A+undefined+behavior.%0D%0A%0D%0AXSS+is+because+of+lack+of+strong+typing%2C+you+are+just+taking+a+bunch+of+text+and+blindly+treating+it+as+code+or+crap+to+inject+into+some+text+that+is+meant+to+be+code.+This+is+about+as+unreliable+as+it+gets.+Strongly+typed+declarative+data+structures+prevent+this.%0D%0A%0D%0ASQL+Injection%3F+Ditto.+But+has+been+solved+by+A%29+ORMs+that+aren%27t+vulnerable+B%29+Object+databases+%28which+are+on+par+and+sometimes+better+than+RDBMS+with+respect+to+performance%2C+BTW%29+C%29+HaskellDB+%3B%29%0D%0A%0D%0AHTTP+injection%3F+Well+this+doesn%27t+happen+as+much+because+one+typically+uses+a+safe+API+to+build+the+HTTP+request+as+opposed+to+editing+it+and+parameterizing+it+by+hand.+This+is+analogous+to+using+a+safe+API+to+manipulate+a+binary+data+structure+%28that+is+strongly+typed%29.+Hey%3F+Binary+is+compact+and+efficient%2C+then+why+do+we+have+text+protocols+and+formats%3F+Oh+yeah%2C+someone+thought+it+would+be+a+good+idea+to+have+plaintext+stuff+because+maybe+we+would+be+able+to+edit+it+by+hand+or+something.+BS.+Do+they+expect+us+to+edit+20MB+XML+documents+by+hand%3F+You+should+be+using+a+graph+editor+that+provides+a+set+of+idiomatic+transforms+and+queries+%28does+this+exist+for+XML%3F+it+should.%29.+The+only+time+you+can+edit+_any_+plaintext+document+by+hand+is+when+it%27s+tiny%2C+except+this+still+doesn%27t+work+because+you+don%27t+know+what+character+set+encoding+to+use...+XML+sucks%2C+it%27s+not+a+cyclic+graph+so+you+have+to+retype+things+instead+of+just+putting+a+reference+to+them%2C+or+invent+an+ad-hoc+way+of+doing+this+for+your+schema.+This+is+clearly+propagated+by+the+%22simple%22+design+of+plaintext+XML%2C+if+it+were+binary%2C+they+probably+would+have+just+made+a+real+cyclic+graph.+This+stuff+also+reminds+me+of+another+major+issue+with+%2Anix%2C+everything+is+a+file+%28which+is+nonsense%2C+everything+should+be+an+object%2C+or+maybe+there+is+something+better%3F+I+dunno%2C+but+objects+are+already+superior+to+files+in+every+way.+Want+streams%3F+read%3A+lazy+evaluation%29%2C+which+for+some+reason%2C+means+everything+is+text+with+an+arbitrary+grammar%2C+so+you+have+to+write+a+ton+of+regular+expressions+to+get+anything+done+in+%2Anix.+Ooh+and+you+have+magic+numbers+as+return+values+from+programs.+Except+these+both+break+all+the+time+as+new+versions+of+the+programs+come+out.+And+they+are+a+bitch+to+fix+because+they+aren%27t+objects%3B+you+have+to+rewrite+the+parsers+%28text%29+instead+of+using+the+new+fields+%28objects%29.+Even+the+input+to+any+%2Anix+program+is+braindead+and+violates+strong+typing+principles+so+they+can%27t+be+used+without+causing+new+vulnerabilities.+Even+if+you+escape+the+input+to+make+it+safe+for+bash+or+whatever+shell+you+are+using%2C+the+data+within+that+parameter+might+still+need+to+be+further+escaped+because+it%27s+passed+as+an+SQL+string+or+some+other+weakly+typed+system.+I+don%27t+know+why+%22command+line%22+mantra+even+exists+anymore+%28now+that+we+don%27t+use+ancient+terminal+things+anymore%2C+well+some+people+do%2C+but+not+me+at+least%29%2C+every+program+that+has+an+interactive+bash+shell+thing+is+different+and+crappy+and+has+no+multiline+input+and+a+lot+of+them+overwrite+your+input+as+you%27re+typing+it+with+output.+Command+line+apps+shouldn%27t+exist%2C+there+should+just+be+objects+that+you+invoke+methods+on+with+a+_real_+%28bash+isn%27t+a+real+language%29+statically+strongly+typed+language+and+get+back+some+other+objects.+Static+typing+allows+%2Arich%2A+auto-completion+for+free.+The+shell+can+infer+the+variables+in+the+local+namespace+that+match+the+input+parameter+you+are+on%2C+and+then+suggest+them+all.+And+the+shell+should+actually+be+a+decent+thing%2C+not+a+stupid+pair+of+I%2FO+streams.+%2Anix+terminal+things+suck+%2A%2Ahard%2A%2A.+If+you+copy+and+paste+some+text+from+a+web+page%2C+it+might+contain+malicious+code+followed+by+a+newline+%28a+page+can+make+you+copy+something+other+than+what+is+displayed+and+highlighted+on+it%29%2C+and+you+get+owned.+Oooh%2C+oooh%2C+X11+is+also+broken%2C+it+doesn%27t+let+non-you+users+display+to+a+constricted+area+on+it%2C+so+you+have+to+run+random+crap+programs+off+the+internet+as+you%2C+and+they+get+to+steal+all+your+non-root+stuff+%28the+stuff+that+%2Aactually%2A+matters%29.+But+they+get+root+by+ptracing+your+bash+shell+and+escalating+to+root+the+next+time+you+sudo+or+su.+The+Qubes+OS+tries+to+fix+some+of+this+stuff%2C+but+fails+miserably%2C+because+it%27s+not+even+as+good+as+or+better+than+the+Object+Capability+Model%2C+which+was+invented+decades+ago%2C+but+I+guess+this+is+because+they+want+compatibility+with+current+software%2C+which+means+they+have+to+diminish+security.+Maybe+they+would+be+better+off+joining+Tunes.%0D%0A%0D%0AComputing+sucks+hard+for+many+other+reasons%2C+but+I%27m+getting+tired+of+writing+for+now+and+am+hungry.%0D%0A%0D%0AWhat+does+this+all+have+to+do+with+firesheep%3F+Dunno%2C+but+it%27s+not+surprising+what+firesheep+can+do%2C+and+it%27s+about+time+someone+is+stepping+up+and+trying+to+expose+more+loudly+one+of+the+many+critical+flaws+that+have+been+being+used+for+malicious+purposes+for+the+past+decades.+I+predict+the+next+movement+is+for+someone+to+write+a+nice+metamorphic+virus+and+take+over+hundreds+of+millions+of+boxes+on+the+internet+and+all+those+crappy+embedded+devices.+%28It%27s+not+that+hard+to+pull+off.%29%0D%0A%0D%0AAnyone+interested+in+creating+a+secure+computing+paradigm+and+ditch+all+this+other+nonsense%3F+Call+me.%0D%0A&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>AFP on centos 5.5 that works</title>
		<link>http://www.frederico-araujo.com/2011/01/01/afp-on-centos-5-5-that-works/</link>
		<comments>http://www.frederico-araujo.com/2011/01/01/afp-on-centos-5-5-that-works/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 09:18:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=206</guid>
		<description><![CDATA[I had to setup AFP (netatalkd) on a centos 5.5 machine. Many tutorials had something missing. so I took the best of each and put here. You will need gcc and some packages/libs for building berk-db and netatalkd, like &#8220;patch&#8221; and &#8220;make&#8221; yum install openssl.x86_64 libssl-dev gcc automake autoconf GSSAPI libgssapi-devel libgssapi libgssapi-devel krb5-devel pam-devel <a href='http://www.frederico-araujo.com/2011/01/01/afp-on-centos-5-5-that-works/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I had to setup AFP (netatalkd) on a centos 5.5 machine. Many tutorials had something missing. so I took the best of each and put here.</p>
<p>You will need gcc and some packages/libs for building berk-db and netatalkd, like &#8220;patch&#8221; and &#8220;make&#8221;</p>
<pre>  yum install openssl.x86_64 libssl-dev gcc automake autoconf GSSAPI libgssapi-devel libgssapi  libgssapi-devel krb5-devel pam-devel shadow-devel openssl-devel cracklib wget</pre>
<p>1. Download the latest berkeley-db 4.8 (5.0 and 5.1 did not work for me), compile and install</p>
<pre>wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz
tar xpf db-4.8.30.tar.gz
cd db-4.8.30/build_unix/
../dist/configure
make
make install</pre>
<p>2.  Download latest netatalkd, compile, install and copy config files to /etc/atalk<br />
AFP works fine with the default configuration files.</p>
<pre>wget "http://downloads.sourceforge.net/project/netatalk/netatalk/2.1.5/netatalk-2.1.5.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fnetatalk%2F&amp;ts=1293643408&amp;use_mirror=biznetnetworks"
tar xpf netatalk-2.1.5.tar.bz2
cd netatalk-2.1.5

./configure --enable-redhat --enable-pgp-uam --enable-krb4-uam --enable-krbV-uam --with-bdb=/usr/local/BerkeleyDB.4.8/
make
make install
mkdir -p /etc/atalk/
cp -a config/*.conf /etc/atalk/
chkconfig netatalk on
service netatalk start
</pre>
<p></p>
<h3>Extra:</h3>
<p>
When you mount this filesystem on mac, all files and directory permissions will be reset to 755, which is really annoying, specially if you use git. Git will show all the file permission changes to 755 instead of 644 for files.
</p>
<p>
so, to solve the problem edit the file /etc/atalk/AppleVolumes.default and update the last line on the file
</p>
<pre>  vi /etc/atalk/AppleVolumes.default
  # change from
    :DEFAULT: options:upriv,usedots
  # to
    :DEFAULT: options:upriv,usedots dperm:0755 fperm:0644</pre>
<p>Resources:</p>
<ul>
<li> <a href="http://www.linuxquestions.org/questions/red-hat-31/how-to-get-netatalk-installed-on-centos-5-1-a-636147/">
<p>http://www.linuxquestions.org/questions/red-hat-31/how-to-get-netatalk-installed-on-centos-5-1-a-636147/</p>
<p></a></li>
<li> <a href="http://permalink.gmane.org/gmane.network.netatalk.user/20594">
<p>http://permalink.gmane.org/gmane.network.netatalk.user/20594</p>
<p></a></li>
</ul>
 <p><a href="http://www.frederico-araujo.com/?flattrss_redirect&amp;id=206&amp;md5=0de77484a0d1ea445875682180343f95" title="Flattr" target="_blank"><img src="http://www.frederico-araujo.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2011/01/01/afp-on-centos-5-5-that-works/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=frederico&amp;url=http%3A%2F%2Fwww.frederico-araujo.com%2F2011%2F01%2F01%2Fafp-on-centos-5-5-that-works%2F&amp;language=en_GB&amp;category=text&amp;title=AFP+on+centos+5.5+that+works&amp;description=I+had+to+setup+AFP+%28netatalkd%29+on+a+centos+5.5+machine.+Many+tutorials+had+something+missing.+so+I+took+the+best+of+each+and+put+here.%0D%0A%0D%0AYou+will+need+gcc+and+some+packages%2Flibs+for+building+berk-db+and+netatalkd%2C+like+%22patch%22+and+%22make%22%0D%0A++yum+install+openssl.x86_64+libssl-dev+gcc+automake+autoconf+GSSAPI+libgssapi-devel+libgssapi++libgssapi-devel+krb5-devel+pam-devel+shadow-devel+openssl-devel+cracklib+wget%0D%0A1.+Download+the+latest+berkeley-db+4.8+%285.0+and+5.1+did+not+work+for+me%29%2C+compile+and+install%0D%0Awget+http%3A%2F%2Fdownload.oracle.com%2Fberkeley-db%2Fdb-4.8.30.tar.gz%0D%0Atar+xpf+db-4.8.30.tar.gz%0D%0Acd+db-4.8.30%2Fbuild_unix%2F%0D%0A..%2Fdist%2Fconfigure%0D%0Amake%0D%0Amake+install%0D%0A2.++Download+latest+netatalkd%2C+compile%2C+install+and+copy+config+files+to+%2Fetc%2Fatalk%0D%0AAFP+works+fine+with+the+default+configuration+files.%0D%0Awget+%22http%3A%2F%2Fdownloads.sourceforge.net%2Fproject%2Fnetatalk%2Fnetatalk%2F2.1.5%2Fnetatalk-2.1.5.tar.bz2%3Fr%3Dhttp%253A%252F%252Fsourceforge.net%252Fprojects%252Fnetatalk%252F%26amp%3Bts%3D1293643408%26amp%3Buse_mirror%3Dbiznetnetworks%22%0D%0Atar+xpf+netatalk-2.1.5.tar.bz2%0D%0Acd+netatalk-2.1.5%0D%0A%0D%0A.%2Fconfigure+--enable-redhat+--enable-pgp-uam+--enable-krb4-uam+--enable-krbV-uam+--with-bdb%3D%2Fusr%2Flocal%2FBerkeleyDB.4.8%2F%0D%0Amake%0D%0Amake+install%0D%0Amkdir+-p+%2Fetc%2Fatalk%2F%0D%0Acp+-a+config%2F%2A.conf+%2Fetc%2Fatalk%2F%0D%0Achkconfig+netatalk+on%0D%0Aservice+netatalk+start%0D%0A%0D%0A%0D%0A%0A%0D%0AExtra%3A%0D%0A%0D%0A%0D%0AWhen+you+mount+this+filesystem+on+mac%2C+all+files+and+directory+permissions+will+be+reset+to+755%2C+which+is+really+annoying%2C+specially+if+you+use+git.+Git+will+show+all+the+file+permission+changes+to+755+instead+of+644+for+files.%0D%0A%0D%0A%0D%0Aso%2C+to+solve+the+problem+edit+the+file+%2Fetc%2Fatalk%2FAppleVolumes.default+and+update+the+last+line+on+the+file%0D%0A%0D%0A++vi+%2Fetc%2Fatalk%2FAppleVolumes.default%0D%0A++%23+change+from%0D%0A++++%3ADEFAULT%3A+options%3Aupriv%2Cusedots%0D%0A++%23+to%0D%0A++++%3ADEFAULT%3A+options%3Aupriv%2Cusedots+dperm%3A0755+fperm%3A0644%0D%0AResources%3A%0D%0A%0D%0A%09+%0D%0Ahttp%3A%2F%2Fwww.linuxquestions.org%2Fquestions%2Fred-hat-31%2Fhow-to-get-netatalk-installed-on-centos-5-1-a-636147%2F%0D%0A%0D%0A%09+%0D%0Ahttp%3A%2F%2Fpermalink.gmane.org%2Fgmane.network.netatalk.user%2F20594%0D%0A%0D%0A&amp;tags=blog" type="text/html" />
	</item>
	</channel>
</rss>

