Install Erlang on Ubuntu with Capistrano
Here’s a simple task that I use to install Erlang on remote servers using Capistrano and Deprec. Assuming you have an SSH key setup with the remote server, you can run this task from a terminal like this: “miceda:erlang:install”. This downloads the source and does the make/make install dance.
Capistrano::Configuration.instance(:must_exist).load do
# install Erlang 12 on Ubuntu 7.10 (gutsy)
namespace :miceda do
namespace :erlang do
SRC_PACKAGES[:erlang] = {
:filename => 'otp_src_R12B-1.tar.gz',
:dir => 'otp_src_R12B-1',
:url => "http://www.erlang.org/download/otp_src_R12B-1.tar.gz",
:unpack => "tar zxf otp_src_R12B-1.tar.gz;",
:configure => %w(
./configure
;
).reject{|arg| arg.match '#'}.join(' '),
:make => 'make;',
:install => 'make install;'
}
desc "Install Erlang 12B-1"
task :install do
install_deps
deprec2.download_src(SRC_PACKAGES[:erlang], src_dir)
deprec2.install_from_src(SRC_PACKAGES[:erlang], src_dir)
end
desc "Install deps for Erlang"
task :install_deps do
apt.install( {:base => %w(libc6 libncurses5 libncurses5-dev libssl-dev openssl m4 libexpat1-dev)}, :stable )
end
end
end
end
Of course the big benefit is that with Capistrano you can do this across several servers at the same time.
Trackbacks
Unfortunately, due to spammers I've had to close both trackbacks and comments.