Using Capistrano to deploy Mercurial changes

We have a few production servers at work, and we have a central bitbucket repository to store our core code. Once we make a change on our testing server (!), we used to have to commit, push changes to bitbucket, and then ssh into each server, then pull changes, and update each repository. A pain in the backside! Enter Capistrano. A ruby ssh automation tool. In a few simple steps you can create a recipe file that will let you do this all with one command.

(more…)

Setting up SSH host shortnames

Here’s an example setup to create SSH host shortnames. On you local computer, add the following to ~/.ssh/config:

Host server1
HostName server1.internet.com
User david

Host server2
HostName server2.internet.com
User david

Host *
User davidwinter

Now with this file saved, you can ssh into server2.internet.com with just the following command:

ssh server2

This will save you having to type out:

ssh david@server2.internet.com

And if you have public key authentication setup, it makes the process even smoother. Adding the wildcard host record at the bottom allows you to specify a default username to use for other servers to the ones you’ve not specified above.

SSH and public key authentication

Fed up with having to type your password in each time you log into a server over SSH? Me too. Down with passwords, and in with public key authentication!

(more…)

Switch to Static IP on Ubuntu Server

I just bought a new Linksys router for my home network and wanted to set-up my Ubuntu Web Server with a static IP address so that I could port-forward a few things. Trouble is, with only the command line it’s a little tricky to figure out exactly how to do it. Following are the steps I used.

sudo nano /etc/network/interfaces

Inside the file, you’ll see the following line:

iface eth1 inet dhcp

We want to switch from dhcp to a static IP address. Comment or delete that line, and then add the following to the file:

iface eth1 inet static
address 192.168.1.200
netmask 255.255.255.0
gateway 192.168.1.1
  1. This line states we want to use a static IP address.
  2. The static IP address you want to use.
  3. The subnet mask.
  4. This is the IP address of my router which connects to the Internet.

Save the file and then restart the network settings:

sudo /etc/init.d/networking restart

Job done.

Fedora Core 6 Released

I wonder if Ubuntu Edgy Eft will be released (tomorrow!) before I actually manage to download Fedora Core 6… hmmm… I’m now at 38.7% downloaded.

Go grab the torrent here. The main site is basically down while they try and cope with the demand.

2006-10-25 [, , ]
View Comments