sabato 25 aprile 2009

Ubuntu Server 9.04 is out!

Canonical announces availability of Ubuntu 9.04 Server Edition

In my opinion the best new thing is the support to cloud computing Amazon's EC2 standard tanks to Eucalyptus.

Soon I will update my previous posts with this new version.

martedì 21 aprile 2009

Upgrading the system to FasCGI needs

Now it’s time to update the system and to install all is needed by our experiments: Lighttpd, FastCGI and SQLite libraries and so on.

First of all we start the virtual system that must be connected to Internet (my host system is part of a local network connected to Internet thought a router with a DHCP service that assign the IP address also to the virtualized operating system) , then:

  • login (back2c / back2c)

  • enter in root mode
    sudo -i
    (it's necessary to insert the password again)

  • update the system
    apt-get update
    apt-get upgrade

  • install the GNU C/C++ compiler
    apt-get install gcc build-essential

  • install Lighttpd
    apt-get install lighttpd

  • install FastCGI
    apt-get install libfcgi-dev

  • install SQLite
    apt-get install sqlite

At this point the system is up-to-date and you can connect the browser of your host system to the Lighttpd server just created: simply insert the IP of the virtual machine as URL in your browser.

If you don't know the IP, simply digit ifconfig in the command line of your Ubuntu:


(IPs of the picture are invented)

Now, if you can see the welcome page of Lighttpd, our system is ready for the first CGI: in the next post we will experiment a simple “Hello world”.

sabato 18 aprile 2009

Installing Ubuntu Server 8.10

In the previous post I prepared the virtual machine to start the ISO of Ubuntu Server 8.10, now it’s time to install the distribution on it!

After starting FLUS (the name that I assigned to the virtual machine just configured) the installation process will start:

- select the language (English)
- select "Install Ubuntu Server"
- select the language for the installation process (English)
- select a country (Italy in my case)
- select a keyboard (Italy/Italy in my case)
- assign a hostname (I chose "flus")
- partition disks ("Guided - use entire disk")
- choose the disk now created (SCSI1 / sda)

- write changes to the disk
- set up user and password (I chose back2c / back2c) and no encrypted directory.
- choose no proxy
- choose no automatic updates
- activate OpenSSH server

at this time the installation process will start, once finished we have to remove the cd and reboot (From the menu choice “Devices” then "unmount CD/DVD-ROM”).

That’s all! In the next post we will install on the server all needed packages for our purposes.

sabato 11 aprile 2009

Preparing the virtual machine

Lighttpd and FastCGI are technologies compatible with a wide range of operating systems; at the moment, for our experiments, in my opinion, a good choice is Ubuntu Server, a Linux distribution derived from Debian as the well known Ubuntu Desktop distribution.

I chose Ubuntu because of some peculiarities:
  • it's light and text-based
  • it's well supported and updated
  • with APT you can easily install new software
If you prefer to follow my blog testing FastCGIs in a different environment make sure that it supports Lighttpd and it has a C/C++ ANSI compiler.

After having downloaded the ISO image of Ubuntu Server 8.10 I preferred to keep Windows and to install Ubuntu in a virtual machine.

If you too prefer to keep your operating system and in the same time experiment Ubuntu Server in a virtual machine, you can download and install VirtualBox.
After the installation of the right version of VirtualBox for your host system (in Windows is an easy exercise for the “next” generation :-)), you must follow some easy steps to obtain a full working environment ready to experiment FastCGIs.

To set up a virtual machine ready to Ubuntu Server you must follow my instructions:
  • Run VirtualBox
  • Start a New virtual machine
  • Chose a name for the virtual machine (for example FLUS = FastCGI, Lighttpd, Ubuntu, Sqlite)
  • Set OS Type and Version (Linux / Ubuntu)


  • Create a Virtual Hard Disk:
    Pressing New a panel titled "Welcome to the Create New Virtual Disk Wizard" will be opened; set "Hard Disk Storage Type" selecting "Dynamically expanding storage" and, if necessary, set "Virtual Disk Location and Size"; press Summary and then Finish.
  • Finish the Wizard
To start the installation of Ubuntu we have only to set up the virtual machine:
  • Select the virtual machine just created (FLUS), push “Settings” and adjust some options:

    General => Advanced => Enable PAE/NX



    Network => Adapter 1 => In "Attached to:" select "Host Interface"



    CD/DVD-ROM => "Mount CD/DVD Drive" => "ISO Image File" and select the Ubuntu ISO image (ubuntu-8.10-server-i386.iso)

Now the virtual machine is ready to start the installation of Ubuntu Server and of every needed package. We will see how in the next post.