<?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>A. Abad Cerdeira</title>
	<atom:link href="http://abadcer.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://abadcer.com</link>
	<description>Systems Engineer</description>
	<lastBuildDate>Sun, 19 Jun 2011 22:27:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Speedtest</title>
		<link>http://abadcer.com/2011/04/speedtest/</link>
		<comments>http://abadcer.com/2011/04/speedtest/#comments</comments>
		<pubDate>Sat, 09 Apr 2011 12:26:42 +0000</pubDate>
		<dc:creator>abad</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://abadcer.com/?p=174</guid>
		<description><![CDATA[Installed speedtest.net Mini in my server: Check your speed against my server which has a 100mbps synchronous line. The server is in France by the way.]]></description>
			<content:encoded><![CDATA[<p>Installed speedtest.net Mini in my server:</p>
<p><a href="http://abadcer.com/speedtest/"><img title="speedtest.net mini" src="/wp-content/uploads/2011/04/speedtest.png" alt="speedtest.net mini" width="355" height="203" /></a></p>
<p>Check your speed against my server which has a 100mbps synchronous line.</p>
<p>The server is in France by the way.</p>
]]></content:encoded>
			<wfw:commentRss>http://abadcer.com/2011/04/speedtest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WikiLeaks mirror</title>
		<link>http://abadcer.com/2010/12/wikileaks-mirror/</link>
		<comments>http://abadcer.com/2010/12/wikileaks-mirror/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 17:36:34 +0000</pubDate>
		<dc:creator>abad</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://abadcer.com/?p=134</guid>
		<description><![CDATA[This server is now a proud WikiLeaks mirror: http://wikileaks.abadcer.com/ In the Mass Mirror Project page they kindly explain how to do this step by step, and there is a form if you want to submit your details: http://wikileaks.ch/Mass-mirroring-Wikileaks.html In my case it was very easy to follow because those instructions are ideal for Debian/Ubuntu and I [...]]]></description>
			<content:encoded><![CDATA[<p>This server is now a proud WikiLeaks mirror: <a href="http://wikileaks.abadcer.com/">http://wikileaks.abadcer.com/</a></p>
<p>In the <strong>Mass Mirror Project</strong> page they kindly explain how to do this step by step, and there is a form if you want to submit your details: <a href="http://wikileaks.ch/Mass-mirroring-Wikileaks.html">http://wikileaks.ch/Mass-mirroring-Wikileaks.html</a></p>
<p>In my case it was very easy to follow because those instructions are ideal for Debian/Ubuntu and I have Debian Squeeze</p>
<p>What I did was simply this:</p>
<p><strong>1.</strong> Created the user &#8220;wikileaks&#8221; and assigned it a good password. Any <a href="http://www.google.co.uk/search?aq=f&amp;sourceid=chrome&amp;ie=UTF-8&amp;q=online+password+generator">online password generator</a> is a quick way of getting one, 14 characters or more is ideal. Allowing punctuation characters makes your password stronger and because it is random it is immune to dictionary attacks (although hard to remember). The number of combinations are very simply to calculate, total number of possible values in each character multiplied by itself as many times are characters the password has. Example:</p>
<ul>
<li>If you use only numbers and 4 characters you have: 10 * 10 * 10 * 10 = 10.000 combinations.</li>
<li>If you use a 14 characters password with numbers (10), characters (26 uper case + 26 lower case), punctuation characters (34) you have: 96 * 96 (14 times) = 96^14 = 5.646.733.123.551.136.024.526.585.856 combinations (That is a big number ).</li>
</ul>
<p><strong>2.</strong> Set up the DNS name and the VirtualHost in Apache. Nothing special here, did a very similar thing to what they recommend in their site. Only addition was to disable PHP. They don&#8217;t need it so it should not be enabled. First rule of security is to allow always as little permissions as possible. To do that in Apache simply add anywhere in the VirtualHost:</p>
<p><code>php_value engine off</code></p>
<p><strong>3.</strong> Set up an FTP account. Just to steps:</p>
<p>Install:</p>
<p><code>apt-get install proftpd</code></p>
<p>Setup in /etc/proftpd/proftpd.conf:</p>
<p><code>DefaultRoot /var/www/wikileaks.abadcer.com wikileaks</code></p>
<p>Again the key thing in security here is the password, IP filtering and IP ban (blocking someone after several failures) is not a good practice as it would make your FTP server easier for DoS attacks.</p>
]]></content:encoded>
			<wfw:commentRss>http://abadcer.com/2010/12/wikileaks-mirror/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade from Debian Lenny to Squeeze in OVH RPS</title>
		<link>http://abadcer.com/2010/11/lenny-to-squeeze-ovh-rps/</link>
		<comments>http://abadcer.com/2010/11/lenny-to-squeeze-ovh-rps/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 23:28:51 +0000</pubDate>
		<dc:creator>abad</dc:creator>
				<category><![CDATA[How to's]]></category>

		<guid isPermaLink="false">http://abadcer.com/?p=120</guid>
		<description><![CDATA[This website is hosted in one of these servers: http://www.ovh.co.uk/products/rps_offers.xml OVH offers a wide list of possible OS to install in your dedicated box and I believe the best one is Debian, I love its simplicity, community support, security and above all its cleanliness, you start with a clean base system and you install and [...]]]></description>
			<content:encoded><![CDATA[<p>This website is hosted in one of these servers: <a title="OVH RPS" href="http://www.ovh.co.uk/products/rps_offers.xml" target="_blank">http://www.ovh.co.uk/products/rps_offers.xml</a></p>
<p>OVH offers a wide list of possible OS to install in your dedicated box and I believe the best one is Debian, I love its simplicity, community support, security and above all its cleanliness, you start with a clean base system and you install and configure just what you need, having full control of it.</p>
<p>In OVH you can install Debian 5 (Lenny), which is ideal for web hosting, but if you want to upgrade Debian 6 (Squeeze), much up-to-date and now stable, this is how to do it:</p>
<ul>
<li>1. Install Debian50_x64 from the OVH Manager (in one of two partitions, I chose one).</li>
<li>2. Updated it:</li>
</ul>
<p><code><br />
aptitude update<br />
aptitude upgrade<br />
</code></p>
<ul>
<li>3. Changed <strong>/etc/apt/sources.list</strong> replacing &#8220;lenny&#8221; with &#8220;squeeze&#8221;.</li>
<li>4. Prepare the upgrade:</li>
</ul>
<p><code><br />
aptitude update<br />
aptitude install apt dpkg aptitude<br />
</code></p>
<ul>
<li>5. Avoid a problem with UDEV before upgrading: <a href="http://forums.debian.net/viewtopic.php?f=10&amp;t=52360">http://forums.debian.net/viewtopic.php?f=10&amp;t=52360</a></li>
</ul>
<p><code>touch /etc/udev/kernel-upgrade</code></p>
<ul>
<li>6. Avoid a problem with locale during the upgrade:</li>
</ul>
<p><code><br />
apt-get install locales<br />
dpkg-reconfigure locales<br />
</code></p>
<ul>
<li>7. Upgrade all packages.</li>
</ul>
<p><code>apt-get dist-upgrade</code></p>
<ul>
<li>8. During this installation the key questions to respond are the ones regarding the boot, because the system will boot from the Netboot using the OVH kernel the questions about Lilo and Grup should be just set to do nothing.</li>
</ul>
<ul>
<li>9. That completes the upgrade, but in my case, after all packages were upgraded, the system for some reason didn&#8217;t generate the disk devices in <strong>/dev</strong> properly. I had the system mounted in /dev/sda1 but the swap was not mounted. In fact there were no <strong>/dev/sda</strong> or <strong>/dev/uba</strong> at all. To fix this you would need to create the missing devices and mount your swap (believe me you don&#8217;t want a server without swap). So first check the major and minor values from the partition info:</li>
</ul>
<p><code>cat /proc/partitions<br />
major minor  #blocks  name</p>
<p>180        0     503808 uba<br />
180        1     497983 uba1<br />
8        0   20971520 sda<br />
8        1   20479969 sda1</code></p>
<ul>
<li>10.  Create the devices accordingly to your values above, then you can enable the swap disk again, in my example:</li>
</ul>
<p><code>mknod /dev/uba b 180 0<br />
mknod /dev/uba1 b 180 1<br />
swapon -a<br />
mknod /dev/sda b 8 0<br />
mknod /dev/sda1 b 8 1</code></p>
<ul>
<li>11. That is all, the system has all packages upgraded now and I am happy running<strong> Apache 2.2.16</strong> with <strong>PHP 5.3.3</strong> !!</li>
</ul>
<p>Update: Now that Squeeze is stable you might want to try to upgrade to Debian &#8220;wheezy&#8221; (testing) in order to have newer versions of packages and still a very robust system. I would say that after upgrading to Squeeze you might just have to edit /etc/apt/sources.list again and replace &#8220;squeeze&#8221; with &#8220;wheezy&#8221;, then &#8220;apt-get update&#8221; and &#8220;apt-get dist-upgrade&#8221;. If anyone tries please let me know what problems (if any) encountered.</p>
]]></content:encoded>
			<wfw:commentRss>http://abadcer.com/2010/11/lenny-to-squeeze-ovh-rps/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Adding a photo album</title>
		<link>http://abadcer.com/2010/07/adding-a-photo-album/</link>
		<comments>http://abadcer.com/2010/07/adding-a-photo-album/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 21:33:35 +0000</pubDate>
		<dc:creator>abad</dc:creator>
				<category><![CDATA[How to's]]></category>

		<guid isPermaLink="false">http://abadcer.com/?p=85</guid>
		<description><![CDATA[Not happy with the existing solutions/plugins to generate photo albums in WordPress I decided to create my own based on a BASH script and some PHP code. Upload the photos you want to a folder, example: http://abadcer.com/photos/ Because this folder doesn&#8217;t contain any index.php or default.html or similar I enabled &#8220;directory browsing&#8221; so you can [...]]]></description>
			<content:encoded><![CDATA[<p>Not happy with the existing solutions/plugins to generate photo albums in WordPress I decided to create my own based on a BASH script and some PHP code.</p>
<ul>
<li>Upload the photos you want to a folder, example:</li>
</ul>
<p><a title="Photos" href="http://abadcer.com/photos/" target="_blank">http://abadcer.com/photos/</a></p>
<ul>
<li>Because this folder doesn&#8217;t contain any index.php or default.html or similar I enabled &#8220;directory browsing&#8221; so you can see the files, in this case the photos, and click on them to see them. To do so create a file called <strong>.htaccess</strong> and put inside:</li>
</ul>
<p><code> +Indexes</code></p>
<ul>
<li>At this point you just have some folders with big JPG files inside, I decided to automate a process which creates thumbnails of this files in a subfolder called &#8220;.thumbs&#8221;. It is designed to search all JPGs in all the subfolders. My example worked in Debian in the folder where the images are:</li>
</ul>
<p><code> find . -type f | grep -E "jpg|JPG" | grep -v "/.thumbs/" | awk '{ run="convert -geometry 150x150 " "\"" $0 "\" ";<br />
file=$0;<br />
sub(/(.*)\//, "", file);<br />
folder=$0;<br />
sub(file, "", folder);<br />
system("mkdir " "\"" folder ".thumbs/" "\"");<br />
run=run "\"" folder ".thumbs/" file "\"";<br />
system(run);}'</code></p>
<ul>
<li>This will create the thumbnail (max 150 pixels wide or long) in /.thumbs/ subfolder. It basically finds all JPG files and run this command for each file found:</li>
</ul>
<p><code>convert -geometry '150x150' "./Alex day 5/DSC_6395_resize.JPG" "./Alex day 5/.thumbs/DSC_6395_resize.JPG"</code></p>
<ul>
<li>Finally you just need a PHP code which reads the file list in the folders, and generates the links to the files showing the thumbnails, like in here: <a title="Photos Alex day 2" href="http://abadcer.com/photos/2011-02 Alex/" target="_blank">http://abadcer.com/photos/2011-02 Alex/</a></li>
</ul>
<p><code> &lt;?php<br />
if ($handle = opendir('.')) {<br />
while (false !== ($file = readdir($handle))) {<br />
$jpg = strpos($file,"JPG");<br />
$jpg_low = strpos($file,"jpg");<br />
if($jpg == true | $jpg_low == true) {<br />
echo "&lt;a href=\"$file\"&gt; &lt;img src=\".thumbs/$file\" /&gt;&lt;/a&gt;\n";<br />
}<br />
}<br />
closedir($handle);<br />
}<br />
?&gt;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://abadcer.com/2010/07/adding-a-photo-album/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How did I put all this together</title>
		<link>http://abadcer.com/2009/09/how-did-i-put-all-this-together/</link>
		<comments>http://abadcer.com/2009/09/how-did-i-put-all-this-together/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 23:33:32 +0000</pubDate>
		<dc:creator>abad</dc:creator>
				<category><![CDATA[How to's]]></category>

		<guid isPermaLink="false">http://abadcer.com/?p=31</guid>
		<description><![CDATA[Got a domain in 123-reg.co.uk Got a dedicated Linux server from ovh.co.uk Got Apache2, MySQL and PHP5 installed Changed the DNS settings of abadcer.com to point to this server. Downloaded and install WordPress from wordpress.org Found a nice theme to skin the site. Done It is easier than what it looks, more details soon.]]></description>
			<content:encoded><![CDATA[<ul>
<li>Got a domain in <a href="http://123-reg.co.uk">123-reg.co.uk</a></li>
<li>Got a dedicated Linux server from <a href="http://ovh.co.uk">ovh.co.uk</a></li>
<li>Got Apache2, MySQL and PHP5 installed</li>
<li>Changed the DNS settings of abadcer.com to point to this server.</li>
<li>Downloaded and install WordPress from <a href="http://wordpress.org">wordpress.org</a></li>
<li>Found a nice theme to skin the site.</li>
<li>Done</li>
</ul>
<p>It is easier than what it looks, more details soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://abadcer.com/2009/09/how-did-i-put-all-this-together/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First post</title>
		<link>http://abadcer.com/2009/09/first-post/</link>
		<comments>http://abadcer.com/2009/09/first-post/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 17:03:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://abadcer.com/?p=4</guid>
		<description><![CDATA[Hello! Not much to see here yet. I&#8217;ll post interesting things soon.]]></description>
			<content:encoded><![CDATA[<p>Hello! Not much to see here yet. I&#8217;ll post interesting things soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://abadcer.com/2009/09/first-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

