Install Irssi on Dreamhost with SSL and Perl Support
So I just got setup with DreamHost ($9.24 for a full year? yes please!) and I wanted to setup Irssi, an the awesome IRC client. Simple enough, right? Well, DH is cheap massive shared hosting so you don’t exactly get access to just ‘apt-get install irssi‘, you have to build it or copy a binary. And no, it’s not against their TOS, they just don’t “encourage” irc from a shared host — whatever that means.
I found a guide on DreamHost’s wiki, just copy a binary, chmod, and BAM. Yeah except the link to the binary is dead. I found a binary elsewhere, but of course that didn’t work because of some dependency crap. Then I found this guide that shows you how to build it yourself (on a side note, that guy’s site has some pretty loltastic religious ramblings). Very helpful, but no SSL:
irssi Building with SSL support ........ : no
I spent about an hour messing around with different build configurations and even tried installing OpenSSL so I’d have the libs locally, but either that will never work or I lack the necessary kung-fu.
Then it hit me, why not just grab the binary from the latest .deb (this is a Debian box). I headed off to Debian Packages Irssi page to grab the deb file. My box was running AMD64, so went to the AMD64 page and copied a link from a nearby server. On the box you can do (I’m assuming you’re working from ~/ for all the commands):
wget http://http.us.debian.org/debian/pool/main/i/irssi/irssi_0.8.10-2_amd64.deb dpkg-deb --extract irssi_0.8.10-2_amd64.deb moo
Remember to replace the irssi.deb file with the latest, as this link may go out of date. This will download Irssi and extract the .deb to ~/moo/. Technically, you can run Irssi now, but Perl support will still be busted and it won’t be pretty. So let’s pretty it up first. Make a directory for binaries in your home dir:
mkdir bin chmod 775 bin
Now, let’s move the Irssi binary there:
mv moo/usr/bin/irssi bin/ chmod 755 bin/irssi
Now, time to fix Perl:
mkdir -p .irssi/scripts/ mv moo/usr/lib/perl5/Irssi* .irssi/scripts/
The scripts directory is one of the places Irssi looks to for Perl libs (it works in my favor, I’m not going to ask WHY!). When trying to load a Perl script without these files you’ll get an error along the lines of “Can’t locate Irssi.pm in @INC”. This solves that.
Now, just export the ~/bin to your PATH variable so that you can type irssi anywhere, and not just in ~/bin.
export PATH=$PATH:~/bin
There’s only one thing left to do, cleanup!
rm -rf moo/ rm irssi_0.8.10-2_amd64.deb
Screen is already installed, so enjoy the goodness of screen and irssi!