VMware

  Community Feedback

15 votes

Log in to rate item

Comment on this appliance

  Related Categories

Challenge Entry Appliance | Database | Developer

DotNetFirebird Ultimate Appliance

DotNetFirebird Ultimate Appliance (Mono+Apache + Firebird + Ubuntu Linux + PHP+Lazarus)

Description

1.DotNetFirebird Appliance contains LAMP like kit to easy start programming in php/mono/oopascal and working with firebird (Two administration tools were included in the virtual machine) also there is added MonoDevelop for C# coding and Lazarus (Delphi like ide) for oopascal for RAD (Rapid application development)

2.Create Ultimate DotNetFirebird Vmware Machine (How it was created):
Create Ultimate Firebird Vmware Machine

Download vmware workstation or the player

sudo vi /etc/apt/sources.list
decoment the universe lines

and comment the first line (with cdrom)

sudo apt-get update

apt-cache search firebird

sudo apt-get install firebird2-super-server firebird2-examples firebird2-dev firebird2-utils-super ibwebadmin libfirebird2-super

when asked for SYSDBA password put it :masterkey

See if firebird is started:
ps awwx | grep firebird

Load in firefox browser
http://localhost/ibwebadmin/

Write in the "Login to Database" field
/var/lib/firebird2/examples/employee.fdb
And in the password field:masterkey

Go to the sql tab and run this query
select * from employee;
Click on "Execute" button then on "Show Output"

you can tweak the ibwebadmin config
cd /var/www/ibwebadmin/inc

sudo vi configuration.inc.php and change these variables
define('DEFAULT_DB', 'employee.fdb');
define('DEFAULT_PATH', '/var/lib/firebird2/examples/');

Next we will install flamerobin db admin tool:
Go to flamerobin.org -> Download

Choose the lastest released kit flamerobin
http://prdownloads.sourceforge.net/flamerobin/flamerobin-0.7.1-gtk2.tar.bz2?download

tar -jxvf Desktop/flamerobin-0.7.1-gtk2.tar.bz2
rm Desktop/flamerobin-0.7.1-gtk2.tar.bz2
sudo apt-get install make libpng3
cd flamerobin-0.7.1-gtk2
sudo ln -s /usr/lib/libfbclient.so.1.5.1 /usr/lib/libfbclient.so.2
./flamerobin
register the same database as we did for ibwebadmin
Display name: employee example
Database path:/var/lib/firebird2/examples/employee.fdb
Username:SYSDBA
Password:masterkey
Click on "SAVE" then double click on the "employee example" in the left tree

You can click on "Tables -> Select * from ..."

Optional steps : create flamerobin shortcut on desktop with following icon (saved in home)
wget http://svn.sourceforge.net/viewcvs.cgi/*checkout*/flamerobin/trunk/flamerobin/res/fricon.xpm?rev=1104
mv fricon.xpm\?rev\=1104 fricon.xpm

Next i will install monodevel+sql browser for developing c#/java applications
http://howtoforge.net/monodevelop_ubuntu

The only things i added first:

sudo apt-get install gcc binutils-doc manpages-dev autoconf automake1.9 libtool flex bison gcc-doc gcc-4.0-doc gcc-4.0-locales libc6-dev-amd64 lib64gcc1 libc6-dev libglib2.0-dev libpng3-dev libxft2 libttf2 gnome-devel libtiff4-dev libxml-sax-expat-perl libjpeg62-dev libvte-dev libgtkhtml2-dev libgtkhtml3.6-dev libungif4-dev

Start the database browser with
View -> Database Browser

Now register the employee dabatase
Database Connections -> Create New connection

Provider - Firebird Database
Name : employees example
Server: localhost
Database: /var/lib/firebird2/examples/employee.fdb

User ID:SYSDBA
password:masterkey

You can browse the tables

Create new solution
File -> New Solution -> Console Project
Name it FirebirdConnection

Build the new solution and run it :
Then we will copy paste the Firebird mono example

http://www.mono-project.com/Firebird_Interbase

It should look like this

// project created on 5/26/2006 at 1:03 PM
using System;
using System.Data;
using FirebirdSql.Data.Firebird;

class MainClass
{
public static void Main(string[] args) {
string connectionString =
"Database=/var/lib/firebird2/examples/employee.fdb" +
"User=SYSDBA;" + "Password=masterkey;" +
"Dialect=3;" + "Server=localhost";

IDbConnection dbcon = new FbConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
string sql = "SELECT * FROM employee";
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
object dataValue = reader.GetValue(0);
string sValue = dataValue.ToString();
Console.WriteLine("Value: " + sValue);
}

// clean up
reader.Close();
reader = null;
dbcmd.Dispose();
dbcmd = null;
dbcon.Close();
dbcon = null;
}

}

