<?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 &#187; gentoo</title>
	<atom:link href="http://www.frederico-araujo.com/tag/gentoo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.frederico-araujo.com</link>
	<description>Ruby, Rails, OSX and linux sysadmin</description>
	<lastBuildDate>Thu, 02 Sep 2010 08:13:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Server monitoring with gentoo and iStat on the iPhone</title>
		<link>http://www.frederico-araujo.com/2010/06/25/server-monitoring-with-gentoo-and-istat-on-the-iphone/</link>
		<comments>http://www.frederico-araujo.com/2010/06/25/server-monitoring-with-gentoo-and-istat-on-the-iphone/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 07:00:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[istatd]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=137</guid>
		<description><![CDATA[You can monitor your servers nicely graphs using iStat for iphone.
these are instructions for Gentoo:

1
2
3
4
5
6
7
8
9
wget http://github.com/downloads/tiwilliam/istatd/istatd-0.5.7.tar.gz
tar xpf istatd-0.5.7.tar.gz
cd istatd-0.5.7
./configure
make
make install 
useradd istat
mkdir -p /var/&#123;run,cache&#125;/istat /home/istat
chown istat.istat /var/&#123;run,cache&#125;/istat /home/istat

Create and edit /etc/istat.conf to match your server specs.
This config is for my OpenVZ vps.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# /etc/istat.conf: Configuration for iStat server
#
&#160;
# IP Address to listen
network_addr     [...]]]></description>
			<content:encoded><![CDATA[<p>You can monitor your servers nicely graphs using iStat for iphone.<br />
these are instructions for Gentoo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>downloads<span style="color: #000000; font-weight: bold;">/</span>tiwilliam<span style="color: #000000; font-weight: bold;">/</span>istatd<span style="color: #000000; font-weight: bold;">/</span>istatd-0.5.7.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> xpf istatd-0.5.7.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> istatd-0.5.7
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> 
useradd istat
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>run,cache<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">/</span>istat <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>istat
<span style="color: #c20cb9; font-weight: bold;">chown</span> istat.istat <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>run,cache<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">/</span>istat <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>istat</pre></td></tr></table></div>

<p>Create and edit /etc/istat.conf to match your server specs.<br />
This config is for my OpenVZ vps.</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
18
19
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># /etc/istat.conf: Configuration for iStat server</span>
<span style="color: #666666; font-style: italic;">#</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># IP Address to listen</span>
network_addr           77.88.xx.xx
&nbsp;
<span style="color: #666666; font-style: italic;"># choose any port, Default is 5109</span>
network_port           <span style="color: #000000;">55666</span> 
&nbsp;
<span style="color: #666666; font-style: italic;"># this is password, 5 digits</span>
server_code            <span style="color: #000000;">12345</span>
&nbsp;
server_user            istat
server_socket          <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>istat<span style="color: #000000; font-weight: bold;">/</span>istat.sock
server_pid             <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>istat<span style="color: #000000; font-weight: bold;">/</span>istat.pid
cache_dir              <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>istat
monitor_net              venet0
monitor_disk             <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>simfs <span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></td></tr></table></div>

<p>Start istatd server:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #660033;">-u</span> istat istatd <span style="color: #660033;">-d</span> <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>istat.conf</pre></td></tr></table></div>

<p>you might add it to /etc/conf.d/local.start to auload on startup</p>
<p>Then download iStat for iphone http://bjango.com/apps/istat/  it&#8217;s only $0.99<br />
and add your server to the list. </p>
<p>Here are some screenshots, first is server and second image is my macbook discovered with bonjour. </p>

<a href='http://www.frederico-araujo.com/2010/06/25/server-monitoring-with-gentoo-and-istat-on-the-iphone/img_0016/' title='IMG_0016'><img width="150" height="150" src="http://www.frederico-araujo.com/wp-content/uploads/2010/06/IMG_0016-150x150.png" class="attachment-thumbnail" alt="" title="IMG_0016" /></a>
<a href='http://www.frederico-araujo.com/2010/06/25/server-monitoring-with-gentoo-and-istat-on-the-iphone/img_0019/' title='IMG_0019'><img width="150" height="150" src="http://www.frederico-araujo.com/wp-content/uploads/2010/06/IMG_0019-150x150.png" class="attachment-thumbnail" alt="" title="IMG_0019" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2010/06/25/server-monitoring-with-gentoo-and-istat-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Easy installing Passenger mod_rails on gentoo Linux</title>
		<link>http://www.frederico-araujo.com/2008/08/06/easy-installing-passenger-mod_rails-on-gentoo/</link>
		<comments>http://www.frederico-araujo.com/2008/08/06/easy-installing-passenger-mod_rails-on-gentoo/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 05:15:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[mod_rails]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=35</guid>
		<description><![CDATA[To install the great Mod_Rails on Gentoo linux it&#8217;s as easy as 5 steps.
Since you are Gentoo user, i don&#8217;t need to go to details. You know what you doing.  
Update: Mod-rails now works with apache mpm-worker
1. Recompile Apache non-threaded
add this to /etc/portage/package.use
www-servers/apache -threads
and this to /etc/make.conf
APACHE2_MPMS="prefork"
2. Re emerge apache
# emerge -va apache
3. Passenger [...]]]></description>
			<content:encoded><![CDATA[<p>To install the great Mod_Rails on Gentoo linux it&#8217;s as easy as 5 steps.</p>
<p>Since you are Gentoo user, i don&#8217;t need to go to details. You know what you doing. <img src='http://www.frederico-araujo.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong><em>Update</em></strong>: Mod-rails now works with apache mpm-worker</p>
<h4><span style="text-decoration: line-through;">1. Recompile Apache non-threaded</span></h4>
<p><span style="text-decoration: line-through;">add this to /etc/portage/package.use</span></p>
<pre><span style="text-decoration: line-through;">www-servers/apache -threads</span></pre>
<p><span style="text-decoration: line-through;">and this to /etc/make.conf</span></p>
<pre><span style="text-decoration: line-through;">APACHE2_MPMS="prefork"</span></pre>
<h4><span style="text-decoration: line-through;">2. Re emerge apache</span></h4>
<pre><span style="text-decoration: line-through;"># emerge -va apache</span></pre>
<h4>3. Passenger is in gentoo portage, but its in testing. Currently Version 2.0.1</h4>
<pre># echo "www-apache/passenger" &gt;&gt; /etc/portage/package.keywords</pre>
<h4>4. Install Passenger</h4>
<pre># emerge -va passenger</pre>
<p>If it tries to install rails 2.2.2, rake, and lots of other gems that you already have installed trough rubygems, then run emerge with &#8211;nodeps option</p>
<pre># emerge -va --nodeps passenger</pre>
<h4>5. Edit /etc/conf.d/apache and add &#8220;-D PASSENGER&#8221; to apache options</h4>
<p>for example mine looks like this:</p>
<pre>APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D PROXY -D PASSENGER"</pre>
<p>That&#8217;s it.</p>
<p>Now just drop a similar vhost config file inside /etc/apache/vhosts.d/</p>
<p>This is a sample vhost file for a rails app.</p>
<pre>&lt;VirtualHost *:80&gt;
  ServerName mydomain.com
  DocumentRoot /myapp/public
  Include /etc/apache2/vhosts.d/deflate.conf
  RailsBaseURI /
  # The maximum number of Ruby on Rails application instances that may be simultaneously active.
  # A larger number results in higher memory usage, but improved ability to handle concurrent HTTP clients.
  # normally 1 to 10. (1 for each 50mb ram)
  RailsMaxPoolSize 1
  # The maximum number of seconds that a Ruby on Rails application instance may be idle.
  # That is, if an application instance hasn't done anything after the given number of seconds,
  # then it will be shutdown in order to conserve memory. ( 1 hour)
  RailsPoolIdleTime 3600
  RailsEnv 'production'
  &lt;Directory /myapp/public&gt;
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;</pre>
<p>My sample deflate.conf,<br />
used to gzip the content</p>
<pre>&lt;Location /&gt;
	SetOutputFilter DEFLATE
	#
	# Netscape 4.x has some problems...
	BrowserMatch ^Mozilla/4 gzip-only-text/html
	#
	# Netscape 4.06-4.08 have some more problems
	BrowserMatch ^Mozilla/4\.0[678] no-gzip
	#
	# MSIE masquerades as Netscape, but it is fine
	BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
	# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
	# the above regex won't work. You can use the following
	# workaround to get the desired effect:
	BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
	# Don't compress images
	SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
	SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
	SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
	# Make sure proxies don't deliver the wrong content
	Header append Vary User-Agent env=!dont-vary
&lt;/Location&gt;

DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
CustomLog /var/log/apache2/deflate_log deflate</pre>
<p>* Update on July 10, 2008.</p>
<p>- Now using gentoo portage to install it. it&#8217;s more smooth.</p>
<p>Note:</p>
<p>Personally I found that Thin + nginx uses less memory(Nginx 4MB + each thin server) than<br />
apache + passenger, which uses quite more. (Apache: 50MB + each rails spawner)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2008/08/06/easy-installing-passenger-mod_rails-on-gentoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
