First of all:
My server is set up in a "sequre" environment. This means that it is behind a firewall and there are no ports forwarded to any machines behind the firewall. So I am a little less concerned with security on this server than if it had been accessible from the internet.
I already have a functional LAMP setup as well as DNS (bind9), ftp (proftpd) and Samba running.
The server has not been changed in any way (recompiled libraries etc.) so everything can be updated without any fear of overwriting customizations.
Also, it is headless and I am controlling it by using PuTTy ( http://www.putty.org/ ) on a Windows XP machine. I can upload files to the server either by placing them in a shared folder via Samba, or I can upload the files via ftp to any folder I have permissions in. I assume you already have a working copy of EPIM on the Windows PC and that you have a network key registered.
Most of the stuff in this section has been taken from the guide at https://help.ubuntu.com/community/Firebird2.1 and some things has been taken from this guide: viewtopic.php?f=2&t=5078&p=21300&hilit=debian#p21300 and then some things have been found out the hard way by trial and error
In all flavors of Ubuntu, it is not recommended to enable the root account. Instead you can either run a command as root by putting the word sudo at the beginning of the command, or you can assume the role of root for this session by issuing
Code: Select all
sudo su
We can now get to work.
First of all we need to install Firebird SQL server:
The Firebird2.1 package (version 2.1.1) for Ubuntu Intrepid 8.10, Hardy 8.04, Gutsy 7.10, Feisty 7.04, Dapper 6.06 is located into the ppa repository - https://launchpad.net/~mapopa/+archive
The repository must be added into sources.list , Here is the example for Ubuntu Server 8.10 (Intrepid Ibex). I prefer to use pico/nano instead of gedit to edit textfiles via the commandline.
Code: Select all
pico /etc/apt/sources.list
Code: Select all
deb http://ppa.launchpad.net/mapopa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/mapopa/ubuntu intrepid main
Code: Select all
apt-get update
Code: Select all
apt-cache search firebird2.1-*
Code: Select all
apt-get install firebird2.1-super
Code: Select all
apt-get install firebird2.1-classic
You need to configure the package after it is installed
Code: Select all
dpkg-reconfigure firebird2.1-super
Code: Select all
apt-get install firebird2.1-examples firebird2.1-dev
Code: Select all
cd /usr/share/doc/firebird2.1-examples/examples/empbuild/
gunzip employee.fdb.gz
chown firebird.firebird employee.fdb
mv employee.fdb /var/lib/firebird/2.1/data/
Code: Select all
isql-fb
SQL> connect "/var/lib/firebird/2.1/data/employee.fdb " user 'SYSDBA' password 'SYSDBApassword';
and you can check the server version and the tables
SQL> show tables;
COUNTRY CUSTOMER
DEPARTMENT EMPLOYEE
EMPLOYEE_PROJECT JOB
PROJECT PROJ_DEPT_BUDGET
SALARY_HISTORY SALES
SQL> show version;
SQL> quit
CON>;
For a GUI admin tool I recommend you take a look at the Flamerobin administration tool. It is available for several platforms and you find it on http://www.flamerobin.org/ . Download the package that is right for your platform and unpack it.
Before you continue, you need to copy the local Firebird database engine, C:\Program Files\EssentialPIM Pro Beta\Gds32.dll to the Flamerobin folder. If you do not do this you will get some errors. Things might work, but this is an easy way to deal with it.
Start the version you need and rightclick on Home in the window that opens. Choose "Register server" and choose a display name for the server (can be anything you want). In the "Hostname field" you can add the IP address of your server. I left the portnumber open to just let it use the default port. Using this you can try to connect to the example database.
Rightclick on the server you just registered and choose "Register Existing Database". You can add the following to get the example database registered:
Code: Select all
Display name: Example db
Database path: /var/lib/firebird/2.1/data/employee.fdb
Username: SYSDBA
Password: the password you chose for the SYSDBA user
When you have confirmed that this is working, you are ready to move to the next step - adding the EPIM database.
In EPIM choose:
File>New>EPIM Datafile
Close EPIM and and when you are asked if you want to save, name the file whatever-you-like.epim
Copy the file to your server. It is normally located under
C:\Documents and Settings\your-logged-in user\Application Data\EssentialPIM Pro
I did this by copying it to the shared folder on the server. The only problem I got was that the file got the wrong owner and group. But we will deal with that later.
On the server command line go to the shared folder
Code: Select all
cd /home/shared/
mv whatever-you-like.epim /var/lib/firebird/2.1/data/
Code: Select all
cd /var/lib/firebird/2.1/data/
ls -l
Code: Select all
chown firebird:firebird whatever-you-like.epim
ls -l
You can now try to connect to this database from EPIM.
File>Connect to database
Code: Select all
Server: IP address of your server
Database file: /var/lib/firebird/2.1/data/whatever-you-like.epim
Login: SYSDBA
Password: the password you entered for SYSDBA
That is it. You now need to repeat the installation of EPIM and connecting to the database from all PC's that will use EPIM with the right usernames. If two users on the same PC will use EPIM, you need to connect to the database for each of them.
In this setup I do not consider complications caused by a local firewall running on the server. As said in the beginning, I assume a "safe" environment. But this guide should be an ok starting point for most people on Ubuntu Server versions.