Upgrading Icecast2

The following instructions will perform the latest Icecast2 server upgrade on your Ubuntu Server via the PPA route.

1. Login to your Ubuntu Server via SSH. Substitute your own username and server.

$ ssh ulysses@server.com

2. Add Icecast2 PPA to your sources list. Since I’m running Ubuntu 12.04, I’ll use the 12.04 repository here.

$ sudo sh -c "echo deb http://download.opensuse.org/repositories/home:/dm8tbr/xUbuntu_12.04 ./ > /etc/apt/sources.list.d/icecast.list"

3. Add the GPG key to the apt sources keyring. I’ll use the 12.04 release key here as well.

$ wget -qO - http://download.opensuse.org/repositories/home:/dm8tbr/xUbuntu_12.04/Release.key | sudo apt-key add -

4. Run Update to begin the upgrade process to the latest version of Icecast2.

$ sudo apt-get update
$ sudo apt-get upgrade

5. The Icecast2 install script will run and ask you to overwrite your previous configuration. It’s up to you to keep or overwrite the file.

6. If you’re using your previous configuration file, it may throw out some errors and warnings, which you will probably need to fix.

7. Finally, test your Icecast2 server by sending a stream to it.

Keep Your SSH Sessions Alive

If you work on servers via Terminal using SSH (secure shell), one of the more annoying things that happens quite regularly are timeouts. If there’s no activity between your SSH client and the server, your terminal is closed because your session has timed out. You’ll need to login again. If you do this at least 6 times a day, then you can see how taxing this whole exercise can be.

To avoid Terminal timeouts, you can set the SSH client, your terminal, to keep the connection alive by sending a null signal to the server every few seconds. I’ve set mine to 2 minutes. Since I’m on Mac OS, I’ll need to configure my SSH client. The configuration file is located in your home directory under .ssh/config. If the file doesn’t exist, just create one.

cd
nano .ssh/config

Now add the following lines to it.

Host *
ServerAliveInterval 120

I’ve set mine to 120 seconds or 2 minutes. This value works for me while connected to an Ubuntu Server. You may have to play around with this value on other Linux systems. I think this is a better approach as opposed to configuring the SSH server on every server you are connected to. You may not have root access to some servers. Changing the settings on your SSH client is the better approach.