Saturday, September 13, 2008

Install Firebird 2.0.3 Database Server On Ubuntu 7.10

This tutorial explains how you can install the Firebird database server (version 2.0.3) on an Ubuntu 7.10 server. 




Step 1. Prepare an nice Ubuntu server : fire a "The Perfect Setup - Ubuntu"
search on HowtoForge and follow the steps according to the OS version
you are decided to go on.



Step 2. Do the libstdc++5 installation (before installing Firebird)




user@machine:~# sudo apt-get install libstdc++5



Step 3. Download and expand Firebird installation kit from
http://firebirdsql.org (downloads) or source force: the 2.0.3 NTPL
superserver.



- for 32 bit OS:





user@machine:~# sudo wget http://downloads.sourceforge.net/firebird/FirebirdSS-2.0.3.12981-1.nptl.i686.tar.gz




user@machine:~# sudo tar -xvf FirebirdSS-2.0.3.12981-1.nptl.i686.tar.gz



user@machine:~# cd cd FirebirdSS-2.0.3.12981-1.i686




- for 64 bit OS:




user@machine:~# sudo wget http://downloads.sourceforge.net/firebird/FirebirdSS-2.0.3.12981-1.amd64.tar.gz



user@machine:~# sudo tar -xvf FirebirdSS-2.0.3.12981-1.amd64.tar.gz



user@machine:~# cd FirebirdSS-2.0.3.12981-1.amd64




(remark: is NTPL by default for 64 bit OS)



Step 4. Install Firebird.





- user@machine:~# sudo ./install.sh




(remark : install script will prompt you twice for the SYSDBA password










Step 5. Do some UDF's housekeeping.




- if you have UDF's please (sudo) put them in  /opt/firebird/UDF/
folder. Of course the UDF's must be compiled according to OS version
....

- change rights on UDF's folder:




user@machine:~# sudo chown root:root /opt/firebird/UDF/*



user@machine:~# sudo chmod 444 /opt/firebird/UDF/*




- and restart firebird :




user@machine:~# sudo /etc/init.d/firebird reload



Optional step 6. Move your data:


- do a backup on the old machine:



<put path (include ending slash at the end) to gbak here>gbak  -b
-t -v -USER SYSDBA -PASS <put SYSDBA password here> <put path
and name of the database here> <put path and name of the backup
file here>




- make home of the new database on the new machine:




user@machine:~# sudo mkdir <put path to the database location here>




- and give Firebird the needed rights there:




user@machine:~# sudo chown firebird:firebird <put path to the database (include ending slash at the end) location here>



 - move the backup file from old to the new machine in the <put path
to the database (include ending slash at the end) location here>


folder and restore data:



<put path (include ending slash at the end) to gbak here>gbak  -c
-v -t -USER



SYSDBA -PASS <put SYSDBA password here> <put path and name of the backup
file here> <put path
and name of the database here>



 Enjoy.



No comments: