<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Paul On Rails: MediaTemple and Rails Part 1, The Install</title>
    <link>http://paulonrails.com/articles/2007/10/23/mediatemple-and-rails-part-1-the-install</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Paul's thoughts on Rails</description>
    <item>
      <title>MediaTemple and Rails Part 1, The Install</title>
      <description>&lt;p&gt;So assuming you&amp;#8217;ve ordered a &lt;a href="http://mediatemple.net"&gt;MediaTemple&lt;/a&gt; Dedicated-Virtual Server account and you want to setup a proper rails/mongrel setup you&amp;#8217;ll want to follow the below instructions.&lt;/p&gt;

&lt;p&gt;The first thing you want to do is ask support to make some changes to your machine.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ask them to enable root ssh access&lt;/li&gt;
&lt;li&gt;Ask them to install the Developer Tools on the machine&lt;/li&gt;
&lt;li&gt;(Optional) Ask them to disable Plesk.  I personally don&amp;#8217;t like stuff like Plesk, but some folks do.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Unfortunately, MT was a bit slow at doing all the above so give yourself a day or two for all the above to finish, they&amp;#8217;ll probably need to re-image your server, so wait until they are all finished before you put anything on there. &lt;/p&gt;

&lt;p&gt;For some reason MT doesn&amp;#8217;t install yum as part of their base install, so the next step is to install yum.&lt;/p&gt;

&lt;p&gt;Go to the &lt;a href="http://vault.centos.org/4.4/os/i386/CentOS/RPMS/"&gt;Centos Vault&lt;/a&gt; and download the needed packages.  Should be the following.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;yum-2.4.3-1.c4.noarch.rpm&lt;/li&gt;
&lt;li&gt;python-sqlite-1.1.7-1.2.i386.rpm&lt;/li&gt;
&lt;li&gt;python-elementtree-1.2.6-4.2.1.i386.rpm&lt;/li&gt;
&lt;li&gt;python-urlgrabber-2.9.8-2.noarch.rpm&lt;/li&gt;
&lt;li&gt;sqlite-3.3.3-1.2.i386.rpm&lt;/li&gt;
&lt;li&gt;sqlite-devel-3.3.3-1.2.i386.rpm&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Use wget or curl to download these files to a directory and then use &lt;pre&gt;rpm -i *&lt;/pre&gt; to install everything (note make sure you do this as the root user).&lt;/p&gt;

&lt;p&gt;Now that you have yum install you can easily install the right versions of apache and ruby.  First let&amp;#8217;s configure yum to grab new versions of apache from the &lt;a href="http://www.jasonlitka.com/yum-repository/"&gt;Utter Ramblings Repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Create a file in /etc/yum.repos.d called utterramblings.repo and add the following lines to it.&lt;/p&gt;

&lt;pre&gt;
    [utterramblings]
    name=Jason's Utter Ramblings Repo
    baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
&lt;/pre&gt;

&lt;p&gt;Once this is done you should issue a &lt;pre&gt;yum update&lt;/pre&gt; command and let the latest apache and such be updated.  Follow this up with a simple install of ruby 1.8.5 using the CentOS-Testing.repo.&lt;/p&gt;

&lt;p&gt;Create a CentOS-Testing.repo in /etc/yum.repos.d and put the following content in it.&lt;/p&gt;

&lt;pre&gt;
    [c4-testing]
    name=CentOS-4 Testing 
    baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
&lt;/pre&gt;

&lt;p&gt;This time just issue an &lt;pre&gt;yum update ruby&lt;/pre&gt; command.  Edit the CentOS-Testing.repo file and set &lt;pre&gt;enabled=1&lt;/pre&gt; to &lt;pre&gt;enabled=0&lt;/pre&gt; since we don&amp;#8217;t want this particular repository for anything other then this.&lt;/p&gt;

&lt;p&gt;Almost done!  Just follow the &lt;a href="http://www.rubygems.org/read/chapter/3"&gt;RubyGems Installation Instructions&lt;/a&gt; and type in &lt;pre&gt;gem install rails&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Voila a Rails setup.  You&amp;#8217;ll probably want to add in gems for mysql and such, but at least this should get you going as far as MT is concerned.&lt;/p&gt;</description>
      <pubDate>Tue, 23 Oct 2007 12:38:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:372a1172-5cc1-4566-a2de-8bef41c96368</guid>
      <author>Paul Haddad</author>
      <link>http://paulonrails.com/articles/2007/10/23/mediatemple-and-rails-part-1-the-install</link>
      <category>Hosting</category>
      <category>MediaTemple</category>
      <category>Hosting</category>
      <category>yum</category>
    </item>
  </channel>
</rss>
