<?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>themattharris.com &#187; SysAdmin</title>
	<atom:link href="http://themattharris.com/category/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://themattharris.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 01 Jun 2010 17:30:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Using local mail (/var/mail/user)</title>
		<link>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2009%2F06%2Fusing-local-mail-varmailuser%2F&amp;seed_title=Using+local+mail+%28%2Fvar%2Fmail%2Fuser%29</link>
		<comments>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2009%2F06%2Fusing-local-mail-varmailuser%2F&amp;seed_title=Using+local+mail+%28%2Fvar%2Fmail%2Fuser%29#comments</comments>
		<pubDate>Tue, 16 Jun 2009 13:06:37 +0000</pubDate>
		<dc:creator>themattharris</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[commandline]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[movemail]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://themattharris.com/?p=325</guid>
		<description><![CDATA[When developing websites it is quite common for there to be some kind of contact form or other mailing function. The problem is that should you, like me, have your email being forwarded through Google Mail you will find those emails never get to your Google address. The reason for this is simple, your computer [...]]]></description>
			<content:encoded><![CDATA[<p>When developing websites it is quite common for there to be some kind of contact form or other mailing function.  The problem is that should you, like me, have your email being forwarded through Google Mail you will find those emails never get to your Google address.  The reason for this is simple, your computer is not recognised as a legitimate SMTP server so Google rejects the mail.  The good news is you can instead tell your Website to send the emails to your local computer instead.<span id="more-325"></span></p>

<p>Very simply you just need to give the website you are testing the email address <code>username@computername.local</code>. For example my username is <code>matt</code> and my computer is called <code>tribble-mbp</code> so my email would be <code>matt@tribble-mbp.local</code>. Alternatively you can instead use the computer name as <code>localhost</code> making the email<code>matt@localhost</code>.</p>

<p>Once you have the email set to your local machine you can use the built in <strong>mail</strong> program in MacOS.</p>

<h2>Using command line mail</h2>

<p>To use mail you need to fire up the Terminal.app (Finder > Go > Utilities > Terminal) and type <code>mail</code>. Most of the time you will be presented with a very boring response similar to this:</p>

<p><pre class="brush: plain;">No mail for matt</pre></p>

<p>If you do have mail you will instead see an interactive prompt similar to this:</p>

<p><pre class="brush: plain;">&gt;N  1 matt@tribble-mbp.loc  Tue Jun 16 10:40  14/493   &quot;Test&quot;
? </pre></p>

<p>This is your mailbox, and in my case shows I have 1 new message from matt@tribble-mbp.loc(al) which was sent on Tuesday June 16 at 10:20. The subject of the message is &#8220;Test&#8221;. This is helpful but how do I view the message?</p>

<h2>Handy mail commands</h2>

<table>
<tr>
<th>Command</th>
<th>Purpose</th>
</tr>
<tr>
<td><code>1</code> (or any other number)</td>
<td>Display the message with the ID equal to 1</td>
</tr>
<tr>
<td><code>help</code></td>
<td>Display the help screen</td>
</tr>
<tr>
<td>h</td>
<td>List the headers of the emails </td>
</tr>
<tr>
<td>d1</td>
<td>Delete message 1 (warning this is instant, there is no confirmation step)</td>
</tr>
<tr>
<td>d1-10</td>
<td>Delete messages 1 through 10</td>
</tr>
<tr>
<td>q</td>
<td>Quit mail</td>
</tr>
</table>

<h2>Sending mail</h2>

<p>The easiest way to send mail is to use the website you are developing but, should you wish to, you can use the command line tool. The best way to understand this is an example. We&#8217;re going to send an email to ourselves with the subject &#8220;Test&#8221; and the message &#8220;What&#8217;s up doc?&#8221;. To do this fire up Terminal.app and do the following:</p>

<ul>
<li>Enter <code>mail matt@tribble-mbp.local</code> replacing <code>matt@tribble-mbp.local</code> with the correct address for you.</li>
<li>You will be prompted for the <code>Subject:</code> so enter <code>Test</code> and press enter/return.</li>
<li>It now looks like nothing is happening but in reality mail is waiting for you to enter the body of the message. On the line that has just started type <code>What's up doc?</code> but do not press enter.</li>
<li>To finish the message we have to &#8216;interrupt&#8217; the program. We do this by holding down <code>ctrl</code> on the keyboard and pressing &#8220; (sometimes you need to press it a couple of times).</li>
<li>You should find the letters <code>EOT</code> appear and the program exits. If not, release any keys you have and try pressing <code>ctrl</code> and <code>d</code> again until it does.</li>
</ul>

<p>When all is done the screen should look similar to this:</p>

<p><pre class="brush: plain;">mail matt@tribble-mbp.local
Subject: Test
What's up doc?EOT</pre></p>

<p>Great! you&#8217;ve sent your first mail. Lets take a look at it by entering <code>mail</code> in the terminal. You should find something similar to this:</p>

<p><pre class="brush: plain;">&gt;N  1 matt@tribble-mbp.loc  Tue Jun 16 10:44  14/486   &quot;Test&quot;
? 1
Message 1:
From matt@tribble-mbp.local  Tue Jun 16 10:44:10 2009
X-Original-To: matt@tribble-mbp.local
Delivered-To: matt@tribble-mbp.local
To: matt@tribble-mbp.local
Subject: Test
Date: Tue, 16 Jun 2009 10:44:10 +0100 (BST)
From: matt@tribble-mbp.local (Matt Harris)
What's up doc?</pre></p>

<p>To delete the message type <code>d1</code>, replacing the 1 with the correct ID of the message.</p>

<h2>Sending attachments</h2>

<p>Sending attachments is again something you would probably want to do using your web application however it is quite straight forward. The method here does have it&#8217;s problems with encoding but works out of the box &ndash; as this is only for development and on the local machine it&#8217;s something I&#8217;m happy living with. To send an attachment use the following command:</p>

<p><pre class="brush: plain;">uuencode /path/to/file.jpg filename-for-recipient.jpg | mail matt@tribble-mbp.local</pre></p>

<p>This will send a single message with the @file.jpg@ attached to the message. Helpful but what about sending some text with the message as well? Well, this is achieved using <code>echo</code> and the <code>|</code> technique, like this:</p>

<p><pre class="brush: plain;">(echo &quot;My message test&quot;; uuencode /path/to/file.jpg filename-for-recipient.jpg) | mail matt@localhost</pre></p>

<p>Alternatively you can send a text file as message text using the <code>cat</code> command like this:</p>

<p><pre class="brush: plain;">(cat mytextfile.txt; uuencode /path/to/file.jpg filename-for-recipient.jpg) | mail matt@localhost</pre></p>

<h2>Summary</h2>

<p>Hopefully this has been useful for you. I found it partifularly helpful for debugging this. Knowing how mail works also means you can setup automated mailings from your MacOS to yourself, such as log files or alerts.</p>

<p>When you start using mail a lot, managing messages in the command line can become quite laboured so in my next post I&#8217;ll show you how to read the command line mail using Thunderbird.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2009%2F06%2Fusing-local-mail-varmailuser%2F&amp;seed_title=Using+local+mail+%28%2Fvar%2Fmail%2Fuser%29/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resetting Permissions</title>
		<link>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2009%2F05%2Fresetting-permissions%2F&amp;seed_title=Resetting+Permissions</link>
		<comments>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2009%2F05%2Fresetting-permissions%2F&amp;seed_title=Resetting+Permissions#comments</comments>
		<pubDate>Fri, 08 May 2009 19:11:20 +0000</pubDate>
		<dc:creator>themattharris</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[reset]]></category>

		<guid isPermaLink="false">http://themattharris.com/?p=286</guid>
		<description><![CDATA[Recently I found myself needing to reset permissions on a website whose files and folders had been changed to 777. For those who are not familiar with permissions this means all the files and folders are readable but more importantly writeable but anyone. It also makes files executable, or runnable on the server. This could [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I found myself needing to reset permissions on a website whose files and folders had been changed to 777. For those who are not familiar with permissions this means all the files and folders are readable but more importantly writeable but anyone. It also makes files executable, or runnable on the server. This could be something you want for upload folders or files you want to be able to edit through a web interface, but not for a whole site. Whatever the reason if the permissions on a folder are messed up this little snippet will reset the permission to the common ones set in a web folder.</p>

<p><pre class="brush: plain;">chmod -R 0755 directory
cd directory
find ./ -type f  -exec chmod 644 {} \;</pre></p>

<p>The first command resets all files and folders to 755, allowing everyone to read and execute (or traverse for directories) and the owner to modify. The third command then resets just files to 644 which drops the allowed to execute flag, turning files from programs into files again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2009%2F05%2Fresetting-permissions%2F&amp;seed_title=Resetting+Permissions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up your Git installation to use a remote repository (git clone)</title>
		<link>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2008%2F08%2Fsetting-up-your-git-installation-to-use-a-remote-repository-git-clone%2F&amp;seed_title=Setting+up+your+Git+installation+to+use+a+remote+repository+%28git+clone%29</link>
		<comments>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2008%2F08%2Fsetting-up-your-git-installation-to-use-a-remote-repository-git-clone%2F&amp;seed_title=Setting+up+your+Git+installation+to+use+a+remote+repository+%28git+clone%29#comments</comments>
		<pubDate>Thu, 28 Aug 2008 04:40:41 +0000</pubDate>
		<dc:creator>themattharris</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[unfuddle]]></category>

		<guid isPermaLink="false">http://www.themattharris.com/?p=88</guid>
		<description><![CDATA[This is part 3 of a 4 part series of setting up your systems to use Git. So you&#8217;ve installed Git on your remote server and now want to be able to keep connect to a remote Git repository. This post will go through setting up a connection to two popular repository hosting providers, Unfuddle [...]]]></description>
			<content:encoded><![CDATA[<p>This is part 3 of a 4 part series of setting up your systems to use Git.</p>

<p>So you&#8217;ve installed Git on your remote server and now want to be able to keep connect to a remote Git repository.  This post will go through setting up a connection to two popular repository hosting providers, <a href="http://www.unfuddle.com">Unfuddle</a> and <a href="http://www.github.com">Github</a>. I should stress these sites provide instructions on how to connect to their repositories and so what I talk about here is already on these sites; I just wanted to have a complete set of instructions available in one place.<span id="more-88"></span></p>

<h2>What you will need</h2>

<ul>
<li>SSH root access to your server (MediaTemple offer this though the <a href="http://ac.mediatemple.net">Account Center</a></li>
<li>An account on Unfuddle or Github</li>
<li>An SSH Keypair setup on your server (if you&#8217;ve not done this yet see <a href="/2008/08/06/generating-an-ssh-keypair/">Generating an SSH Keypair</a></li>
<li>About 15 minutes of time</li>
</ul>

<h2>Find out your SSH Key</h2>

<p>Remote repositories use SSH Tunnels to transmit data between client and host.  For this to work we need to register the SSH Key on our server with the remote repository. To find out what your SSH Key is you need to:</p>

<ol>
<li>Log into your server using SSH. Usually this is <code>ssh root@your-domain.com</code></li>
<li>Print the key to the terminal by entering the command : <code>cat ~/.ssh/id_rsa.pub</code></li>
<li>Copy everything that was just output to the screen to a blank document or your clipboard. It will be something like <code>ssh-rsa == root@</code></li>
</ol>

<h2>Registering our key with the remote repository</h2>

<p>Now we have our SSH key we need to register it with our account on the remote repository. For Github this is on your <a href="https://github.com/account">account page</a> under &#8220;SSH Public Keys&#8221;. On Unfuddle it&#8217;s on the &#8220;Personal Settings&#8221; page under &#8220;Public Keys&#8221;.</p>

<ol>
<li>On Github choose to &#8220;add another public key&#8221;, whilst on Unfuddle choose &#8220;New Public Key&#8230;&#8221;</li>
<li>You&#8217;ll be asked for a title and a value. Enter a name in the title box which will identify this key clearly, for example &#8220;root on example.com&#8221;. In the value box paste the key pair you copied from the terminal window earlier.</li>
</ol>

<p>These services now know who we are and we can authenticate with them. The next stage is to connect to the remote repositories.</p>

<h2>Connecting to the remote repositories</h2>

<ol>
<li>First thing you&#8217;ll want to do is find the Git Clone address. On Unfuddle this is displayed under the name of the repository on the Repositories page.  On Github the address is called the Public Clone URL and can be found on the Source page for the repository. It will look something like <code>git@something.unfuddle.com:something/project.git</code> or <code>git@github.com/username/project.git</code></li>
<li>SSH into your server if your not in it any longer.</li>
<li>Navigate into the folder which will contain your clone of the Git repository.</li>
<li>Git cannot be cloned as a folder which already exists. If you want to clone the repository to a folder called &#8220;apples&#8221; you need to make sure the folder &#8220;apples&#8221; doesn&#8217;t exist already. In this case i&#8217;m going to clone my git repository into the folder <code>httpdocs</code> by using the command <code>git clone  httpdocs</code></li>
<li>If this is the first time you&#8217;ve connect to the repository you&#8217;ll likely be asked to accept the RSA key fingerprint. Check the host name and IP that&#8217;s displayed and if your happy answer <code>yes</code></li>
<li>You&#8217;ll now be asked for the passphrase to your key. This is the phrase you entered when creating your SSH key pair before. This isn&#8217;t your SSH login password (unless you made them the same &#8211; which you really shouldn&#8217;t).</li>
<li>If you get errors here such as <strong>fatal: The remote end hung up unexpectedly</strong> make sure your password is correct and that you&#8217;ve registered your SSH key with your provider</li>
</ol>

<p>You&#8217;ve now got a clone of the remote repository on your server. Now check the permissions are correct for your requirements.  In my case I&#8217;ve cloned the repository into my web folder so I need to reset the permissions to those of my web account.</p>

<p>Now, whenever you want to update the copy of the code on your server just run <code>git pull</code></p>

<p>In part 4 of this 4 part series I&#8217;ll talk about how I use Git to keep my production servers and easily publish updates.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2008%2F08%2Fsetting-up-your-git-installation-to-use-a-remote-repository-git-clone%2F&amp;seed_title=Setting+up+your+Git+installation+to+use+a+remote+repository+%28git+clone%29/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Generating an SSH Keypair</title>
		<link>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2008%2F08%2Fgenerating-an-ssh-keypair%2F&amp;seed_title=Generating+an+SSH+Keypair</link>
		<comments>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2008%2F08%2Fgenerating-an-ssh-keypair%2F&amp;seed_title=Generating+an+SSH+Keypair#comments</comments>
		<pubDate>Wed, 06 Aug 2008 08:46:56 +0000</pubDate>
		<dc:creator>themattharris</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[keypair]]></category>
		<category><![CDATA[mediatemple]]></category>
		<category><![CDATA[mt]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.themattharris.com/?p=18</guid>
		<description><![CDATA[This is part 2 of a 4 part series of setting up your systems to use Git but in this case, is of general interest to those who may need to generate SSH Keypairs. Git uses SSH key pairs to authenticate the machine you are accessing the repository from with the place you store that [...]]]></description>
			<content:encoded><![CDATA[<p>This is part 2 of a 4 part series of setting up your systems to use Git but in this case, is of general interest to those who may need to generate SSH Keypairs.</p>

<p>Git uses SSH key pairs to authenticate the machine you are accessing the repository from with the place you store that repository.  If you followed the post about installing Git on your MediaTemple server then this is the next step in getting Git ready.  This post should also act as a quick reference if you are not yet familiar with, or just want reminding of, the method of creating SSH public keypairs.<span id="more-18"></span></p>

<h2>What you will need</h2>

<ul>
<li>SSH root access to your server (MediaTemple offer this though the <a href="http://ac.mediatemple.net">Account Center</a>)</li></li>
<li>About 5 minutes of time</li>
</ul>

<h2>Method</h2>

<p>This is a quick process and remarkably easy to do.</p>

<ol>
<li>Log into your server using SSH. Usually this is <code>ssh root@your-domain.com</code></li>
<li>Enter the command: <code>ssh-keygen -t rsa</code></li>
<li>You will be asked where you want to save the key file, just press enter. (If you are told the file already exists skip the next 2 steps)</li>
<li>You&#8217;ll now be asked to enter a passphrase . You should enter a passphrase you will remember here as you will need it when you communicate with the main repository from now on.</li>
<li>Confirm the passphrase.</li>
<li>You can view the public keypair that was just created by entering: <code>cat ~/.ssh/id_rsa.pub</code></li>
</ol>

<p>That&#8217;s all, in the next post i&#8217;ll show you how to connect to your repository on Unfuddle.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2008%2F08%2Fgenerating-an-ssh-keypair%2F&amp;seed_title=Generating+an+SSH+Keypair/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing Git binaries onto a MediaTemple server</title>
		<link>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2008%2F08%2Finstalling-git-binaries-onto-a-mediatemple-server%2F&amp;seed_title=Installing+Git+binaries+onto+a+MediaTemple+server</link>
		<comments>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2008%2F08%2Finstalling-git-binaries-onto-a-mediatemple-server%2F&amp;seed_title=Installing+Git+binaries+onto+a+MediaTemple+server#comments</comments>
		<pubDate>Wed, 06 Aug 2008 08:27:21 +0000</pubDate>
		<dc:creator>themattharris</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[mediatemple]]></category>
		<category><![CDATA[mt]]></category>

		<guid isPermaLink="false">http://www.themattharris.com/?p=29</guid>
		<description><![CDATA[This is part 1 of a series on setting up your systems to use Git. As a developer I make frequent use of version control systems to keep my code safe and easily keep production sites up to date. I previously used the widely supported SVN but have recently moved to the open source project [...]]]></description>
			<content:encoded><![CDATA[<p>This is part 1 of a series on setting up your systems to use Git.</p>

<p>As a developer I make frequent use of version control systems to keep my code safe and easily keep production sites up to date.  I previously used the widely supported <a href="http://subversion.tigris.org/">SVN</a> but have recently moved to the open source project <a href="http://git.or.cz/">Git</a>.  This move hasn&#8217;t been without it&#8217;s problems though and one of the largest was that Git wasn&#8217;t installed on my MediaTemple (<abbr title="MediaTemple">MT</abbr>) servers. Luckily, I found an MT knowledge base article titled <a href="http://kb.mediatemple.net/questions/820/Installing+Git+on+a+(dv)+3.5+server" title="MediaTemple knowledge base article">&#8220;Installing Git on a (dv) 3.5 server&#8221;</a> but soon found it had a couple of holes in it which prevented a successful install.</p>

<p>So, in case you find yourself in the same boat, I present my method for installing Git on a MediaTemple Dedicated Virtual 3.5 Server.<span id="more-29"></span></p>

<p>This method may work on other providers servers; if it does drop me a comment and i&#8217;ll update the post.  What I can tell you is this method is for CentOS 5 and will not work on a MediaTemple dv3 (it&#8217;s running Centos 4).</p>

<p>These steps are provided as a guide only and you follow them at your own risk.</p>

<h2>What you will need</h2>

<ol>
<li>SSH root access to your server (MediaTemple offer this though the <a href="http://ac.mediatemple.net">Account Center</a></li>
<li>Developer tools installed on your server (MediaTemple offer this though the <a href="http://ac.mediatemple.net">Account Center</a></li>
<li>An empty text document to save some links into</li>
<li>About 30 minutes of time (after backing up)</li>
</ol>

<h2>Method</h2>

<ol>
<li><strong>Ensure you have a backup of your server</strong></li>
<li>Using your favourite web browser navigate to <a href="http://mirror.centos.org/centos/5/os/i386/CentOS/">http://mirror.centos.org/centos/5/os/i386/CentOS/</a>, this address is case sensitive</li>
<li>You&#8217;ll see a whole list of packages which you can install. The ones you need to locate the current links for are:

<ul>
<li>python-iniparse <a href="http://mirror.centos.org/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm">http://mirror.centos.org/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm</a></li>
<li><abbr title="yellowdog updater modified">yum</abbr> <a href="http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.8-9.el5.centos.1.noarch.rpm">http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.8-9.el5.centos.1.noarch.rpm</a>
Copy the URLs into a text document as we will need them later.  The URLs given here were correct at the time of posting this article so may be wrong now as the version numbers change. To find the packages quickly search the page for the names i&#8217;ve given, e.g. python-iniparse</li>
</ul></li>
<li>Log into your server using SSH. 
<pre class="brush: plain;">ssh root@your-domain.com</pre></li>
<li>Install the python-iniparse package by entering the command: (replace with the URL you copied earlier): 
<pre class="brush: plain;">rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm</pre></li>
<li>Install yum by entering the command: (replace with the URL you copied earlier)
<pre class="brush: plain;">rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.8-9.el5.centos.1.noarch.rpm</pre></li>
<li>The last rpm we need is EPEL. Install this by entering: <pre class="brush: plain;">rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm</pre></li>
<li>yum is now installed, making things a lot easier</li>
<li>Tell yum to update itself and everything it knows about by entering the command: 
<pre class="brush: plain;">yum -y update</pre></li>
<li>When yum has finished updating, we can install Git. Simply enter: 
<pre class="brush: plain;">yum install git</pre> and answer <code>y</code> to the prompts</li>
</ol>

<p>Git is now successfully installed on your MediaTemple server ready for use. Next post is about <a href="/2008/08/06/generating-an-ssh-keypair/">Generating an SSH keypair</a> which you need to access your remote repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.themattharris.com/feeder/?FeederAction=clicked&amp;feed=Articles+%28RSS2%29&amp;seed=http%3A%2F%2Fthemattharris.com%2F2008%2F08%2Finstalling-git-binaries-onto-a-mediatemple-server%2F&amp;seed_title=Installing+Git+binaries+onto+a+MediaTemple+server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
