Erlang Central

Difference between revisions of "Erlang R12-B4 from Source Ubuntu 8.04 Server"

From ErlangCentral Wiki

(New page: I do not know much about Erlang yet. This is how I figured out to install the latest source on Ubuntu 8.04 Server. I installed it into /opt to make it easier to upgrade in the future. Cu...)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
==Overview==
 +
 
I do not know much about Erlang yet. This is how I figured out to install the latest source on Ubuntu 8.04 Server.  I installed it into /opt to make it easier to upgrade in the future.  Currently I am doing this in a clean install Ubuntu on VMware which is fully upgraded.
 
I do not know much about Erlang yet. This is how I figured out to install the latest source on Ubuntu 8.04 Server.  I installed it into /opt to make it easier to upgrade in the future.  Currently I am doing this in a clean install Ubuntu on VMware which is fully upgraded.
  
 +
<code>
 +
uname -a
 
Linux saturn14 2.6.24-19-server #1 SMP Wed Aug 20 23:54:28 UTC 2008 i686 GNU/Linux
 
Linux saturn14 2.6.24-19-server #1 SMP Wed Aug 20 23:54:28 UTC 2008 i686 GNU/Linux
 +
</code>
 +
 +
 +
==Installation: Choice 1==
 +
 +
<h6>(Author: Myst3k)</h6>
 +
  
#Installs the tools necessary to configure and build Erlang
+
1. Install the tools necessary to configure and build Erlang
 
<code>sudo apt-get install build-essential libncurses5-dev m4</code>
 
<code>sudo apt-get install build-essential libncurses5-dev m4</code>
  
#(Optional) Enables openssl support
+
1. (Optional) Enables openssl support
 
<code>sudo apt-get install openssl libssl-dev</code>
 
<code>sudo apt-get install openssl libssl-dev</code>
  
#(Optional) Enables java suport
+
1. (Optional) Enables java suport
 
<code>sudo apt-get install sun-java6-jdk</code>
 
<code>sudo apt-get install sun-java6-jdk</code>
  
# Creates installation directory, installing to /opt for ease of upgrade and I like my files in a single spot
+
2. Creates installation directory, installing to /opt for ease of upgrade and I like my files in a single spot
 
<code>sudo mkdir -p /opt/erlang</code>
 
<code>sudo mkdir -p /opt/erlang</code>
  
# Downloads and extracts Erlang
+
3. Download and extract Erlang
 
<code>wget http://www.erlang.org/download/otp_src_R12B-4.tar.gz
 
<code>wget http://www.erlang.org/download/otp_src_R12B-4.tar.gz
 
tar -xzvf otp_src_R12B-4.tar.gz
 
tar -xzvf otp_src_R12B-4.tar.gz
 
cd otp_src_R12B-4</code>
 
cd otp_src_R12B-4</code>
  
# Configure with threads, smp, kernel polling, and hipe(??)
+
4. Configure with threads, smp, kernel polling, and hipe(??)
 
<code>./configure --enable-threads \
 
<code>./configure --enable-threads \
 
--enable-smp-support \
 
--enable-smp-support \
Line 27: Line 38:
 
--prefix=/opt/erlang</code>
 
--prefix=/opt/erlang</code>
  
# Builds and installs Erlang
+
5. Builds and installs Erlang
 
<code>make
 
<code>make
 
sudo make install</code>
 
sudo make install</code>
  
# Creates links to binary files into normal paths for easy execution
+
6. Creates links to binary files into normal paths for easy execution
 
<code>for file in erl erlc epmd run_erl to_erl dialyzer typer escript; do
 
<code>for file in erl erlc epmd run_erl to_erl dialyzer typer escript; do
 
sudo ln -s /opt/erlang/lib/erlang/bin/$file /usr/bin/$file;
 
sudo ln -s /opt/erlang/lib/erlang/bin/$file /usr/bin/$file;
Line 37: Line 48:
 
</code>
 
</code>
  
# Test installation
+
7. Test installation
 
<code>erl
 
<code>erl
 
Erlang (BEAM) emulator version 5.6.4 [source] [async-threads:0] [hipe] [kernel-poll:false]
 
Erlang (BEAM) emulator version 5.6.4 [source] [async-threads:0] [hipe] [kernel-poll:false]
Line 44: Line 55:
 
1> q().
 
1> q().
 
ok
 
ok
2> </code>
+
2>
 +
</code>
  
  
</code></code>
+
==Installation: Choice 2==
 +
<h6>(Author: Gleber)</h6>
 +
 
 +
Here is another way to install it using the Debian repos.  This will work as long as they have the latest version and that is what you want to use. Credit goes to Gleber for showing me this. I have added a few steps and some of the initial dependencies needed.
 +
 
 +
 
 +
<code>
 +
sudo apt-get install build-essential libncurses5-dev m4 debhelper autoconf autotools-dev quilt unixodbc-dev bison flex libsctp-dev fakeroot
 +
sudo apt-get install openssl libssl-dev
 +
sudo apt-get install sun-java6-jdk
 +
sudo su
 +
echo "deb-src http://ftp.de.debian.org/debian experimental main" > /etc/apt/sources.list.d/debian.experimental.list
 +
gpg --keyserver subkeys.pgp.net --recv A70DAF536070D3A1
 +
gpg --export --armor 6070D3A1 | apt-key add -
 +
apt-get update
 +
exit
 +
apt-get source erlang
 +