Add Refereces to System.Data and FirebirdSql.Data.Firebird

From the left Solution tree

Solution -> References -> Edit References

And rebuild solution then run it.

How the lazarus (oopascal ide) was added :

Download i386 free pascal binary package from sf.net

http://prdownloads.sourceforge.net/freepascal/fpc-2.0.2.i386-linux.tar?download
tar -xvf fpc-2.0.2.i386-linux.tar

sudo sh install.sh

I have installed it in /opt/fpc and answered Yes/[ENTER] to all questions
If all ok then you can get compiler version this way

/opt/fpc/bin/fpc -i

Free Pascal Compiler version 2.0.2

add /opt/fpt/bin in $PATH

vi ~/.bash_profile

#FPC PATH

if [ -d /opt/fpc/bin ] ; then
PATH=/opt/fpc/bin:"${PATH}"
fi

You need to install the development packages of the GTK and pixbuf libraries, so
sudo apt-get install libgtk2.0-dev
sudo apt-get install libgdk-pixbuf-dev

cd opt
Download lazarus package
http://prdownloads.sourceforge.net/lazarus/lazarus-0.9.14-1.tar.gz?download
tar -zxvf lazarus-0.9.14-1.tar.gz

cd lazarus

make

./lazarus

download the source code for the compiler

http://prdownloads.sourceforge.net/freepascal/fpc-2.0.2.source.tar.gz?download
tar -zxvf fpc-2.0.2.source.tar.gz
cd fpc

configure the free pascal source in environment

Environment-> Environment options -> FPC Source directory

~/work/lazarus/fpc/ in my case

I hope you have firebird installed on your system

Then we have to install the lazarus firebird components
http://wiki.lazarus.freepascal.org/index.php/Install_Packages

To install a package one goes to "Components -> Open Package File (.lpk)" In the following dialog you navigate to ~/work/lazarus/components/sqldb or the corresponding directory under Windows and choose the sqldblaz.lpk file. If everything works out as planned you will see the Package Manager. The Package Manager is showing a treeview with the files in the package and the required packages. Nothing to worry about let's just press Compile and when the compilation is finished press Install. Next we get a warning about Lazarus only supporting static linked libraries and the question if you want to rebuild Lazarus. Just press Yes and sit back. Lazarus will be rebuilt, and depending on your configuration restarted.

If everything went well you'll see a new tab called SQLdb. This tab will contain two components a TSQLConnection and a TSQLQuery. What we need next is a Connection component. Once again go to Components -> Open Package File and navigate to /usr/share/lazarus/components/sqldb/interbase. Open the ibconnectionlaz.lpk file and again press Compile and Install and Yes. :)

Next time Lazarus is started the SQLdb tab also contains a component TIBConnection.
I have created and sample project uder the lazarus/examples where i show how to connect to the same firebird database.

3. Using Firebird Database with debian : there are several documentation links on the web
for python http://jclement.ca/docs/firebird_debian/firebird-debian/
for php http://php.net/ibase
debian small howto http://www.debianhelp.co.uk/firebird.htm
For mono there is the Firebird wikipage
http://www.mono-project.com/Firebird_Interbase
also the dot net firebird where are various C# tutorials and DotNet provider
documentation online
http://www.dotnetfirebird.org/
For lazarus/free pascal there wiki page http://wiki.lazarus.freepascal.org/index.php/Lazarus_Database_Tutorial

4. flamerobin is under expat http://flamerobin.org/license.html
firebird - IDPL (Mozilla based license)
ubuntu - free to share and modify philosophy
mono - under MIT+LGPL
lazarus ide under LGPL
free pascal is under GPL

Last updated: 05/26/2006

Operating system: Ubuntu Breezy 5.10

Applications installed:
php 4.x apache 2.0 firebird 1.5.x flamerobin 0.7.1 ibwebadmin fpc-2.0.2 lazarus-0.9.14 mono-1.1.10 monodevelop-0.9

VMware Tools installed: No

Size: 1000 MB
Torrent available: Yes
(What is BitTorrent?)

Primary account
Username: ubuntu
Password: ubuntu

Submitted by: mariuz


Download link provided by the submitter, not VMware. Report broken downloads here.


« BACK...