<?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>Christi Toa &#187; linux</title>
	<atom:link href="http://www.christitoa.com/ct/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christitoa.com/ct</link>
	<description>it&#039;s pronounced &#34;toh&#34;, not &#34;toh-ah&#34;</description>
	<lastBuildDate>Fri, 28 May 2010 02:59:37 +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>Expect to the rescue!</title>
		<link>http://www.christitoa.com/ct/2010/02/11/expect-to-the-rescue/</link>
		<comments>http://www.christitoa.com/ct/2010/02/11/expect-to-the-rescue/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 07:02:39 +0000</pubDate>
		<dc:creator>Christi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[guides]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[expect]]></category>
		<category><![CDATA[guide]]></category>

		<guid isPermaLink="false">http://www.christitoa.com/?p=549</guid>
		<description><![CDATA[When you can&#8217;t pipe an input file to automate a process, especially when you need to enter a password such as ftp-ing to some server e.g.:

ftp user@ftp.myhost.com &#60; myFTPCommands.txt

The above fails when ftp asks for a password. This is where expect comes to the rescue! e.g.:

#myExpectFile.exp

#Disable's expect's default 10 seconds timeout
set timeout -1

spawn ftp user@ftp.myhost.com
expect [...]]]></description>
			<content:encoded><![CDATA[<p>When you can&#8217;t pipe an input file to automate a process, especially when you need to enter a password such as ftp-ing to some server e.g.:</p>
<pre class="brush:shell">
ftp user@ftp.myhost.com &lt; myFTPCommands.txt
</pre>
<p>The above fails when ftp asks for a password. This is where <em>expect</em> comes to the rescue! e.g.:</p>
<pre class="brush:bash">
#myExpectFile.exp

#Disable's expect's default 10 seconds timeout
set timeout -1

spawn ftp user@ftp.myhost.com
expect "password:"
send "mySoSecuredPassword\r"
expect "ftp>"
send "get someFileFromFTP.txt\r"
expect "ftp>"
send "put someFileFromLocalhost.txt\r"
expect "ftp>"
send "quit\r"
</pre>
<p>Save the file and then try running it:</p>
<pre class="brush:shell">
expect myExpectFile.exp
</pre>
<p>Magic happens! <img src='http://www.christitoa.com/ct/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.christitoa.com/ct/2010/02/11/expect-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Snippy on CentOS 5</title>
		<link>http://www.christitoa.com/ct/2009/07/25/installing-snippy-on-centos-5/</link>
		<comments>http://www.christitoa.com/ct/2009/07/25/installing-snippy-on-centos-5/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 23:15:13 +0000</pubDate>
		<dc:creator>Christi</dc:creator>
				<category><![CDATA[guides]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[guide]]></category>

		<guid isPermaLink="false">http://www.christitoa.com/?p=444</guid>
		<description><![CDATA[I wanted to install something like Pastie at my workplace to easily share snippets of code privately, instead of sharing it to the whole wide world. There are some open source alternatives such as LodgeIt and pastebin but for some unknown reasons, I could never get it to set up properly.  
Then I came [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to install something like <a title="Pastie" href="http://pastie.org/" target="_blank">Pastie</a> at my workplace to easily share snippets of code privately, instead of sharing it to the whole wide world. There are some open source alternatives such as <a title="LodgeIt" href="http://dev.pocoo.org/projects/lodgeit/" target="_blank">LodgeIt</a> and <a title="pastebin" href="http://pastebin.com/" target="_self">pastebin</a> but for some unknown reasons, I could never get it to set up properly.  </p>
<p>Then I came across <a title="snippy" href="http://actsasflinn.com/2008/09/03/snippy-is-a-freaking-ripoff-of-pastie" target="_blank">snippy</a> (a clone/ripoff of Pastie as the author &#8211; Flinn Mueller puts it). Mueller provided some documentation on how to set up, but it wasn&#8217;t sufficient to set it up in CentOS. In addition, I had ZERO knowledge about running Ruby on Rails applications which might be another contributing factor to why I had so many issues setting it up.  Here&#8217;s a guide on how I managed to set it up successfully on CentOS:</p>
<h3><strong><em>Getting everything that Snippy needs:</em></strong></h3>
<h3><strong>Install Ruby on Rails</strong></h3>
<p>Snippy runs on Ruby on Rails. If you do not have this installed, <a title="CentOS - Ruby on Rails" href="http://articles.slicehost.com/2009/4/7/centos-ruby-on-rails" target="_blank">Slicehost</a> has a great guide on how to install it.  </p>
<p><strong>Additional notes:</strong></p>
<ol>
<li>The current release of rubygems is v1.3.5. Please grab the latest version when following Slicehost&#8217;s article.</li>
<li>Snippy somehow would fail to install with the latest version of rails (v2.3.3). The following error will appear if you tried to install snippy:
<pre class="brush:bash" lang="bash">undefined method `make_cache_key' for class `MemCache'</pre>
<p>To solve this, in addition to all the steps you followed at Slicehost, do</p>
<pre class="brush:bash" lang="bash">gem install -v=2.1.1 rails
</pre>
</li>
</ol>
<h3><strong>Install Sphinx</strong></h3>
<pre class="brush:bash">wget http://sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz
tar xvfz sphinx-0.9.8.1.tar.gz
cd sphinx-0.9.8.1
./configure
make</pre>
<p>(If you receive an error about command not found for g++), do:</p>
<pre class="brush:bash" lang="bash">yum install gcc-c++</pre>
<p>Finally,</p>
<pre class="brush:bash" lang="bash">make install</pre>
<h3><strong>Install Oniguruma</strong></h3>
<p>To have it working for snippy, I needed to install Oniguruma from 2 different sources. Why? I do not know since installing just either one of them would not get Snippy running.  First, I obtain and installed the rpm for CentOS:</p>
<pre class="brush:bash" lang="bash">
	wget ftp://ftp.pbone.net/mirror/centos.karan.org/el5/extras/testing/i386/RPMS/oniguruma-5.9.1-2.el5.kb.i386.rpm
	rpm -i oniguruma-5.9.1-2.el5.kb.i386.rpm
</pre>
<p>Next, I obtained the latest release from the Author&#8217;s site (http://www.geocities.jp/kosako3/oniguruma/)</p>
<pre class="brush:bash" lang="bash">wget http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.9.1.tar.gz
tar xvfz onig-5.9.1.tar.gz
cd onig-5.9.1
./configure
make
make install</pre>
<h3><strong><em>The fun part &#8211; Snippy!!!</em></strong></h3>
<p>Most of the following steps follows what Mueller had outlined in his README.</p>
<pre class="brush:bash" lang="bash">git clone git://github.com/actsasflinn/snippy.git
cd snippy
cp config/database.yml.example config/database.yml
vi config/database.yml</pre>
<p>Edit the config/database.yml to match your own db settings. You must include an additional parameter called &#8220;<em>host</em>&#8221; to get Snippy to work. E.g. For mine, I set the following for development, test and production:</p>
<pre class="brush:bash" lang="ruby">adapter: mysql
encoding: utf8
database: snippy_development
username: myUser
password: myPassword
socket: /tmp/mysql.sock
host: 127.0.0.1</pre>
<p>Next,</p>
<pre class="brush:bash" lang="bash">
rake gems:install
rake db:create
</pre>
<p>You might get the an error &#8220;<em>error with missing these required gems: oniguruma and textpow</em>&#8221; after doing &#8220;<em>rake db:create</em>&#8220;. If so, do the following:</p>
<pre class="brush:bash" lang="bash">gem install -r textpow --include-dependencies</pre>
<p>Then,</p>
<pre class="brush:bash" lang="bash">rake db:migrate
rake bootstrap
rake thinking_sphinx:configure
rake thinking_sphinx:index
rake thinking_sphinx:start
ruby script/plugin install git://github.com/rsl/acts_as_snook.git --force
./script/server</pre>
<p>If all goes well, you should be able to launch your browser and go to http://YOUR_SERVER:3000 to see if you can start snipping. <img src='http://www.christitoa.com/ct/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />    Big thanks to Meuller for this wonderful application!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christitoa.com/ct/2009/07/25/installing-snippy-on-centos-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up LAMP really really fast</title>
		<link>http://www.christitoa.com/ct/2008/11/28/setting-up-lamp-really-really-fast/</link>
		<comments>http://www.christitoa.com/ct/2008/11/28/setting-up-lamp-really-really-fast/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 02:09:17 +0000</pubDate>
		<dc:creator>Christi</dc:creator>
				<category><![CDATA[guides]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[site]]></category>

		<guid isPermaLink="false">http://www.christitoa.com/?p=253</guid>
		<description><![CDATA[Recently I needed to set up LAMP (Linux-Apahe-MySQL-PHP) on a server (CentOS 5.2) really really quick. There&#8217;s of course a bunch of documents that guides you how to do it but I just got lazy and found a really fast way to have it all installed with some other goodies along too. The solution &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I needed to set up LAMP (Linux-Apahe-MySQL-PHP) on a server (CentOS 5.2) really really quick. There&#8217;s of course a bunch of documents that guides you how to do it but I just got lazy and found a really fast way to have it all installed with some other goodies along too. The solution &#8211; <a title="webmin" href="http://www.webmin.com/" target="_blank">webmin</a> and <a href="http://www.virtualmin.com/">virtualmin</a>.</p>
<p>First, log in as root:</p>
<pre class="brush:bash">su -</pre>
<p>Then, install webmin.</p>
<pre class="brush:bash">yum install webmin</pre>
<p>After that, let&#8217;s install virtualmin. There isn&#8217;t a package out there for yum, so we&#8217;ll need to install it manually. Good thing is, virtualmin has a shell script that just does that. So, let&#8217;s just grab the shell script and install it.</p>
<pre class="brush:bash">wget http://software.virtualmin.com/gpl/scripts/install.sh
sh install.sh</pre>
<p>We can delete the shell script once virtualmin is installed.</p>
<pre class="brush:bash">rm install.sh</pre>
<p>There, we&#8217;re done! And if you want to further configure your server and won&#8217;t want to do it via command line, you can fire up your browser and go to: https://yourserver:10000 and configure it via the webmin/Virtualmin interface.</p>
<p>Another note, I&#8217;ve found a <a title="Tiger Theme for Webmin" href="http://www.stress-free.co.nz/webmin-theme/">cool theme</a> for webmin if you dislike the standard theme that comes with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christitoa.com/ct/2008/11/28/setting-up-lamp-really-really-fast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
