<?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>Daniel Tillett &#187; server admin</title>
	<atom:link href="http://www.tillett.info/category/server-admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tillett.info</link>
	<description>Just my blog</description>
	<lastBuildDate>Sat, 04 Feb 2012 09:22:11 +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>Pio Cesare Grignolino del Molferrato Casalese 2009</title>
		<link>http://www.tillett.info/2012/02/04/pio-cesare-grignolino-del-molferrato-casalese-2009/</link>
		<comments>http://www.tillett.info/2012/02/04/pio-cesare-grignolino-del-molferrato-casalese-2009/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 09:22:11 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[server admin]]></category>

		<guid isPermaLink="false">http://www.tillett.info/?p=153</guid>
		<description><![CDATA[I am a bit of a sucker for new things (at the supermarket if it say &#8220;new&#8221; I will buy it). On this basis I bought a bottle of Pio Cesare Grignolino del Molferrato Casalese 2009. I of course had never heard of Grignolino before (who has), but what the heck I thought why not try [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>I am a bit of a sucker for new things (at the supermarket if it say &#8220;new&#8221; I will buy it). On this basis I bought a bottle of <em>Pio Cesare Grignolino del Molferrato Casalese 2009. </em>I of course had never heard of Grignolino before (who has), but what the heck I thought why not try this wine. Price is usually a very good indication of quality (unfortunately) and at $30 I thought it should be drinkable. I am glad I took the risk as the wine is very,very drinkable. It is rather difficult to describe (Grignolino is apparently a rather rare, but distinctive Italian wine according to my google research), but I guess the closest would be to say it can fill the role of a pinot while being different. If you are looking for a medium bodied, yet robust, wine that can pair up well with food then this is something to try . If I had to sum it up  in one word then that word would be yum. I will certainly be buying more.</p>
<p>Price $30</p>
<p>Value $45</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.tillett.info/2012/02/04/pio-cesare-grignolino-del-molferrato-casalese-2009/')" href="http://www.sphere.com/search?q=sphereit:http://www.tillett.info/2012/02/04/pio-cesare-grignolino-del-molferrato-casalese-2009/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.tillett.info/2012/02/04/pio-cesare-grignolino-del-molferrato-casalese-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing CentOS 5.5 on a Intel Mac Mini</title>
		<link>http://www.tillett.info/2011/01/31/installing-centos-5-5-on-mac-mini-intel/</link>
		<comments>http://www.tillett.info/2011/01/31/installing-centos-5-5-on-mac-mini-intel/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 13:01:03 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[server admin]]></category>

		<guid isPermaLink="false">http://www.tillett.info/?p=98</guid>
		<description><![CDATA[If you want to install centos 5.5 on an intel mac mini it is pretty easy. My guess is the same process applied to other Apple computers, but I have not tried it on anything other than a mac mini. The mac mini is a really nice little server that takes up no space and [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>If you want to install centos 5.5 on an intel mac mini it is pretty easy. My guess is the same process applied to other Apple computers, but I have not tried it on anything other than a mac mini. The mac mini is a really nice little server that takes up no space and is totally silent &#8211; much better to live with than the dual xeon space heater I had to move out of my office.</p>
<ol>
<li>Boot off the <em>Mac OS X Install DVD</em> or from an external drive (I have a firewire drive with Mac OS X installed on it so this it is what I did). Go to the  <em>Utilities</em> folder in <em>Applications</em> and launch <em>Disk Utility</em> if booting off an external drive, or if booting off the <em>Install DVD</em> select  <em>Disk Utility</em> from the <em>Utilities</em> menu.</li>
<li>Click on the disk you want to install CentOS on to, then select <em>Partition</em> tab, then select 1 partitions and choose <em>MS-DOS (FAT)</em> as the format. Then click <em>options</em> and select <em>Master Boot Record</em>. Then click on <em>Apply</em> when you are done. Don&#8217;t click outside of this tab before pressing <em>Apply</em> or you will lose the MBR setting.</li>
<li>Once the partitioning is complete insert the first CentOS CD and reboot the mac mini.</li>
<li>Go through the standard centos install as per normal.</li>
</ol>
<p>On tip to watch for if you are behind a proxy like me is to not select to install the CentOS extras packages. What happens if you do is you get hung at this point of the install and will have to start over again from scratch. You can always install the extras latter by modifying the yum.conf file in /etc.</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.tillett.info/2011/01/31/installing-centos-5-5-on-mac-mini-intel/')" href="http://www.sphere.com/search?q=sphereit:http://www.tillett.info/2011/01/31/installing-centos-5-5-on-mac-mini-intel/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.tillett.info/2011/01/31/installing-centos-5-5-on-mac-mini-intel/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Root privilege scripts from Apache</title>
		<link>http://www.tillett.info/2010/02/17/root-privilege-scripts-from-apache/</link>
		<comments>http://www.tillett.info/2010/02/17/root-privilege-scripts-from-apache/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 15:14:33 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[server admin]]></category>

		<guid isPermaLink="false">http://www.tillett.info/?p=62</guid>
		<description><![CDATA[If you have a script that needs to access functions that can only be run as root (e.g. chmod, chgrp, mkdir, etc) you will find that you can&#8217;t call these directly since the Apache user is not root (at least it should not be root). There is no perfect solution around this as all solutions [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>If you have a script that needs to access functions that can only be run as root (e.g. chmod, chgrp, mkdir, etc) you will find that you can&#8217;t call these directly since the Apache user is not root (at least it should not be root). There is no perfect solution around this as all solutions involve some security risk, but the least bad seems to be to use sudoer to grant root privileges to the script and then lock down the script so nobody other than root can modify the script. </p>
<p>First chmod the script so that anyone can execute it, but nobody other than root can modify it (I am assuming here that you are logged in as root, otherwise sudo).<br />
<code><br />
chmod 111 /home/path_to_script<br />
</code><br />
Next modify sudoer using visudo. It is a good idea to use visudo so that any change you make are updated without having to restart sudo.<br />
<code><br />
# visudo<br />
</code><br />
Add the following line after the root entry in sudoer<br />
<code><br />
apache_user ALL = NOPASSWD: /home/path_to_script<br />
</code><br />
Change the apache_user to whatever your apache user is (e.g. nobody) and then add the path to your script. You might want to add your favorite editor (mine is nano) to your export in .bashrc. You should now be able to call your script from apache without problem.</p>
<p>Update. Make sure that you have commented out the <code>Defaults requiretty</code> line in <code>visudo</code> or else the script won&#8217;t be run by Apache. This problem wasted a couple of hours of my time since the script would run fine from the bash shell of the apache user, but not when called by apache. I finally took a look at the log file (yes I should have done this first) and there was the problem <code>sudo: sorry, you must have a tty to run sudo</code>! </p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.tillett.info/2010/02/17/root-privilege-scripts-from-apache/')" href="http://www.sphere.com/search?q=sphereit:http://www.tillett.info/2010/02/17/root-privilege-scripts-from-apache/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.tillett.info/2010/02/17/root-privilege-scripts-from-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding iso repository under XenServer 5.5</title>
		<link>http://www.tillett.info/2009/09/23/adding-iso-repository-under-xenserver-5-5/</link>
		<comments>http://www.tillett.info/2009/09/23/adding-iso-repository-under-xenserver-5-5/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 08:14:21 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[server admin]]></category>

		<guid isPermaLink="false">http://www.tillett.info/?p=51</guid>
		<description><![CDATA[If you want to install an OS from a local repository under XenServer 5.5 then you need to do the following. The documentation on how to do this in the xenserver manual is incomplete. first ssh into the xenserver mkdir -p /var/opt/xen/iso_import Copy your ISO images to the /var/opt/xen/iso_import directory using scp. Create a repository [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>If you want to install an OS from a local repository under XenServer 5.5 then you need to do the following. The documentation on how to do this in the xenserver manual is incomplete.</p>
<p>first ssh into the xenserver<br />
<code>mkdir -p /var/opt/xen/iso_import</code><br />
Copy your ISO images to the /var/opt/xen/iso_import directory using scp.<br />
Create a repository with this command:<br />
<code>xe sr-create name-label=ISOs type=iso device-config:location=/var/opt/xen/iso_import device-config:legacy_mode=true content-type=iso</code><br />
You then need to attach the ISO library with this command (nicely not mentioned in the citrix documentation)<br />
<code>xe-mount-iso-sr /var/opt/xen/iso_import</code></p>
<p>You should then be able to create a VM using the .iso</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.tillett.info/2009/09/23/adding-iso-repository-under-xenserver-5-5/')" href="http://www.sphere.com/search?q=sphereit:http://www.tillett.info/2009/09/23/adding-iso-repository-under-xenserver-5-5/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.tillett.info/2009/09/23/adding-iso-repository-under-xenserver-5-5/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to get total folder / directory size with Linux</title>
		<link>http://www.tillett.info/2009/05/16/how-to-get-total-folder-directory-size-in-linux/</link>
		<comments>http://www.tillett.info/2009/05/16/how-to-get-total-folder-directory-size-in-linux/#comments</comments>
		<pubDate>Fri, 15 May 2009 23:28:30 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[server admin]]></category>

		<guid isPermaLink="false">http://www.tillett.info/?p=39</guid>
		<description><![CDATA[If you want to know how much disk space is being used by a directory (including all the sub-directories) then you can use the following command. It will output a single number in human readable form (eg 8.2G). I have found this very useful for finding where all my disk space has gone. du -h [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>If you want to know how much disk space is being used by a directory (including all the sub-directories) then you can use the following command. It will output a single number in human readable form (eg 8.2G). I have found this very useful for finding where all my disk space has gone.<br />
<code><br />
du -h | grep -v '/' | awk '{print $1}'<br />
</code></p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.tillett.info/2009/05/16/how-to-get-total-folder-directory-size-in-linux/')" href="http://www.sphere.com/search?q=sphereit:http://www.tillett.info/2009/05/16/how-to-get-total-folder-directory-size-in-linux/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.tillett.info/2009/05/16/how-to-get-total-folder-directory-size-in-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>X11 ssh-forwarding of a gnome-session to Mac OS X 10.5</title>
		<link>http://www.tillett.info/2008/09/17/x11-ssh-forwarding-of-a-gnome-session-from-mac-os-x-105/</link>
		<comments>http://www.tillett.info/2008/09/17/x11-ssh-forwarding-of-a-gnome-session-from-mac-os-x-105/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 07:32:47 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[server admin]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[macos x 10.5]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.tillett.info/?p=15</guid>
		<description><![CDATA[If you want to X11 ssh-forward a gnome-session on a remote linux server to MacOS X Leopard there seems to be some bug in the 10.5 X11 that causes the gnome desktop to take over the whole screen and you can&#8217;t access the session. The solution is to open the gnome-session using Xnest instead. This [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>If you want to X11 ssh-forward a gnome-session on a remote linux server to MacOS X Leopard there seems to be some bug in the 10.5 X11 that causes the gnome desktop to take over the whole screen and you can&#8217;t access the session. The solution is to open the gnome-session using Xnest instead. This opens the session in a small X11 window (1024&#215;768 in the example below).</p>
<pre class="alt2" dir="ltr">Xnest -geometry 1024x768 :1&amp; DISPLAY=:1 ssh -X &lt;HOST&gt; gnome-session</pre>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.tillett.info/2008/09/17/x11-ssh-forwarding-of-a-gnome-session-from-mac-os-x-105/')" href="http://www.sphere.com/search?q=sphereit:http://www.tillett.info/2008/09/17/x11-ssh-forwarding-of-a-gnome-session-from-mac-os-x-105/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.tillett.info/2008/09/17/x11-ssh-forwarding-of-a-gnome-session-from-mac-os-x-105/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to compare the remote and local versions of a file in Dreamweaver</title>
		<link>http://www.tillett.info/2007/10/30/how-to-compare-the-remote-and-local-versions-of-a-file-in-dreamweaver/</link>
		<comments>http://www.tillett.info/2007/10/30/how-to-compare-the-remote-and-local-versions-of-a-file-in-dreamweaver/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 12:04:14 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[server admin]]></category>

		<guid isPermaLink="false">http://www.tillett.info/2007/10/30/how-to-compare-the-remote-and-local-versions-of-a-file-in-dreamweaver/</guid>
		<description><![CDATA[I was recently faced with working out what had changed in one of my big php files on the remote server (someone naughty had been playing with it). I use Mac OSX Dreamweaver and after a bit of searching around I found the following way to make Dreamweaver easily show you what has changed. This [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>I was recently faced with working out what had changed in one of my big php files on the remote server (someone naughty had been playing with it). I use Mac OSX Dreamweaver and after a bit of searching around I found the following way to make Dreamweaver easily show you what has changed. This is not really anything major but it might save someone a bit of time.</p>
<p>First download and install <a href="http://www.barebones.com/products/textwrangler/" target="_blank">TextWrangler</a>. It is free and quite a nice text editing program.</p>
<p>Next open &#8220;Preferences&#8221; in Dreamweaver and select &#8220;File Compare&#8221;.</p>
<p>In &#8220;File Compare&#8221; browse to the &#8220;usr/bin/&#8221; folder and select &#8220;twdiff&#8221;.</p>
<p>Press OK and then go back to the main menu.</p>
<p>Open in Dreamweaver the local file in that you want to compare with the remote version. Select &#8220;Compare with Remote&#8221; from the &#8220;File&#8221; menu. </p>
<p>TextWrangler will now launch showing you the difference between the local version and the remote version. You can then chose to keep or reject any of the changes.</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.tillett.info/2007/10/30/how-to-compare-the-remote-and-local-versions-of-a-file-in-dreamweaver/')" href="http://www.sphere.com/search?q=sphereit:http://www.tillett.info/2007/10/30/how-to-compare-the-remote-and-local-versions-of-a-file-in-dreamweaver/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.tillett.info/2007/10/30/how-to-compare-the-remote-and-local-versions-of-a-file-in-dreamweaver/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to upgrade from php4 to php5 on CentOS 4</title>
		<link>http://www.tillett.info/2007/10/09/how-to-upgrade-from-php4-to-php5-on-centos-4/</link>
		<comments>http://www.tillett.info/2007/10/09/how-to-upgrade-from-php4-to-php5-on-centos-4/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 14:06:00 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[server admin]]></category>

		<guid isPermaLink="false">http://www.tillett.info/2007/10/09/how-to-upgrade-from-php4-to-php5-on-centos-4/</guid>
		<description><![CDATA[This is surprisingly difficult to find out how to do. You can&#8217;t just type &#8220;yum update php&#8221; as CentOS 4.4 only has php4 in its base repository. Php5 does exist in the centosplus repository but you need to configure yum to allow this to be used. The basic instructions for doing this are: yum install [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>This is surprisingly difficult to find out how to do. You can&#8217;t just type &#8220;yum update php&#8221; as CentOS 4.4 only has php4 in its base repository. Php5 does exist in the centosplus repository but you need to configure yum to allow this to be used. The basic instructions for doing this are:<br />
<code><br />
yum install yum-plugin-priorities<br />
</code><br />
This installs the priority plugin which allows you to chose to only upgrade the packages from centosplus that you want. In this case php. </p>
<p>Next open<br />
<code><br />
nano /etc/yum.repos.d/CentOS-Base.repo<br />
</code></p>
<p>You should have something that looks like this.<br />
<code><br />
[base]<br />
name=CentOS-$releasever - Base<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=os<br />
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/<br />
gpgcheck=1<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4<br />
priority=1</p>
<p>#released updates<br />
[updates]<br />
name=CentOS-$releasever - Updates<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=updates<br />
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/<br />
gpgcheck=1<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4<br />
priority=1</p>
<p>#packages used/produced in the build but not released<br />
[addons]<br />
name=CentOS-$releasever - Addons<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=addons<br />
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/<br />
gpgcheck=1<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4</p>
<p>#additional packages that may be useful<br />
[extras]<br />
name=CentOS-$releasever - Extras<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=extras<br />
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/<br />
gpgcheck=1<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4</p>
<p>#additional packages that extend functionality of existing packages<br />
[centosplus]<br />
name=CentOS-$releasever - Plus<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=centosplus<br />
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/<br />
gpgcheck=1<br />
enabled=0<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4</p>
<p>#contrib - packages by Centos Users<br />
[contrib]<br />
name=CentOS-$releasever - Contrib<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=contrib<br />
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/<br />
gpgcheck=1<br />
enabled=0<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4<br />
</code></p>
<p>You now need to enable the centosplus repositiory. Also make sure that the priority is 2. It should now look like this.<br />
<code><br />
[centosplus]<br />
name=CentOS-$releasever - Plus<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=centosplus<br />
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/<br />
gpgcheck=1<br />
enabled=1<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4<br />
priority=2<br />
protect=1<br />
</code></p>
<p>Now you need to exclude php from all the other active repositories so that php5 from centosplus is installed. This is done by adding the following line to each of the other repository<br />
<code><br />
exclude=php*<br />
</code></p>
<p>The final file should look like this.<br />
<code><br />
# CentOS-Base.repo<br />
#<br />
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.<br />
# The mirror system uses the connecting IP address of the client and the<br />
# update status of each mirror to pick mirrors that are updated to and<br />
# geographically close to the client.  You should use this for CentOS updates<br />
# unless you are manually picking other mirrors.<br />
#<br />
# If the mirrorlist= does not work for you, as a fall back you can try the<br />
# remarked out baseurl= line instead.<br />
#<br />
#</p>
<p>[base]<br />
name=CentOS-$releasever - Base<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=os<br />
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/<br />
gpgcheck=1<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4<br />
priority=1<br />
protect=1<br />
exclude=php*</p>
<p>#released updates<br />
[update]<br />
name=CentOS-$releasever - Updates<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=updates<br />
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/<br />
gpgcheck=1<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4<br />
priority=1<br />
protect=1<br />
exclude=php*</p>
<p>#packages used/produced in the build but not released<br />
[addons]<br />
name=CentOS-$releasever - Addons<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=addons<br />
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/<br />
gpgcheck=1<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4<br />
priority=1<br />
protect=1<br />
exclude=php*</p>
<p>#additional packages that may be useful<br />
[extras]<br />
name=CentOS-$releasever - Extras<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=extras<br />
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/<br />
gpgcheck=1<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4<br />
priority=1<br />
protect=1<br />
exclude=php*</p>
<p>#additional packages that extend functionality of existing packages<br />
[centosplus]<br />
name=CentOS-$releasever - Plus<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=centosplus<br />
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/<br />
gpgcheck=1<br />
enabled=1<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4<br />
priority=2<br />
protect=1</p>
<p>#contrib - packages by Centos Users<br />
[contrib]<br />
name=CentOS-$releasever - Contrib<br />
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&#038;arch=$basearch&#038;repo=contrib<br />
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/<br />
gpgcheck=1<br />
enabled=0<br />
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4<br />
priority=2<br />
protect=1<br />
</code></p>
<p>Save the changes and update<br />
<code><br />
yum update<br />
</code></p>
<p>You should see that centosplus is now part of your repositories and see something like the following<br />
<code><br />
update                    100% |=========================|  951 B    00:00<br />
base                      100% |=========================| 1.1 kB    00:00<br />
centosplus                100% |=========================|  951 B    00:00<br />
addons                    100% |=========================|  951 B    00:00<br />
extras                    100% |=========================| 1.1 kB    00:00<br />
</code></p>
<p>Yum should finally prompt you to install the updates for php5. Don&#8217;t forget to restart apache to change it from using php4 to php5.</p>
<p>Updates:<br />
A couple of quick things to note with upgrading:<br />
1. php4 PEAR::MAIL is not compatible with php5 so you will need to upgrade it as well.<br />
2. Your apache php.conf file will be overwritten. This last issue caught me out as I had apache set up to parse .html for php includes &#8211; the upgrade disable this. I guess the moral is test, test and test again after upgrading.</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.tillett.info/2007/10/09/how-to-upgrade-from-php4-to-php5-on-centos-4/')" href="http://www.sphere.com/search?q=sphereit:http://www.tillett.info/2007/10/09/how-to-upgrade-from-php4-to-php5-on-centos-4/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.tillett.info/2007/10/09/how-to-upgrade-from-php4-to-php5-on-centos-4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Set the localhost parameter when using PEAR::Mail</title>
		<link>http://www.tillett.info/2007/09/24/set-the-localhost-parameter-when-using-pearmail/</link>
		<comments>http://www.tillett.info/2007/09/24/set-the-localhost-parameter-when-using-pearmail/#comments</comments>
		<pubDate>Mon, 24 Sep 2007 13:29:19 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[server admin]]></category>

		<guid isPermaLink="false">http://www.tillett.info/2007/09/24/set-the-localhost-parameter-when-using-pearmail/</guid>
		<description><![CDATA[If you are using the PEAR:Mail php function to send emails from your server remember to set the localhost parameter (ie $params["localhost"]=&#8217;yourhost.com&#8217;;). If you don&#8217;t set it then the originating server will be &#8220;localhost&#8221;. While this won&#8217;t stop the email being sent, spamassassin will mark the message as spam &#8211; not good if you want [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>If you are using the PEAR:Mail php function to send emails from your server remember to set the localhost parameter (ie $params["localhost"]=&#8217;yourhost.com&#8217;;). If you don&#8217;t set it then the originating server will be &#8220;localhost&#8221;. While this won&#8217;t stop the email being sent, spamassassin will mark the message as spam &#8211; not good if you want your emails to be received. </p>
<p>This little gotcha recently bit me. I hadn&#8217;t set the localhost parameter and only noticed when I had upgraded spamassassin and found my test emails ending up in my junk mail folder.</p>
<p>As for why you might want to use PEAR::Mail over the normal php mail() function the main reason is you can control which smtp server your mail is sent out over. This control is very useful if you are testing your system on one server and sending out the emails via another server.</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.tillett.info/2007/09/24/set-the-localhost-parameter-when-using-pearmail/')" href="http://www.sphere.com/search?q=sphereit:http://www.tillett.info/2007/09/24/set-the-localhost-parameter-when-using-pearmail/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.tillett.info/2007/09/24/set-the-localhost-parameter-when-using-pearmail/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to stop ssh being hammered by script kiddies</title>
		<link>http://www.tillett.info/2007/09/13/how-to-stop-ssh-being-hammered-by-script-kiddies/</link>
		<comments>http://www.tillett.info/2007/09/13/how-to-stop-ssh-being-hammered-by-script-kiddies/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 13:26:33 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[server admin]]></category>

		<guid isPermaLink="false">http://www.tillett.info/2007/09/13/how-to-stop-ssh-being-hammered-by-script-kiddies/</guid>
		<description><![CDATA[If you ever look at your server logs you will see hundred (if not thousands) of attempts by the script kiddies trying to log in to ssh. On my main linux server I get around 200 attempts a day. Below is a part of a typical days pounding. Active System Attack Alerts =-=-=-=-=-=-=-=-=-=-=-=-=-= Sep 12 [...]]]></description>
			<content:encoded><![CDATA[<!-- sphereit start --><p>If you ever look at your server logs you will see hundred (if not thousands) of attempts by the script kiddies trying to log in to ssh. On my main linux server I get around 200 attempts a day. Below is a part of a typical days pounding.<br />
<code><br />
Active System Attack Alerts<br />
=-=-=-=-=-=-=-=-=-=-=-=-=-=<br />
Sep 12 11:06:14 226 portsentry[2618]: attackalert: TCP SYN/Normal scan from host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 to TCP port: 22<br />
Sep 12 11:06:14 226 portsentry[2618]: attackalert: Host 64.183.196.194 has been blocked via wrappers with string: "ALL: 64.183.196.194"<br />
Sep 12 11:06:14 226 portsentry[2618]: attackalert: TCP SYN/Normal scan from host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 to TCP port: 22<br />
Sep 12 11:06:14 226 portsentry[2618]: attackalert: Host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 is already blocked Ignoring<br />
Sep 12 11:06:14 226 portsentry[2618]: attackalert: TCP SYN/Normal scan from host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 to TCP port: 22<br />
Sep 12 11:06:14 226 portsentry[2618]: attackalert: Host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 is already blocked Ignoring<br />
Sep 12 11:06:15 226 portsentry[2618]: attackalert: TCP SYN/Normal scan from host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 to TCP port: 22<br />
Sep 12 11:06:15 226 portsentry[2618]: attackalert: Host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 is already blocked Ignoring<br />
Sep 12 11:06:15 226 portsentry[2618]: attackalert: TCP SYN/Normal scan from host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 to TCP port: 22<br />
Sep 12 11:06:15 226 portsentry[2618]: attackalert: Host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 is already blocked Ignoring<br />
Sep 12 11:06:15 226 portsentry[2618]: attackalert: TCP SYN/Normal scan from host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 to TCP port: 22<br />
Sep 12 11:06:15 226 portsentry[2618]: attackalert: Host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 is already blocked Ignoring<br />
Sep 12 11:06:15 226 portsentry[2618]: attackalert: TCP SYN/Normal scan from host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 to TCP port: 22<br />
Sep 12 11:06:15 226 portsentry[2618]: attackalert: Host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 is already blocked Ignoring<br />
Sep 12 11:06:15 226 portsentry[2618]: attackalert: TCP SYN/Normal scan from host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 to TCP port: 22<br />
Sep 12 11:06:15 226 portsentry[2618]: attackalert: Host: rrcs-64-183-196-194.sw.biz.rr.com/64.183.196.194 is already blocked Ignoring<br />
Sep 12 12:10:30 226 portsentry[2618]: attackalert: TCP SYN/Normal scan from host: dsl-TN-static-140.246.22.125.airtelbroadband.in/125.22.246.140 to TCP port: 22<br />
Sep 12 12:10:30 226 portsentry[2618]: attackalert: Host 125.22.246.140 has been blocked via wrappers with string: "ALL: 125.22.246.140"<br />
Sep 12 12:10:30 226 portsentry[2618]: attackalert: TCP SYN/Normal scan from host: dsl-TN-static-140.246.22.125.airtelbroadband.in/125.22.246.140 to TCP port: 22<br />
Sep 12 12:10:30 226 portsentry[2618]: attackalert: Host: dsl-TN-static-140.246.22.125.airtelbroadband.in/125.22.246.140 is already blocked Ignoring<br />
Sep 12 12:10:30 226 portsentry[2618]: attackalert: TCP SYN/Normal scan from host: dsl-TN-static-140.246.22.125.airtelbroadband.in/125.22.246.140 to TCP port: 22<br />
Sep 12 12:10:30 226 portsentry[2618]: attackalert: Host: dsl-TN-static-140.246.22.125.airtelbroadband.in/125.22.246.140 is already blocked Ignoring<br />
Sep 12 16:04:44 226 portsentry[2618]: attackalert: TCP SYN/Normal scan from host: 82.138.34.109/82.138.34.109 to TCP port: 22<br />
Sep 12 16:04:44 226 portsentry[2618]: attackalert: Host 82.138.34.109 has been blocked via wrappers with string: "ALL: 82.138.34.109"<br />
</code></p>
<p>As you can see the kiddies are trying to ssh connect on port 22. One of the simplest things you can do to improve ssh security is to move the ssh port away from the default port 22 and close port 22 (why you are are at you might as well close the telnet port 23). </p>
<p>To do this open the sshd_config file (I like to use nano) and change the default port from 22 to anything else that is not being used (under 1024 is a good idea). The sshd_config file is likely to be located in /etc/ssh but if not look for it by using find (ie use &#8220;find / -name &#8216;sshd_config&#8217; &#8220;. </p>
<p>Restart sshd and log in using ssh -p [new port] user@serveraddress (eg ssh -p 999 daniel@tillett.com). This will solve most of the problems but it is a good idea to refuse all connections on port 22. I will leave how to do that for another post. </p>
<p>I should add this is not a substitute for security, but it does stop your logs from being filled with garbage.</p>
<!-- sphereit end --><span style="margin-bottom:40px; border-bottom:none;"><a class="iconsphere" title="Sphere: Related Content" onclick="return Sphere.Widget.search('http://www.tillett.info/2007/09/13/how-to-stop-ssh-being-hammered-by-script-kiddies/')" href="http://www.sphere.com/search?q=sphereit:http://www.tillett.info/2007/09/13/how-to-stop-ssh-being-hammered-by-script-kiddies/">Sphere: Related Content</a></span><br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.tillett.info/2007/09/13/how-to-stop-ssh-being-hammered-by-script-kiddies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

