Erlang Central

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

From ErlangCentral Wiki

Line 4: Line 4:
 
==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 15:
 
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]

Revision as of 21:24, 1 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 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).

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 you 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 (needed 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 want to use PestgreSQL instead of MySQL we will replace libmyodbc mysql-server mysql-client with odbc-postgresql postgresql.


Installing Erlang/OTP

After successfully installing every additional packages 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.