cd erlang-12.*
 +
dpkg-buildpackage -rfakeroot #Get some coffee
 +
cd ..
 +
sudo dpkg -i erlang*.deb
 +
sudo rm /etc/apt/sources.list.d/debian.experimental.list
 +
sudo apt-get update
 +
</code>
 +
 
 +
 
 +
==Installation: Choice 3 (for R13B on Ubuntu 9.04) ==
 +
<h6>(Author: Jj1bdx)</h6>
 +
 
 +
Another example of choice for Ubuntu 9.04 Desktop.
 +
 
 +
packages to install:
 +
<code>
 +
sudo apt-get install build-essential libncurses5-dev m4
 +
sudo apt-get install openssl libssl-dev
 +
sudo apt-get install libsctp-dev freeglut3-dev libwxgtk2.8-dev g++
 +
</code>
 +
 
 +
Download and extract Erlang R13B:
 +
<code>
 +
wget http://www.erlang.org/download/otp_src_R13B.tar.gz
 +
tar -xzvf otp_src_R13B.tar.gz
 +
cd otp_src_R13B
 +
</code>
 +
 
 +
Then configure, compile and install.
 +
<code>
 +
./configure \
 +
--enable-threads --enable-smp-support --enable-kernel-poll \
 +
--enable-hipe --enable-sctp --prefix=/opt/erlang
 +
 
 +
make
 +
sudo make install
 +
 
 +
for file in erl erlc epmd run_erl to_erl dialyzer typer escript; do
 +
  sudo ln -s /opt/erlang/lib/erlang/bin/$file /usr/bin/$file;
 +
done
 +
</code>
 +
 
 +
[[Category:HowTo]]

Revision as of 08:03, 27 April 2009

Contents

Overview

I do not know much about Erlang yet. This is how I figured out to install the latest source on Ubuntu 8.04 Server. I installed it into /opt to make it easier to upgrade in the future. Currently I am doing this in a clean install Ubuntu on VMware which is fully upgraded.

uname -a
Linux saturn14 2.6.24-19-server #1 SMP Wed Aug 20 23:54:28 UTC 2008 i686 GNU/Linux


Installation: Choice 1

(Author: Myst3k)


1. Install the tools necessary to configure and build Erlang

sudo apt-get install build-essential libncurses5-dev m4

1. (Optional) Enables openssl support

sudo apt-get install openssl libssl-dev

1. (Optional) Enables java suport

sudo apt-get install sun-java6-jdk

2. Creates installation directory, installing to /opt for ease of upgrade and I like my files in a single spot

sudo mkdir -p /opt/erlang

3. Download and extract Erlang

wget http://www.erlang.org/download/otp_src_R12B-4.tar.gz
tar -xzvf otp_src_R12B-4.tar.gz
cd otp_src_R12B-4

4. Configure with threads, smp, kernel polling, and hipe(??)

./configure --enable-threads \
--enable-smp-support \
--enable-kernel-poll \
--enable-hipe \
--prefix=/opt/erlang

5. Builds and installs Erlang

make
sudo make install

6. Creates links to binary files into normal paths for easy execution

for file in erl erlc epmd run_erl to_erl dialyzer typer escript; do
sudo ln -s /opt/erlang/lib/erlang/bin/$file /usr/bin/$file;
done

7. Test installation

erl
Erlang (BEAM) emulator version 5.6.4 [source] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.6.4  (abort with ^G)
1> q().
ok
2>


Installation: Choice 2

(Author: Gleber)

Here is another way to install it using the Debian repos. This will work as long as they have the latest version and that is what you want to use. Credit goes to Gleber for showing me this. I have added a few steps and some of the initial dependencies needed.


sudo apt-get install build-essential libncurses5-dev m4 debhelper autoconf autotools-dev quilt unixodbc-dev bison flex libsctp-dev fakeroot
sudo apt-get install openssl libssl-dev
sudo apt-get install sun-java6-jdk
sudo su
echo "deb-src http://ftp.de.debian.org/debian experimental main" > /etc/apt/sources.list.d/debian.experimental.list
gpg --keyserver subkeys.pgp.net --recv A70DAF536070D3A1
gpg --export --armor 6070D3A1 | apt-key add -
apt-get update
exit
apt-get source erlang
cd erlang-12.*
dpkg-buildpackage -rfakeroot #Get some coffee
cd ..
sudo dpkg -i erlang*.deb
sudo rm /etc/apt/sources.list.d/debian.experimental.list
sudo apt-get update


Installation: Choice 3 (for R13B on Ubuntu 9.04)

(Author: Jj1bdx)

Another example of choice for Ubuntu 9.04 Desktop.

packages to install:

sudo apt-get install build-essential libncurses5-dev m4 
sudo apt-get install openssl libssl-dev
sudo apt-get install libsctp-dev freeglut3-dev libwxgtk2.8-dev g++

Download and extract Erlang R13B:

wget http://www.erlang.org/download/otp_src_R13B.tar.gz
tar -xzvf otp_src_R13B.tar.gz
cd otp_src_R13B

Then configure, compile and install.

./configure \
--enable-threads --enable-smp-support --enable-kernel-poll \ 
--enable-hipe --enable-sctp --prefix=/opt/erlang

make
sudo make install

for file in erl erlc epmd run_erl to_erl dialyzer typer escript; do
   sudo ln -s /opt/erlang/lib/erlang/bin/$file /usr/bin/$file;
done