<?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>Soumplis&#039; Personal Web Site &#187; Linux</title>
	<atom:link href="http://www.soumplis.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.soumplis.com</link>
	<description>Soumplis Alexandros Personal Web Site</description>
	<lastBuildDate>Mon, 16 Jan 2012 23:16:03 +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>OSCurrency and Thin on CentOS 5.6</title>
		<link>http://www.soumplis.com/2011/07/07/oscurrency-and-thin-on-centos-5-6/</link>
		<comments>http://www.soumplis.com/2011/07/07/oscurrency-and-thin-on-centos-5-6/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 23:47:49 +0000</pubDate>
		<dc:creator>asou</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[oscurrency]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[thin]]></category>

		<guid isPermaLink="false">http://www.soumplis.com/?p=106</guid>
		<description><![CDATA[Installing a Ruby on Rails applications under CentOS can easily be a painful process. Ruby tends to have updated versions very often and unfortunately compatibility between version is usually not the priority for Ruby or Gem developers. This makes Ruby a no-go for stable and slow moving Linux releases such as CentOS.  Having said that [...]]]></description>
			<content:encoded><![CDATA[<p>Installing a Ruby on Rails applications under <a href="http://www.centos.org" target="_blank">CentOS</a> can easily be a painful process. Ruby tends to have updated versions very often and unfortunately compatibility between version is usually not the priority for Ruby or Gem developers. This makes Ruby a no-go for stable and slow moving Linux releases such as CentOS.  Having said that below I&#8217;ll try to share my experience trying to serve <a href="http://www.opensourcecurrency.org/" target="_blank">OSCurrency</a> (a fork of  <a href="https://sites.google.com/a/insoshi.com/insoshi-guides/" target="_blank">Insoshi</a>) out of a CentOS 5.6 server. So let&#8217;s start&#8230;.<span id="more-106"></span></p>
<h3>1. Install some required packages</h3>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># Install EPEL Repository</span><br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.fedoraproject.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>epel<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5</span><span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>epel-release-<span style="color: #000000;">5</span>-<span style="color: #000000;">4</span>.noarch.rpm<br />
rpm -vih epel-release-<span style="color: #000000;">5</span>-<span style="color: #000000;">4</span>.noarch.rpm<br />
<span style="color: #666666; font-style: italic;"># Install RPMForge Repo</span><br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>packages.sw.be<span style="color: #000000; font-weight: bold;">/</span>rpmforge-release<span style="color: #000000; font-weight: bold;">/</span>rpmforge-release-0.5.2-<span style="color: #000000;">2</span>.el5.rf.i386.rpm<br />
rpm <span style="color: #660033;">-vih</span> rpmforge-release-0.5.2-<span style="color: #000000;">2</span>.el5.rf.i386.rpm<br />
<br />
<span style="color: #666666; font-style: italic;"># Install Git and some other stuff through yum.</span><br />
<span style="color: #c20cb9; font-weight: bold;">yum</span> <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">git</span> curl gcc-c++ <span style="color: #c20cb9; font-weight: bold;">patch</span> readline readline-devel \<br />
zlib zlib-devel libyaml-devel libffi-devel openssl-devel <span style="color: #c20cb9; font-weight: bold;">make</span> \<br />
<span style="color: #c20cb9; font-weight: bold;">bzip2</span> iconv-devel</div></div>
<h3>2. Install <a href="http://beginrescueend.com/" target="_blank">rvm</a></h3>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>curl <span style="color: #660033;">-s</span> https:<span style="color: #000000; font-weight: bold;">//</span>rvm.beginrescueend.com<span style="color: #000000; font-weight: bold;">/</span>install<span style="color: #000000; font-weight: bold;">/</span>rvm<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;source /usr/local/rvm/scripts/rvm&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>bashrc<br />
<br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;PATH=<span style="color: #007800;">$PATH</span>:/usr/local/rvm/gems/ruby-1.8.7-p334/bin:/usr/local/bin&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>bashrc<br />
<br />
<span style="color: #7a0874; font-weight: bold;">source</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>rvm<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>rvm</div></div>
<h3>3. Install <a href="http://www.ruby-lang.org/en/" target="_blank">Ruby 1.8.7</a></p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rvm <span style="color: #c20cb9; font-weight: bold;">install</span> 1.8.7<br />
<br />
rvm <span style="color: #660033;">--default</span> use 1.8.7</div></div>
<h3>4. Install <a href="http://rubyonrails.org/" target="_blank">Rails 2.3.11</a> (OSCurrency at the moment is not compatible with Rails 3)</h3>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">gem <span style="color: #c20cb9; font-weight: bold;">install</span> rails <span style="color: #660033;">-v</span>=2.3.11</div></div>
<h3>5. Install and Configure <a href="http://www.postgresql.org/" target="_blank">Postgresql</a></h3>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># Install PostgreSQL server, client and developement libraries</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">yum</span> <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> postgresql postgresql-server postgresql-devel<br />
<br />
<span style="color: #666666; font-style: italic;"># Enable PostgreSQL on startup and start it</span><br />
<br />
chkconfig postgresql on<br />
<br />
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>postgresql start<br />
<br />
<span style="color: #666666; font-style: italic;"># Create a postgresql user and a new database</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">su</span> - postgresql<br />
<br />
createuser oscurrency<br />
<br />
createdb oscurrency<br />
<br />
<span style="color: #666666; font-style: italic;"># Define a password for the postgresql user and permission to the new database</span><br />
<br />
psql<br />
<br />
alter user oscurrency with encrypted password <span style="color: #ff0000;">'oscurrency'</span>;<br />
<br />
grant all privileges on database oscurrency to oscurrency;<br />
<br />
<span style="color: #666666; font-style: italic;"># Install the appropriate ruby gem</span><br />
<br />
gem <span style="color: #c20cb9; font-weight: bold;">install</span> pg</div></div>
<h3>6. Install some additional gems</h3>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># Install Image Magick and its development libraries - we need an updated version</span><br />
<br />
<span style="color: #666666; font-style: italic;"># The RMagick gem requires various specific packages apart from ImageMagick</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>d.hatena.ne.jp<span style="color: #000000; font-weight: bold;">/</span>okyohei<span style="color: #000000; font-weight: bold;">/</span>files<span style="color: #000000; font-weight: bold;">/</span>libwebp0-0.1.2-<span style="color: #000000;">1.1</span>.el5.i386.rpm?<span style="color: #007800;">d</span>=download<br />
<br />
rpm <span style="color: #660033;">-vih</span> libwebp0-0.1.2-<span style="color: #000000;">1.1</span>.el5.i386.rpm<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>image_magick.veidrodis.com:<span style="color: #000000;">8003</span><span style="color: #000000; font-weight: bold;">/</span>image_magick<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>CentOS<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>ImageMagick-devel-6.7.0-<span style="color: #000000;">7</span>.i386.rpm<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>image_magick.veidrodis.com:<span style="color: #000000;">8003</span><span style="color: #000000; font-weight: bold;">/</span>image_magick<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>CentOS<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>ImageMagick-6.7.0-<span style="color: #000000;">7</span>.i386.rpm<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>ftp.sunet.se<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>multimedia<span style="color: #000000; font-weight: bold;">/</span>graphics<span style="color: #000000; font-weight: bold;">/</span>ImageMagick<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>CentOS<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>ImageMagick-c++-devel-6.7.0-<span style="color: #000000;">7</span>.i386.rpm<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>ftp.sunet.se<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>multimedia<span style="color: #000000; font-weight: bold;">/</span>graphics<span style="color: #000000; font-weight: bold;">/</span>ImageMagick<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>CentOS<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>ImageMagick-c++-6.7.0-<span style="color: #000000;">7</span>.i386.rpm<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">yum</span> <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ImageMagick-6.7.0-<span style="color: #000000;">7</span>.i386.rpm ImageMagick-devel-6.7.0-<span style="color: #000000;">7</span>.i386.rpm <span style="color: #660033;">--nogpg</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">yum</span> <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ImageMagick-c++-6.7.0-<span style="color: #000000;">7</span>.i386.rpm ImageMagick-c++-devel-6.7.0-<span style="color: #000000;">7</span>.i386.rpm <span style="color: #660033;">--nogpg</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">yum</span> <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> fftw3 fftw3-devel lzma lzma-devel xz xz-devel xz-lzma-compat<br />
<br />
<span style="color: #666666; font-style: italic;"># Install RMagick Gem</span><br />
<br />
gem <span style="color: #c20cb9; font-weight: bold;">install</span> rmagick<br />
<br />
<span style="color: #666666; font-style: italic;"># Install some more gems</span><br />
<br />
gem <span style="color: #c20cb9; font-weight: bold;">install</span> bundler<br />
<br />
bundle <span style="color: #c20cb9; font-weight: bold;">install</span></div></div>
<h3>7. Deploy OSCurrency</h3>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">useradd oscurrency<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">su</span> - oscurrency<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">git clone</span> git:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>oscurrency<span style="color: #000000; font-weight: bold;">/</span>oscurrency.git</div></div>
<h3>8. Configure OSCurrency</h3>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">su</span> - oscurrency<br />
<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> oscurrency<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">vi</span> config<span style="color: #000000; font-weight: bold;">/</span>database.yml <span style="color: #666666; font-style: italic;"># Change appropriate to reflect your database</span><br />
<br />
rake <span style="color: #c20cb9; font-weight: bold;">install</span></div></div>
<p>At this point the installation fails and I get the following error:</p>
<p><em>== FullTextSearch1265516526: migrating ======================================= </em></p>
<p><em>rake aborted! An error has occurred, this and all later migrations canceled: </em></p>
<p><em>PGError: ERROR: syntax error at or near &#8220;EXISTS&#8221; at character 23 : </em></p>
<p style="padding-left: 30px;"><em>DROP index IF EXISTS people_fts_idx</em></p>
<p>The only solution I have found is to completely delete the offending file and re-run the install script</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rm db/migrate/20100207040206_full_text_search_1265516526.rb<br />
<br />
rake install</div></div>
<h3>9. Installation is completed! Now its time to deploy our patches for local installation</h3>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># (if you want to use S3, no changes required)</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">'s/:storage =&amp;gt; :s3,/:storage =&amp;gt; :file_system,/'</span> app<span style="color: #000000; font-weight: bold;">/</span>models<span style="color: #000000; font-weight: bold;">/</span>photo.rb<br />
<br />
<span style="color: #666666; font-style: italic;"># Start the test server</span><br />
<br />
ruby script<span style="color: #000000; font-weight: bold;">/</span>server<br />
<br />
<span style="color: #666666; font-style: italic;"># Check functionality by using a browser on port 3000.</span></div></div>
<h3>10. Install and deploy on Thin</h3>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">gem <span style="color: #c20cb9; font-weight: bold;">install</span> thin<br />
<br />
thin <span style="color: #c20cb9; font-weight: bold;">install</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">&lt;</span>EOF <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>thin<span style="color: #000000; font-weight: bold;">/</span>rails_app1.yml<br />
user: oscurrency<br />
group: oscurrency<br />
chdir: <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>oscurrency<span style="color: #000000; font-weight: bold;">/</span>oscurrency<br />
log: log<span style="color: #000000; font-weight: bold;">/</span>thin.log<br />
port: <span style="color: #000000;">3000</span><br />
environment: production<br />
pid: tmp<span style="color: #000000; font-weight: bold;">/</span>pid<span style="color: #000000; font-weight: bold;">/</span>thin.pid<br />
servers: <span style="color: #000000;">1</span><br />
EOF<br />
<br />
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>thin start</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.soumplis.com/2011/07/07/oscurrency-and-thin-on-centos-5-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://image_magick.veidrodis.com:8003/image_magick/linux/CentOS/i386/ImageMagick-devel-6.7.0-7.i386.rpm" length="86078" type="audio/x-pn-realaudio-plugin" />
<enclosure url="http://image_magick.veidrodis.com:8003/image_magick/linux/CentOS/i386/ImageMagick-6.7.0-7.i386.rpm" length="2344082" type="audio/x-pn-realaudio-plugin" />
		</item>
		<item>
		<title>RedHat Cluster Fence APC PDUs</title>
		<link>http://www.soumplis.com/2010/10/27/redhat-cluster-fence-apc-pdus/</link>
		<comments>http://www.soumplis.com/2010/10/27/redhat-cluster-fence-apc-pdus/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 13:22:16 +0000</pubDate>
		<dc:creator>asou</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://www.soumplis.com/?p=84</guid>
		<description><![CDATA[Some time ago I&#8217;ve had to implement fencing on a Redhat cluster consisting of two cluster nodes, in an active-passive setup and two APC AP7921 power distribution units. While playing around with the fence_apc_snmp script as provided by Redhat, I&#8217;ve discovered a bug regarding the return status of an outlet after changing it&#8217;s state. I [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I&#8217;ve had to implement fencing on a Redhat cluster consisting of two cluster nodes, in an active-passive setup and two APC AP7921 power distribution units. While playing around with the fence_apc_snmp script as provided by Redhat, I&#8217;ve discovered a bug regarding the return status of an outlet after changing it&#8217;s state. I wrote a patch and submited a  full bug report to Redhat regarding the issue.<span id="more-84"></span></p>
<p>Yesterday I&#8217;ve been informed that the patch has been accepted and got into version fence-1.32.68-5.el4. For more details you can have a look at <a href=" https://bugzilla.redhat.com/show_bug.cgi?id=494587" target="_blank">Bugzilla #494587</a> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soumplis.com/2010/10/27/redhat-cluster-fence-apc-pdus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spacewalk Update Adventures</title>
		<link>http://www.soumplis.com/2010/02/09/spacewalk-update-adventures/</link>
		<comments>http://www.soumplis.com/2010/02/09/spacewalk-update-adventures/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 15:18:06 +0000</pubDate>
		<dc:creator>asou</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Spacewalk]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[tablespace]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.soumplis.com/?p=41</guid>
		<description><![CDATA[Today I decided to update my Spacewalk server to the latest version (0.8 on today&#8217;s nightly build). In case you have never heard of Spacewalk before, &#8220;Spacewalk is an open source (GPLv2) Linux systems management solution. It is the upstream community project from which the Red Hat Network Satellite product is derived&#8221;. Personally I use [...]]]></description>
			<content:encoded><![CDATA[<p>Today I decided to update my Spacewalk server to the latest version (0.8 on today&#8217;s nightly build). In case you have never heard of Spacewalk before, <a href="http://www.redhat.com/spacewalk/" target="_blank">&#8220;Spacewalk is an open source (GPLv2) Linux systems management solution. It is the upstream community project from which the Red Hat Network Satellite product is derived&#8221;</a>. Personally I use it as a central update server for all my CentOS server (more than 40 systems at the moment). I follow spacewalk since version 0.2, so one can easy understand that this is my sixth update and I have not faced any serious issues until now. The only problem is the fact that Spacewalk scripts take for granted the fact that the Apache server running on the spacewalk server does not serve any other sites. Unfortunately this is not my case so I have to reconfigure apache all the time after a spacewalk upgrade and I have to notice that in every single update the required changes are different!</p>
<p>This time things were not so easy as Oracle was not friendly! I followed the documented procedure and while the schema upgrade I received the following error:</p>
<pre>SQL&gt; update rhnPackageFile p
2     set checksum_id = lookup_checksum('md5', md5);
update rhnPackageFile p
       *
ERROR at line 1:
ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDO'</pre>
<p>It was obvious a problem with the UNDO tablespace hitting its extend limit. I verified that I had enough hard disk space available and then I executed the sqlplus utility to verify that the tablespace has hit its limit.</p>
<pre>SQL&gt; select file_name, bytes, autoextensible, maxbytes
from dba_data_files where tablespace_name='UNDO';

FILE_NAME
----------------------------------------------------------------------
BYTES AUT   MAXBYTES
---------- --- ----------
/usr/lib/oracle/xe/oradata/XE/undo.dbf
524288000 YES  524288000</pre>
<p>Then I extend it genersouly!</p>
<pre>SQL&gt; alter database datafile '/usr/lib/oracle/xe/oradata/XE/undo.dbf'
autoextend on next 100m maxsize 2000m;

Database altered.

SQL&gt; select file_name, bytes, autoextensible, maxbytes
from dba_data_files where tablespace_name='UNDO';

FILE_NAME
----------------------------------------------------------------------
BYTES AUT   MAXBYTES
---------- --- ----------
/usr/lib/oracle/xe/oradata/XE/undo.dbf
524288000 YES 2097152000</pre>
<p>Unfortunately I could not use any more the automated script <em>spacewalk-schema-upgrade </em>in order to complete the schema upgrade. The solution was again to use the sqlplus utility and execute all sql scripts against the database. To do that I wrote the following bash script:</p>
<pre>#!/bin/bash
cd /etc/sysconfig/rhn/schema-upgrade/
cd spacewalk-schema-0.7-to-spacewalk-schema-0.8/</pre>
<pre>for sqlscript in `ls -1`
do
echo "****"
echo "Executing script $sqlscript"
echo "****"
sqlplus dbuser/dbpass &lt;&lt;EOF
@$sqlscript;
EOF
done</pre>
<p>I carefully noticed the output of the script for errors. As expected the first scripts, which have already been executed, displayed several warnings and errors but after the script <em>012-2-rhnPackageFile-data.sql</em> which initialy failed, everything went smoothly!</p>
<p><span style="color: #ff0000;"><strong>UPDATE:</strong></span><br />
Later I have found that I had to manually update the rhnVersionInfo table in order for new spacewalk upgrades to work. From a shell execute the command:</p>
<pre>rpm -q spacewalk-schema</pre>
<p>and you will get something like &#8220;spacewalk-schema-0.8.9-1.el5.noarch.rpm&#8221;. Then login to sqlplus interface and execute the following query (alter accordingly to fit your enviroment):</p>
<pre>SQL&gt; INSERT INTO rhnVersionInfo 
( label, name_id, evr_id, created, modified )
VALUES ('schema', lookup_package_name('spacewalk-schema'),
lookup_evr(null, '0.8.9', '1.el5' ), sysdate, sysdate );</pre>
<pre>SQL&gt; COMMIT;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.soumplis.com/2010/02/09/spacewalk-update-adventures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spammer Nightmare</title>
		<link>http://www.soumplis.com/2010/02/03/spammer-nightmare/</link>
		<comments>http://www.soumplis.com/2010/02/03/spammer-nightmare/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 14:59:38 +0000</pubDate>
		<dc:creator>asou</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.soumplis.com/?p=21</guid>
		<description><![CDATA[Well it happened to me today a strong fight against a spammer on one of my servers. I had a very hard time tracking down the originator of the spam as it was a shared hosting server and the spammer had gained, among others, ftp access to the exploited account. Thus it was easy to [...]]]></description>
			<content:encoded><![CDATA[<p>Well it happened to me today a strong fight against a spammer on one of my servers. I had a very hard time tracking down the originator of the spam as it was a shared hosting server and the spammer had gained, among others, ftp access to the exploited account. Thus it was easy to hide the spam sending code within a legitimate and ordinary looking php script which implemented its own SMTP engine. This way there where no logs on my Exim SMTP server log files and I had to examine Apache log files for every single hosting account on the server.</p>
<p>It has been a good lesson for me and my next move was to disallow anyone besides root and Exim to send mail to be able to connect to remote MTAs. Thanks to Linux iptables it was feasible and quite easy with a rule similar to this:</p>
<blockquote><p>/sbin/iptables -I OUTPUT &#8211;protocol tcp &#8211;dport 25 -m owner &#8211;gid-owner 47 -j ACCEPT</p></blockquote>
<p>Next step was to clean my exim queues from bounce backs and various junk due to the thousands of e-mails send out to the Internet. As always I had to dig my notes and find the appropriate commands so I decided to post them on my fellow site, <a href="http://www.howto.gr/wp/2010/02/fighting-with-exim-queues/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soumplis.com/2010/02/03/spammer-nightmare/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

