Full Rails Stack Part Four: Capistrano, MySQL

We completed our subversion setup in part three, now let's add Capistrano deployment to the mix. Let's go ahead and ssh into our server:

CODE:
  1. ssh -p 8888 deploy@your_linux_box.com

Add the following new directories to our server. This is where our staging and production factory websites will be deployed to:

CODE:
  1. sudo mkdir /var/www
  2. sudo mkdir /var/www/apps
  3. sudo chown -R deploy:deploy /var/www/apps

Continue reading 'Full Rails Stack Part Four: Capistrano, MySQL'

Full Rails Stack Part Three: Project and Subversion

If you've finished part two let's continue. In this part of the series I'm going to assume you have a working installation of MySQL on your local client machine that we will only need for testing purposes. If you've got a Mac you might look at installing MacPorts and using it to install MySQL for you. First we'll create a test rails project. I'm going to use the latest rails 2 sugar in setting up this simple test site. Open up terminal or iTerm and find a directory you want to use to create the test project. Here we go:

CODE:
  1. rails --d=mysql factory
  2. cd factory
  3. rake db:create
  4. script/generate scaffold widget name:string description:text
  5. rake db:migrate

Now let's test our site to make sure everything is working correctly:

CODE:
  1. script/server

Open up your browser and try the site out using http://localhost:3000/widgets.

Continue reading 'Full Rails Stack Part Three: Project and Subversion'

Full Rails Stack Part 2: Rails, Mongrel and Nginx

We completed setting up ssh and ssh keys in part one, let's continue now with part two of installing a full Rails stack.

SSH into your server:

CODE:
  1. ssh -p 8888 deploy@your_linux_box.com

By default, Debian and Ubuntu have five package repositories called main, restricted, universe, multiverse, and commercial. You will need the universe package repository. By default, it may or may not be enabled. To check, edit the /etc/apt/sources.list file (note that if you didn't install the aliases in part one you'll use "sudo nano" instead of sn below):

Continue reading 'Full Rails Stack Part 2: Rails, Mongrel and Nginx'

Full Rails Stack With Nginx, Mongrel, Monit, And More

I enjoy coding websites. I like coming up with elegant and flexible solutions to problems. If you saw David Heinemeier Hanssons' early screen casts on web development with Ruby on Rails, you may have been as impressed as I was. Unfortunately, deployment of a website to a *nix server can be a daunting task if you haven't done it before. It doesn't matter if it is a PHP, Python, or Ruby on Rails website, you need to have some basic sysadmin skills to set everything up on a newly installed server. You've got to know something about web servers (Apache, NginX, etc.), something about databases (MySQL, Postgres), about firewalls (iptables or Shorewall), source control (Subversion), email (SendMail, Postfix), monitoring your server (Monit, Nagios), statistics (Awstats, etc.), log rotation, cron jobs, offsite backups (Amazon s3). I have yet to meet an expert in all of these areas. For those sysadmins out there that fit the description I bow deeply. I've decided to do a series on setting up a full Rails stack on Ubuntu. So far I have deployed production Rails web applications to Red Hat, Open Solaris, CentOS, and Ubuntu servers. I've learned enough to know how truly ignorant I am. I don't claim to be an expert. But I am willing to share what I've learned so far in hopes it will help others out there. Here is what you'll get (in no particular order) when finished with the series. Continue reading 'Full Rails Stack With Nginx, Mongrel, Monit, And More'

Amazon MP3 Music Service (Review)

The Amazon MP3 Music Service has just been released. It is in beta and works quite well. To use it you must agree to the terms of service. You then are allowed to download the client software which is used to retrieve purchased music from Amazon's servers. Client software is available for both Mac and PC and has been promised for Linux sometime in the future. Linux users can download single items in the interim.
Amazon MP3 Terms Of Use

Continue reading 'Amazon MP3 Music Service (Review)'

LilyPond & Textmate Make Beautiful Music

This weekend I finally got a chance to take the music notation software LilyPond for a spin. I had heard of the open source project and was anxious to try it out. As a former Finale and Sibelius user I must admit to being a bit skeptical about its capabilities. I was pleasantly surprised to find the documentation and examples on the website helpful in getting started. For my first attempt with the software I kept it simple. Since my eight-year-old son is now taking piano lessons, I decided to compose a simple Minuet in the Baroque style. Continue reading 'LilyPond & Textmate Make Beautiful Music'

Accessing Yojimbo From Your iPhone

Bare Bones Software, authors of BBEdit and TextWrangler, has a wonderful application that helps you to organize your information called Yojimbo. It can archive complete web pages, create bookmarks, add notes, create PDFs from almost anything, create secure areas, is taggable, searchable, and is now accessible via the web. The web version, Webjimbo, allows you to access your computers Yojimbo database from anywhere you happen to be.

Continue reading 'Accessing Yojimbo From Your iPhone'

Shorewall Firewall on Ubuntu Feisty VPS Part 3

So lets setup the final piece of the puzzle so we can install some packages and start coding already. If you've been following along (Part Two), we are now ready to setup the shorewall firewall. This will lock down all ports we aren't using, both tcp and udp. Go ahead and ssh into your slice from terminal and type in the code below to install the shorewall package.

CODE:
  1. sudo -i
  2. apt-get install shorewall
  3. cd /etc/shorewall

Continue reading 'Shorewall Firewall on Ubuntu Feisty VPS Part 3'

Securing Your New Ubuntu Feisty VPS Part 2

So now that we've got Ubuntu Feisty installed (Part One), we'll setup some basic security for our new slice. Fire up terminal and ssh into your slice.

CODE:
  1. ssh -l your_username your_ip_address

Continue reading 'Securing Your New Ubuntu Feisty VPS Part 2'

Setting Up Ubuntu Feisty VPS on Slicehost Part 1

Today I'm focusing on setting up a new VPS at Slicehost. BTW, I'm assuming you're new to Linux. Lets get started.I'm assuming you got an email from Slicehost with the url to manage your new vps. Grab your uid and pwd they sent you and log into your new vps here. Once you've logged in, click on the link that lets you create your new slice. Create a new name for your slice and select Ubuntu Dapper for the distribution. It should take only a couple of minutes before your new vps is setup. Once its done grab the new password Slicehost will show you after your slice has been created and open a command prompt (Terminal or iTerm on Mac OSX, Putty on PC). Note that you should not type in the line numbers below in the code snippets. They are for reference only.Let's login (you'll be prompted for your pwd so have it handy):

CODE:
  1. ssh -l your_username your_ip_address

Continue reading 'Setting Up Ubuntu Feisty VPS on Slicehost Part 1'





December 2008
M T W T F S S
« Mar    
1234567
891011121314
15161718192021
22232425262728
293031  

Categories


Random Photos

  • IMG_2034.JPG
    IMG_2038.JPG
    IMG_2088.JPG
    IMG_1977.JPG


Now Reading

Planned books:

None

Current books:

  • The Consequences of Ideas: Understanding the Concepts that Shaped Our World

    The Consequences of Ideas: Understanding the Concepts that Shaped Our World by R. C. Sproul

  • Born Standing Up

    Born Standing Up by Steve Martin

Recent books:

View full Library