Erlang Central

Difference between revisions of "Installing Erlang OTP on Asus EEE Pc"

From ErlangCentral Wiki

(3 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
[[Category:HowTo]]
 
==Author==
 
==Author==
 
Michal Ptaszek
 
Michal Ptaszek
Line 4: Line 5:
 
==Introduction==
 
==Introduction==
 
===Asus EEE Pc===
 
===Asus EEE Pc===
In the end of 2007 Asus in cooperation with Intel created a tiny notebook and named it EEE Pc. With its ultra-small size (7" LCD and 0.92 kg weight) it became a very powerful tool as a portable workspace.  
+
In the end of 2007 Asus, in cooperation with Intel, created a tiny notebook and named it EEE Pc. With its ultra-small size (7" LCD and 0.92 kg weight) it became a very powerful tool as a portable workspace.  
  
More information about Asus EEE Pc you can find on:
+
You can find more information about Asus EEE Pc on:
  
 
[http://eeepc.asus.com Official producer's site]
 
[http://eeepc.asus.com Official producer's site]
Line 15: Line 16:
 
Xandros is a Debian-based, commercial Linux distribution which has been chosen as a one of the operating systems preinstalled on Asus notebooks.
 
Xandros is a Debian-based, commercial Linux distribution which has been chosen as a one of the operating systems preinstalled on Asus notebooks.
  
More information about Xandors you can find on:
+
More information about Xandors to be found on:
  
 
[http://en.wikipedia.org/wiki/Xandros Wikipedia's article]
 
[http://en.wikipedia.org/wiki/Xandros Wikipedia's article]
Line 23: Line 24:
  
 
==Installing Erlang/OTP==
 
==Installing Erlang/OTP==
In this tutorial I will deal with installing Erlang/OTP from prebuilt packages (it is also possible to build it from sources - but mainly because of the compiling time I've decided to skip that version).
+
In this tutorial we will deal with installing Erlang/OTP from prebuilt packages (it is also possible to build it from sources - but mainly because of the compiling time I've decided to skip that version).
  
 
===Some initial information===
 
===Some initial information===
Line 31: Line 32:
 
   # run this command as a root
 
   # run this command as a root
 
</pre>}}
 
</pre>}}
In order to work as a root you should type ''sudo'' before each root command or type ''sudo bash'' to work as an administrator.
+
In order to work as a root we should type ''sudo'' before each root command or type ''sudo bash'' to work as an administrator.
  
  
Line 50: Line 51:
  
 
After that, we are ready to install some packages which will be helpful in the future.
 
After that, we are ready to install some packages which will be helpful in the future.
We will install openssl (needed for encryption support), java-jdk (for jinterface), unixODBC and some external database server (for example MySQL or PostgreSQL).
+
We will install openssl (required for encryption support), java-jdk (for jinterface), unixODBC and some external database server (for example MySQL or PostgreSQL).
 
Unfortunately, prebuilt packages for Erlang/OTP have odbc support disabled - so if we want to use it - we have to compile Erlang/OTP from source. The proper tutorial is available at [http://www.trapexit.org/ODBC_with_Erlang_R10B-4_and_MySQL another TrapExit tutorial].  
 
Unfortunately, prebuilt packages for Erlang/OTP have odbc support disabled - so if we want to use it - we have to compile Erlang/OTP from source. The proper tutorial is available at [http://www.trapexit.org/ODBC_with_Erlang_R10B-4_and_MySQL another TrapExit tutorial].  
  
Line 56: Line 57:
 
   # apt-get -y install openssl sun-java6-jdk unixodbc libmyodbc mysql-server mysql-client
 
   # apt-get -y install openssl sun-java6-jdk unixodbc libmyodbc mysql-server mysql-client
 
</pre>}}
 
</pre>}}
In case we want to use PestgreSQL instead of MySQL we will replace ''libmyodbc mysql-server mysql-client'' with ''odbc-postgresql postgresql''.
+
In case we wanted to use PostgreSQL instead of MySQL we would replace ''libmyodbc mysql-server mysql-client'' with ''odbc-postgresql postgresql''.
  
  
 
===Installing Erlang/OTP===
 
===Installing Erlang/OTP===
  
After successfully installing every additional packages we are ready to install the Erlang/OTP package. All we need is to run:
+
After have successfully installed every additional package we are ready to install the Erlang/OTP package. All we need is to run:
 
{{CodeSnippet|Code listing 3.5: Installing Erlang/OTP|<pre>
 
{{CodeSnippet|Code listing 3.5: Installing Erlang/OTP|<pre>
 
   # apt-get -y install erlang
 
   # apt-get -y install erlang

Revision as of 15:59, 2 May 2008

Contents

Author

Michal Ptaszek

Introduction

Asus EEE Pc

In the end of 2007 Asus, in cooperation with Intel, created a tiny notebook and named it EEE Pc. With its ultra-small size (7" LCD and 0.92 kg weight) it became a very powerful tool as a portable workspace.

You can find more information about Asus EEE Pc on:

Official producer's site

Wikipedia's article

Xandros

Xandros is a Debian-based, commercial Linux distribution which has been chosen as a one of the operating systems preinstalled on Asus notebooks.

More information about Xandors to be found on:

Wikipedia's article

Producer's site


Installing Erlang/OTP

In this tutorial we will deal with installing Erlang/OTP from prebuilt packages (it is also possible to build it from sources - but mainly because of the compiling time I've decided to skip that version).

Some initial information

Code listing 3.1: Prompt signs

  $ run this command as a normal user
  # run this command as a root

In order to work as a root we should type sudo before each root command or type sudo bash to work as an administrator.


Code listing 3.2: System information

  $ uname -a
  Linux eeepc-erlang 2.6.21.4-eeepc #2 Mon Oct 15 12:49:37 EDT 2007 i686 GNU/Linux


Preparing the system

At first, we must add new repository to our sources.list file

Code listing 3.3: Updating sources.list

  # echo "deb http://ftp.pl.debian.org/debian/ stable main contrib non-free" >> /etc/apt/sources.list
  # apt-get update

After that, we are ready to install some packages which will be helpful in the future. We will install openssl (required for encryption support), java-jdk (for jinterface), unixODBC and some external database server (for example MySQL or PostgreSQL). Unfortunately, prebuilt packages for Erlang/OTP have odbc support disabled - so if we want to use it - we have to compile Erlang/OTP from source. The proper tutorial is available at another TrapExit tutorial.

Code listing 3.4: Installing needed packages

  # apt-get -y install openssl sun-java6-jdk unixodbc libmyodbc mysql-server mysql-client

In case we wanted to use PostgreSQL instead of MySQL we would replace libmyodbc mysql-server mysql-client with odbc-postgresql postgresql.


Installing Erlang/OTP

After have successfully installed every additional package we are ready to install the Erlang/OTP package. All we need is to run:

Code listing 3.5: Installing Erlang/OTP

  # apt-get -y install erlang


Compiling Erlang from sources

Because Asus EEE Pc doesn't have any pre-installed developer tools, before we can compile something, we need some system upgrades. We will need at least gcc and g++ compilers with standard libraries.

Code listing 4.1: Installing gcc and g++ compilers

  # apt-get -y install make gcc libc6-dev g++ libstdc++6.4.1-dev

After installing all these packages we can use this tutorial to set up Erlang with odbc support.