MediaTemple and Rails Part 1, The Install

Posted by Paul Haddad Tue, 23 Oct 2007 19:38:00 GMT

So assuming you’ve ordered a MediaTemple Dedicated-Virtual Server account and you want to setup a proper rails/mongrel setup you’ll want to follow the below instructions.

The first thing you want to do is ask support to make some changes to your machine.

  1. Ask them to enable root ssh access
  2. Ask them to install the Developer Tools on the machine
  3. (Optional) Ask them to disable Plesk. I personally don’t like stuff like Plesk, but some folks do.

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’ll probably need to re-image your server, so wait until they are all finished before you put anything on there.

For some reason MT doesn’t install yum as part of their base install, so the next step is to install yum.

Go to the Centos Vault and download the needed packages. Should be the following.

  1. yum-2.4.3-1.c4.noarch.rpm
  2. python-sqlite-1.1.7-1.2.i386.rpm
  3. python-elementtree-1.2.6-4.2.1.i386.rpm
  4. python-urlgrabber-2.9.8-2.noarch.rpm
  5. sqlite-3.3.3-1.2.i386.rpm
  6. sqlite-devel-3.3.3-1.2.i386.rpm

Use wget or curl to download these files to a directory and then use

rpm -i *
to install everything (note make sure you do this as the root user).

Now that you have yum install you can easily install the right versions of apache and ruby. First let’s configure yum to grab new versions of apache from the Utter Ramblings Repo.

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

    [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

Once this is done you should issue a

yum update
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.

Create a CentOS-Testing.repo in /etc/yum.repos.d and put the following content in it.

    [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

This time just issue an

yum update ruby
command. Edit the CentOS-Testing.repo file and set
enabled=1
to
enabled=0
since we don’t want this particular repository for anything other then this.

Almost done! Just follow the RubyGems Installation Instructions and type in

gem install rails

Voila a Rails setup. You’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.

Posted in  | Tags , ,  | no comments

Comments

(leave url/email »)

   Preview comment